Example Usage
import { SpeechRequest } from "@openrouter/sdk/models";
let value: SpeechRequest = {
input: "Hello world",
model: "mistralai/voxtral-mini-tts-2603",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
input | string | :heavy_check_mark: | Text to synthesize | Hello world |
model | string | :heavy_check_mark: | TTS model identifier | mistralai/voxtral-mini-tts-2603 |
provider | models.SpeechRequestProvider | :heavy_minus_sign: | Provider-specific passthrough configuration | |
responseFormat | models.SpeechRequestResponseFormat | :heavy_minus_sign: | Audio output format | pcm |
speed | number | :heavy_minus_sign: | Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers. | 1 |
voice | string | :heavy_minus_sign: | Voice identifier (provider-specific). | en_paul_neutral |