Skip to content
providerkit
GitHub

PresetSpeech

Defined in: core/src/presets.ts:65

What a preset’s endpoint can do besides chat: make speech. Absent means it cannot, or that nobody has read its documentation yet. createSpeechProvider (from @providerkit/core/speech) is what reads this.

These are facts about the vendor’s own host. A caller who points the preset at another host with baseUrl gets none of the defaults below, because a default model or voice belongs to the host that documented it.

optional baseUrl?: string;

Defined in: core/src/presets.ts:68

Defaults to the preset’s own baseUrl.


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

Defined in: core/src/presets.ts:80

For a host whose accepted formats do not include “wav”.


optional defaultModel?: string;

Defined in: core/src/presets.ts:70

Only when the vendor documents one.


optional defaultVoice?: string;

Defined in: core/src/presets.ts:74

A default voice, only when one voice works on every listed model.


optional maxInputChars?: number;

Defined in: core/src/presets.ts:78

The vendor’s documented text limit. Absent: the package’s 4,096.


optional models?: readonly string[];

Defined in: core/src/presets.ts:72

Representative model ids, as in ProviderPreset.models.


shape: SpeechShape;

Defined in: core/src/presets.ts:66


optional voices?: readonly string[];

Defined in: core/src/presets.ts:76

The vendor’s full voice list, only when it publishes one.