readWav
function readWav(bytes): WavInfo | undefined;Defined in: core/src/speech-core.ts:340
Read a WAV file’s own numbers, strictly. PCM only (format tag 1). The RIFF size
is exact, every chunk sits inside the file, there is one fmt before one
non-empty data that holds whole frames, and nothing trails. Extra chunks such
as LIST are skipped, and odd-sized chunks carry their pad byte. undefined
on anything else. It reports what the bytes say; whether 24 kHz mono is
acceptable is the caller’s policy.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bytes |
Uint8Array |
Returns
Section titled “Returns”WavInfo | undefined