Create Translated Text-to-Speech
Creates a task to translate input text and generate corresponding speech audio
/translation-result/{run_id}: Returns the translated text./tts-result/{run_id}: Returns the generated voiceover audio
How It Works
When you submit a request to this endpoint, our system processes your input text through a streamlined workflow:- First, the system creates a dedicated task and returns a unique
task_idfor tracking. - Your source text is then accurately translated to the target language using advanced neural machine translation models that preserve meaning andn context.
- Finally, the translated text is converted into natural-sounding speech using language-specific voice models that capture the appropriate pronunciation and intonation of the target language.
- You can monitor the status of your request by polling the
/translated-tts/{task_id}endpoint until processing is complete.
Creating Your First Translated Text-to-Speech Request
Letโs examine how to initiate a translated text-to-speech task using Python:Monitoring Your Translation and Speech Generation Progress
After submission, your task enters our processing pipeline. You can monitor the progress by polling the status endpoint:Retrieving Your Results
Once your task is complete, you can retrieve both the translated text and the generated audio using the provided run_id:Best Practices for Translated Text-to-Speech
To achieve the highest quality results for your multilingual audio content:- Provide Clear Source Text: Ensure your source text is free of grammatical errors, unusual abbreviations, or ambiguous phrases to improve translation accuracy.
- Consider Cultural Context: Be mindful of cultural references that may not translate effectively across languages, and adapt your content accordingly.
- Use Appropriate Sentence Length: For optimal speech generation, break long, complex sentences into shorter ones, especially for languages that differ structurally from the source.
Supported Languages & Voices
Our system supports a wide range of language pairs for translation and speech synthesis. The quality and naturalness of speech may vary depending on the specific language combinations. Checkout the/target-languages endpoint for a list of supported languages and /list-voices endpoint for a list of available voices which includes public voices and your own custom voices.Authorizations
Body
Parameters for initiating a translation and text-to-speech task, including source text, language preferences, and voice characteristics.
The input text content that you want to translate and convert to speech. Provide clear, well-structured text for optimal results.
The language of the input text. Pass a locale tag (en-us, fr-fr, es-es). Numeric language IDs (1 or "1") still work but are deprecated. See all source languages.
"en-us"
The target output language. Pass a locale tag (fr-fr, es-es, de-de). Numeric language IDs still work but are deprecated. See all target languages.
"fr-fr"
Enter a distinctive name for your project that reflects its purpose or content. This name will be displayed in your CAMB.AI workspace dashboard and used to organize related assets, transcriptions, etc.. . Choose something memorable that helps you quickly identify this specific project among your other voice, audio and localization tasks.
3 - 255null
Provide details about your project's goals and specifications. Include information such as the target languages for translation or dubbing, desired voice characteristics, emotional tones to capture, or specific audio processing requirements, outlining the workflow here can serve as valuable documentation for organizational purposes.
3 - 5000null
Response
Successful Response