OpenAISpeechConfig
Defined in: core/src/providers/openai-speech.ts:22
Extends
Section titled “Extends”Properties
Section titled “Properties”apiKey
Section titled “apiKey”apiKey: string;Defined in: core/src/providers/openai-speech.ts:24
“” sends no Authorization header, for a local server that wants none.
baseUrl?
Section titled “baseUrl?”optional baseUrl?: string;Defined in: core/src/providers/openai-speech.ts:27
Default https://api.openai.com.
fetchImpl?
Section titled “fetchImpl?”optional fetchImpl?: FetchLike;Defined in: core/src/providers/openai-speech.ts:39
Swapped in tests, or to route through a proxy. Defaults to global fetch.
format?
Section titled “format?”optional format?: "wav" | "pcm" | "mp3" | "opus" | "aac" | "flac";Defined in: core/src/providers/openai-speech.ts:36
Used when a call names no format. Default “wav”. It is always sent: each host’s own default differs (mp3, wav, pcm), and “I never asked” must not choose for the caller.
headers?
Section titled “headers?”optional headers?: Record<string, string>;Defined in: core/src/providers/openai-speech.ts:37
optional id?: string;Defined in: core/src/providers/openai-speech.ts:31
The preset id. Names the provider in errors and on SpeechProvider.id. Default “openai”.
maxAudioBytes?
Section titled “maxAudioBytes?”optional maxAudioBytes?: number;Defined in: core/src/speech-core.ts:77
Largest audio accepted, in bytes. Default 32 MiB.
Inherited from
Section titled “Inherited from”maxInputChars?
Section titled “maxInputChars?”optional maxInputChars?: number;Defined in: core/src/speech-core.ts:75
Longest text, in UTF-16 units (JavaScript’s .length). Default 4,096.
Over it is refused before any request. Never silently cut.
Inherited from
Section titled “Inherited from”model: string;Defined in: core/src/providers/openai-speech.ts:25
optional path?: string;Defined in: core/src/providers/openai-speech.ts:29
Default /v1/audio/speech, or /audio/speech when the base already ends in a version.
siteName?
Section titled “siteName?”optional siteName?: string;Defined in: core/src/attribution.ts:15
App name, sent as X-Title (e.g. “Your App”).
Inherited from
Section titled “Inherited from”siteUrl?
Section titled “siteUrl?”optional siteUrl?: string;Defined in: core/src/attribution.ts:13
Site URL, sent as HTTP-Referer (e.g. “https://your.app”).
Inherited from
Section titled “Inherited from”timeoutMs?
Section titled “timeoutMs?”optional timeoutMs?: number;Defined in: core/src/speech-core.ts:79
One deadline for the whole call, headers and body. Default 120,000.
Inherited from
Section titled “Inherited from”voice?
Section titled “voice?”optional voice?: string;Defined in: core/src/providers/openai-speech.ts:33
Used when a call names no voice.