기타 시나리오
API Overview
Conversational TTS is a next-generation low-latency speech synthesis service built on TRTC (Tencent Real-Time Communication), optimized for real-time conversational scenarios. It features ultra-low latency, high naturalness, voice cloning, and multilingual support, making AI sound like a real person. For more real-time audio/video services, visit the TRTC product page.
Try It Out
Resource | Description |
Enter text to synthesize speech online. Continuously updated with sample audio files. |
TTS Models and Voices
Recommended Model: flow_02_turbo
Item | Description |
Positioning | Primary TTS model for conversational scenarios. |
First-packet Latency | As low as 300 ms, ideal for real-time conversations and live dubbing. |
Naturalness | High audio quality with natural, conversational expression. |
Language Support | Chinese, English, Japanese, and Cantonese. |
Premium Voice Library | Comprehensive voice library covering four languages (Chinese, English, Japanese, and Cantonese), supporting use cases such as character dubbing, audiobooks, customer service, and announcements. |
Supported Language Codes (ISO 639-1)
The recommended model
flow_02_turbo currently supports the following languages. For the latest supported languages and future additions, refer to the API documentation.Language | Code |
Chinese | zh |
English | en |
Japanese | ja |
Cantonese | yue |
API Selection Guide
Scenario | Recommended API | Rationale |
Full text is available; lowest first-packet latency required | Stream and play audio as it is generated; 50–100 ms lower latency than non-streaming. | |
Offline playback, batch generation, or file export | Returns a complete audio file (PCM/WAV/MP3) for post-processing. | |
Custom voice required | Submit voice samples to obtain a VoiceId, then use it with any TTS API. |
Note:
Text generated incrementally by an LLM (streaming text): Use the SSE streaming API. Send synthesis requests in sentence or paragraph segments, with each segment playing independently, achieving a "think-while-speaking" conversational experience.
Post-processing required (editing/merging/noise reduction): Use the non-streaming API. WAV (lossless, widely compatible) or MP3 (smaller file size, suitable for distribution) is recommended as the output format; PCM is suitable for custom processing pipelines.
Both low latency and exportable files needed: Use the SSE streaming API for real-time playback to users, while asynchronously calling the non-streaming API to generate a complete audio file for archival or post-processing.
SSE Streaming Text-to-Speech API
This API performs streaming speech synthesis via Server-Sent Events (SSE), enabling simultaneous generation and playback in conversational scenarios to significantly reduce first-packet latency. It delivers 50–100 ms lower latency than non-streaming synthesis, making it ideal for latency-sensitive real-time conversations.
For full details, see SSE Streaming Text-to-Speech API, including complete parameter descriptions, request/response examples, and error codes.
Text-to-Speech API (Non-Streaming)
This API provides non-streaming speech synthesis, suitable for offline or asynchronous generation scenarios where latency is not critical. A single request returns complete audio data (PCM/WAV/MP3) for post-processing and file export.
For full details, see Text-to-Speech API (Non-Streaming), including complete parameter descriptions, request/response examples, and error codes.
Voice Cloning (Rapid Voice Replication)
This API allows you to submit a small number of voice samples (16 kHz mono WAV, 6–180 seconds) to create a custom cloned voice. The generated
VoiceId works identically to premium voice IDs and can be used directly with any speech synthesis API.For full details, see Voice Cloning, including complete parameter descriptions, request/response examples, and error codes.
Note:
The Voice Cloning service is currently available free of charge for a limited time. For future pricing details, see the billing documentation.
When using this service to synthesize a specific voice, you authorize Tencent Cloud to use the audio and voice data you provide or upload for speech synthesis replication. You may request deletion of uploaded content at any time; once deleted, no data will be retained.
Concurrency Limits
Limit Type | Default Maximum |
QPS (Queries Per Second) | 20 |
Concurrent Channels | 100 |
Note:
All speech synthesis tasks under the same SDKAppID share a single concurrency pool, both QPS and concurrent channels are counted collectively, regardless of the calling source. If you require higher QPS or concurrency limits, please contact us.
Sample Code
The official sample repository provides complete examples in both Python and Node.js, covering all three APIs mentioned above. We recommend integrating directly based on these samples.
Service Agreement Notice
When using Text-to-Speech (TTS) and Voice Cloning features, you must ensure the following:
Input materials are lawful and compliant — they must not contain any content that violates applicable laws or regulations. You must not input unauthorized personal information of natural persons, unauthorized intellectual property data, trade secrets, or other restricted data.
You possess lawful authorization — input materials must be owned by you or you must have obtained sufficient, necessary, and valid legal permission and authorization from the corresponding rights holders. Materials must not infringe upon any third-party legal rights (including but not limited to intellectual property rights, portrait rights, reputation rights, privacy rights, and trade secrets). You shall be solely responsible for handling and bearing any breach of contract, infringement disputes, or legal liabilities arising from non-compliance.
