Languages
Every voice speaks all 60 languages below. You don’t pick a voice per language: pick the voice you like, and the language comes from the text, or from language when you set it.
Detection
Section titled “Detection”Leave language out and it is detected from the text (its first 2,000 characters). When the text is too short to tell, or the detected language is not one of the 60, English is used.
One language is used for the whole request. For text that mixes languages, send each language as its own request and join the audio.
Setting the language
Section titled “Setting the language”Set language when you know it, especially for short text, where detection has little to go on and may fall back to English.
- An ISO 639-1 code, such as
en,frorja. Case does not matter. - A region suffix is accepted and dropped:
fr-CAis spoken asfr,pt_BRaspt. - A few other codes are accepted for the same language:
nbandnnforno,iwforhe,filfortl,inforid. - Any other code is refused with
400 unsupported_language.
curl https://api.aderra.ai/v1/audio/speech \ -H "Authorization: Bearer $ADERRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "aderra-voice-1", "voice": "Hazel", "input": "Bonjour !", "language": "fr"}' \ --output bonjour.mp3audio = client.audio.speech.create( model="aderra-voice-1", voice="Hazel", input="Bonjour !", extra_body={"language": "fr"},)audio.write_to_file("bonjour.mp3")const audio = await client.audio.speech.create({ model: 'aderra-voice-1', voice: 'Hazel', input: 'Bonjour !', language: 'fr',});language is not an OpenAI parameter, so the Python SDK sends it through extra_body. The Node SDK sends extra fields as they are; in TypeScript, its types don’t know language, so add // @ts-expect-error above the line or cast the body.
List the languages from code
Section titled “List the languages from code”GET /v1/audio/models returns them under data[0].languages, each with its code and English name, sorted by name. Any Aderra key works and the call is free.
curl -s https://api.aderra.ai/v1/audio/models \ -H "Authorization: Bearer $ADERRA_API_KEY" | jq '.data[0].languages'import os, requests
model = requests.get( "https://api.aderra.ai/v1/audio/models", headers={"Authorization": f"Bearer {os.environ['ADERRA_API_KEY']}"}, timeout=30,).json()["data"][0]
for lang in model["languages"]: print(lang["code"], lang["name"])const res = await fetch('https://api.aderra.ai/v1/audio/models', { headers: { Authorization: `Bearer ${process.env.ADERRA_API_KEY}` },});const [model] = (await res.json()).data;for (const { code, name } of model.languages) console.log(code, name);Supported languages
Section titled “Supported languages”Names as GET /v1/audio/models gives them.
| Language | Code | Also accepted |
|---|---|---|
| Afrikaans | af |
|
| Albanian | sq |
|
| Arabic | ar |
|
| Azerbaijani | az |
|
| Bangla (Bengali) | bn |
|
| Basque | eu |
|
| Belarusian | be |
|
| Bosnian | bs |
|
| Bulgarian | bg |
|
| Catalan | ca |
|
| Chinese | zh |
|
| Croatian | hr |
|
| Czech | cs |
|
| Danish | da |
|
| Dutch | nl |
|
| English | en |
|
| Estonian | et |
|
| Filipino (Tagalog) | tl |
fil |
| Finnish | fi |
|
| French | fr |
|
| Galician | gl |
|
| German | de |
|
| Greek | el |
|
| Gujarati | gu |
|
| Hebrew | he |
iw |
| Hindi | hi |
|
| Hungarian | hu |
|
| Indonesian | id |
in |
| Italian | it |
|
| Japanese | ja |
|
| Kannada | kn |
|
| Kazakh | kk |
|
| Korean | ko |
|
| Latvian | lv |
|
| Lithuanian | lt |
|
| Macedonian | mk |
|
| Malay | ms |
|
| Malayalam | ml |
|
| Marathi | mr |
|
| Norwegian | no |
nb, nn |
| Persian | fa |
|
| Polish | pl |
|
| Portuguese | pt |
|
| Punjabi | pa |
|
| Romanian | ro |
|
| Russian | ru |
|
| Serbian | sr |
|
| Slovak | sk |
|
| Slovenian | sl |
|
| Spanish | es |
|
| Swahili | sw |
|
| Swedish | sv |
|
| Tamil | ta |
|
| Telugu | te |
|
| Thai | th |
|
| Turkish | tr |
|
| Ukrainian | uk |
|
| Urdu | ur |
|
| Vietnamese | vi |
|
| Welsh | cy |