Skip to content
providerkit
GitHub

GeminiSpeechConfig

Defined in: core/src/providers/gemini-speech.ts:23

apiKey: string;

Defined in: core/src/providers/gemini-speech.ts:24


optional baseUrl?: string;

Defined in: core/src/providers/gemini-speech.ts:27

Default https://generativelanguage.googleapis.com.


optional fetchImpl?: FetchLike;

Defined in: core/src/providers/gemini-speech.ts:44

Swapped in tests, or to route through a proxy. Defaults to global fetch.


optional format?: "wav" | "pcm" | "mp3" | "opus" | "aac" | "flac";

Defined in: core/src/providers/gemini-speech.ts:35

“wav” (the default) or “pcm”. Gemini makes no other format.


optional headers?: Record<string, string>;

Defined in: core/src/providers/gemini-speech.ts:42


optional id?: string;

Defined in: core/src/providers/gemini-speech.ts:31

The preset id. Names the provider in errors and on SpeechProvider.id. Default “google”.


optional maxAudioBytes?: number;

Defined in: core/src/speech-core.ts:77

Largest audio accepted, in bytes. Default 32 MiB.

SpeechLimits.maxAudioBytes


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.

SpeechLimits.maxInputChars


optional maxOutputTokens?: number;

Defined in: core/src/providers/gemini-speech.ts:41

Caps the audio tokens generated. Not sent unless set. Google enforces it (checked live on 2026-11-03): a clip cut by it comes back incomplete, which is reported as an error that carries the usage billed. The text limit is still the bound on cost you can rely on.


model: string;

Defined in: core/src/providers/gemini-speech.ts:25


optional path?: string;

Defined in: core/src/providers/gemini-speech.ts:29

Default /v1beta/interactions.


optional timeoutMs?: number;

Defined in: core/src/speech-core.ts:79

One deadline for the whole call, headers and body. Default 120,000.

SpeechLimits.timeoutMs


optional voice?: string;

Defined in: core/src/providers/gemini-speech.ts:33

Used when a call names no voice.