SpeechResult
Defined in: core/src/speech-core.ts:39
Properties
Section titled “Properties”bytes: Uint8Array;Defined in: core/src/speech-core.ts:40
channels?
Section titled “channels?”optional channels?: number;Defined in: core/src/speech-core.ts:48
Only when the bytes or the provider state it.
characters
Section titled “characters”characters: number;Defined in: core/src/speech-core.ts:53
Characters sent after trimming, for endpoints billed per character.
durationMs?
Section titled “durationMs?”optional durationMs?: number;Defined in: core/src/speech-core.ts:51
Exact, from a WAV header that checks out. Absent for every other format: measuring those takes a decoder, and a guess here would be wrong in the ledger.
format
Section titled “format”format: "wav" | "pcm" | "mp3" | "opus" | "aac" | "flac";Defined in: core/src/speech-core.ts:42
Read from the bytes, so it can differ from the format asked for.
mimeType
Section titled “mimeType”mimeType: string;Defined in: core/src/speech-core.ts:44
The media type of format.
model: string;Defined in: core/src/speech-core.ts:57
The model and voice that were asked for.
sampleRate?
Section titled “sampleRate?”optional sampleRate?: number;Defined in: core/src/speech-core.ts:46
Hz. Only when the bytes (a WAV header) or the request state it.
usage?
Section titled “usage?”optional usage?: SpeechUsage;Defined in: core/src/speech-core.ts:55
Only when the provider reported it. Never estimated.
voice: string;Defined in: core/src/speech-core.ts:58