Convert text to speech using the specified voice and parameters
text_to_speechConvert text to speech with customizable voice, emotion, volume, pitch, and tempo. Adjust audio output using TTS models and optional loudness normalization.
Instructions
Convert text to speech using the specified voice and parameters
Args:
voice_id: ID of the voice to use
text: Text to convert to speech
model: TTS model to use (ssfm-v21 or ssfm-v30, default: ssfm-v30)
emotion_type: For ssfm-v30: 'preset' for explicit emotion or 'smart' for context-aware inference (default: preset)
emotion_preset: Emotion preset type. v21: normal/happy/sad/angry. v30: adds whisper/toneup/tonedown (default: normal)
emotion_intensity: Intensity of the emotion, between 0.0 and 2.0 (default: 1.0)
previous_text: For smart mode - previous context text for emotion inference
next_text: For smart mode - next context text for emotion inference
volume: Audio volume level, between 0 and 200 (default: 100)
audio_pitch: Audio pitch adjustment, between -12 and 12 (default: 0)
audio_tempo: Audio playback speed, between 0.5 and 2.0 (default: 1.0)
audio_format: Audio format, either 'wav' or 'mp3' (default: wav)
target_lufs: Optional absolute loudness normalization target in LUFS (-70.0 ~ 0.0).
Mutually exclusive with a custom volume value on this non-streaming endpoint.
Returns:
Local mode: path to the saved audio file.
Remote mode: dict with audio_url and expires_in_seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| model | No | ssfm-v30 | |
| volume | No | ||
| voice_id | Yes | ||
| next_text | No | ||
| audio_pitch | No | ||
| audio_tempo | No | ||
| target_lufs | No | ||
| audio_format | No | wav | |
| emotion_type | No | preset | |
| previous_text | No | ||
| emotion_preset | No | normal | |
| emotion_intensity | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |