Skip to content
providerkit
GitHub

createSpeechProvider

function createSpeechProvider(id, config): SpeechProvider;

Defined in: core/src/providers/speech-factory.ts:46

Build a speech provider for a preset that can speak. A preset without a speech row throws, naming the ones that do (SPEECH_PRESET_IDS).

const speech = createSpeechProvider("google", { apiKey });
const { bytes, mimeType } = await speech.synthesize({ text: "Click Settings." });
Parameter Type
id | "openrouter" | "openai" | "anthropic" | "google" | "google-openai" | "deepseek" | "groq" | "mistral" | "xai" | "together" | "fireworks" | "cerebras" | "moonshot" | "zhipu" | "minimax" | "minimax-openai" | "nvidia" | "perplexity" | "deepinfra" | "nebius" | "novita" | "chutes" | "siliconflow" | "volcengine" | "stepfun" | "digitalocean" | "crusoe" | "baseten" | "huggingface" | "zai" | "zai-openai" | "opencode-go" | "qwen" | "opencode-zen" | "kimi" | "kimi-openai" | "alibaba-coding-plan" | "qwen-token-plan-openai" | "alibaba" | "qwen-api" | "ollama" | "lmstudio" | "vllm" | "claude" | "chatgpt" | "grok" | "kimi-plan" | "github-copilot" | "antigravity"
config SpeechProviderConfig

SpeechProvider