/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_id
for 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
The x-api-key
is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.
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.
A unique identifier for the specific voice to use for speech synthesis in the target language. Each voice has distinct characteristics including tone, accent, and speaking style.
The language code of the input text (e.g., 1
for English, 54
for Spanish). Must match one of the supported language codes.
1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, 10
, 11
, 12
, 13
, 14
, 15
, 16
, 17
, 18
, 19
, 20
, 21
, 22
, 23
, 24
, 25
, 26
, 27
, 28
, 29
, 30
, 31
, 32
, 33
, 34
, 35
, 36
, 37
, 38
, 39
, 40
, 41
, 42
, 43
, 44
, 45
, 46
, 47
, 48
, 49
, 50
, 51
, 52
, 53
, 54
, 55
, 56
, 57
, 58
, 59
, 60
, 61
, 62
, 63
, 64
, 65
, 66
, 67
, 68
, 69
, 70
, 71
, 73
, 74
, 75
, 76
, 78
, 79
, 80
, 81
, 82
, 83
, 84
, 85
, 86
, 87
, 88
, 90
, 91
, 92
, 93
, 94
, 95
, 96
, 97
, 98
, 99
, 100
, 101
, 102
, 103
, 104
, 106
, 107
, 108
, 109
, 110
, 111
, 112
, 113
, 114
, 115
, 116
, 117
, 118
, 119
, 120
, 121
, 122
, 123
, 124
, 125
, 126
, 127
, 128
, 129
, 130
, 131
, 132
, 133
, 134
, 135
, 136
, 139
, 140
, 141
, 142
, 143
, 144
, 145
, 146
, 148
The language code for the desired output translation and speech (e.g., 76
for French, 88
for Japanese). This the language of translation.
1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, 10
, 11
, 12
, 13
, 14
, 15
, 16
, 17
, 18
, 19
, 20
, 21
, 22
, 23
, 24
, 25
, 26
, 27
, 28
, 29
, 30
, 31
, 32
, 33
, 34
, 35
, 36
, 37
, 38
, 39
, 40
, 41
, 42
, 43
, 44
, 45
, 46
, 47
, 48
, 49
, 50
, 51
, 52
, 53
, 54
, 55
, 56
, 57
, 58
, 59
, 60
, 61
, 62
, 63
, 64
, 65
, 66
, 67
, 68
, 69
, 70
, 71
, 72
, 73
, 74
, 75
, 76
, 77
, 78
, 79
, 80
, 81
, 82
, 83
, 84
, 85
, 86
, 87
, 88
, 89
, 90
, 91
, 92
, 93
, 94
, 95
, 96
, 97
, 98
, 99
, 100
, 101
, 102
, 103
, 104
, 105
, 106
, 107
, 108
, 109
, 110
, 111
, 112
, 113
, 114
, 115
, 116
, 117
, 118
, 119
, 120
, 121
, 122
, 123
, 124
, 125
, 126
, 127
, 128
, 129
, 130
, 131
, 132
, 133
, 134
, 135
, 136
, 139
, 140
, 141
, 142
, 143
, 144
, 145
, 146
, 147
, 148
, 149
, 150
The simulated age of the speaker in years, which influences voice characteristics. Defaults to 28
if not specified. Set to null to use the default voice age.
The level of formality to use for the translation. Values range from casual (1
), with a default of 2
(formal). This affects the translation's tone and word choice based on cultural norms of the target language.
1
, 2
The gender of the synthesized voice. Influences voice characteristics based on typical speech patterns. Defaults to 1
(typically representing male).
The gender of the speaker.
0
, 1
, 2
, 9
An optional list of dictionary IDs selected by the user. Each entry must be an integer corresponding to a valid dictionary ID. If provided, at least one ID is required.
1
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 - 255
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 - 5000
Specify the organizational folder within your CAMB.AI workspace where this task should be created and stored. The folder must already exist in your workspace and be accessible through your current API key authentication. This helps maintain project organization by grouping related tasks together, making it easier to manage and locate your projects.
x >= 1
Response
Successful Response
The response is of type any
.