Python uses text to speech
Text-to-Speech (TTS) API Guide
Overview
speech
endpoint, powered by TTS models, to achieve the following functionalities:Important Note: You must inform users that the voice they hear is AI-generated and not a human voice.
Basic Usage
Basic Example
Features
Audio Quality Options
Available Voices
Supported Output Formats
Format | Features | Use Case |
---|---|---|
MP3 | Default format | General-purpose scenarios |
Opus | Low latency | Streaming media and communication |
AAC | Efficient compression | Playback on mobile devices |
FLAC | Lossless compression | Audio archiving |
WAV | Uncompressed | Low-latency applications |
PCM | Raw sampling | 24kHz, 16-bit signed |
Real-Time Audio Streaming
Supported Languages
Note: The current voices are primarily optimized for English.