Skip to main content

Interface: OpenAITextToSpeechProviderConfig

Defined in: packages/agentos/src/io/speech/providers/OpenAITextToSpeechProvider.ts:16

Configuration for the OpenAITextToSpeechProvider.

See​

Properties​

apiKey​

apiKey: string

Defined in: packages/agentos/src/io/speech/providers/OpenAITextToSpeechProvider.ts:21

OpenAI API key used for authentication. Sent as Authorization: Bearer <apiKey>.


baseUrl?​

optional baseUrl: string

Defined in: packages/agentos/src/io/speech/providers/OpenAITextToSpeechProvider.ts:28

Base URL for the OpenAI API. Override for proxies, Azure OpenAI, or compatible third-party endpoints.

Default​

'https://api.openai.com/v1'

fetchImpl()?​

optional fetchImpl: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Defined in: packages/agentos/src/io/speech/providers/OpenAITextToSpeechProvider.ts:51

Custom fetch implementation for dependency injection in tests.

Call Signature​

(input, init?): Promise<Response>

MDN Reference

Parameters​
input​

RequestInfo | URL

init?​

RequestInit

Returns​

Promise<Response>

Call Signature​

(input, init?): Promise<Response>

MDN Reference

Parameters​
input​

string | Request | URL

init?​

RequestInit

Returns​

Promise<Response>

Default​

globalThis.fetch

model?​

optional model: string

Defined in: packages/agentos/src/io/speech/providers/OpenAITextToSpeechProvider.ts:39

Default TTS model. tts-1 is optimized for real-time, tts-1-hd for quality.

OpenAI removes tts-1, tts-1-hd and the gpt-4o-mini-tts snapshots on 2027-01-06. The replacement it names, gpt-realtime-2.1-mini, runs only on the Realtime API and is not accepted by /v1/audio/speech, which this provider calls.

Default​

'tts-1'

voice?​

optional voice: string

Defined in: packages/agentos/src/io/speech/providers/OpenAITextToSpeechProvider.ts:45

Default voice identifier. See OPENAI_VOICES for available options.

Default​

'nova'