Repository navigation
feat(tts): document assemblyai-tts-1-1 and its 25 languages - #377
Open
aleks-mitov wants to merge 4 commits into
Open
aleks-mitov wants to merge 4 commits into
aleks-mitov wants to merge 4 commits into
Conversation
`TTSConfig.model_id` and `language` are plain strings that the SDK sends as given, so the new model and its languages already work; only the docs named one model and six languages. The docstrings, README and CLAUDE.md now describe both models, the 19 new languages, the default model of each language and the voices that work only on the new model. Tests check that `model_id="assemblyai-tts-1-1"` and the new languages reach the HTTP body and the session query unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsYWv3Dp7aYzo2QKheqPKU
The docs said a request without `voice_id` speaks with `aai-jane`. The API uses the default voice of the request's language: `aai-kyla` in English (also when `language` is left out), `aai-antonioluis` in Spanish, `aai-magdalena` in German, `aai-giada` in Italian, `aai-nelson` in Portuguese and `aai-donatien` in French. The `TTSConfig` and `TTSResponseInfo.voice_id` docstrings, the README and CLAUDE.md now say so, and that the defaults may change. Examples that pick `aai-jane` explicitly are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsYWv3Dp7aYzo2QKheqPKU
At launch the API runs a request without model_id on assemblyai-tts-1-1 in all 25 languages, the six of assemblyai-tts-1 included. The model_id and language docstrings, the README and CLAUDE.md said assemblyai-tts-1 stays the default of those six and told readers to set model_id="assemblyai-tts-1-1" to use the newer model there. They now say that assemblyai-tts-1-1 is the default everywhere, that model_id is best left out, and that model_id="assemblyai-tts-1" keeps one of the six on the older model. The README example leaves model_id out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsYWv3Dp7aYzo2QKheqPKU
TTSWord.word said every entry of WordBoundaries is a whitespace-delimited token. In japanese, chinese and cantonese the API makes each Han, hiragana or katakana character a unit of its own, keeps a run of other letters or digits whole and attaches punctuation, so a Japanese sentence without spaces gives one entry per character. The docstring now says so, and TTSWordBoundariesEvent notes that a long request in those languages often gets no timings, so flushing every sentence or two keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsYWv3Dp7aYzo2QKheqPKU
ccampbell-aai
approved these changes
Dec 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
The Text-to-Speech API has a new model,
assemblyai-tts-1-1, which speaks 25 languages: the six ofassemblyai-tts-1(english,spanish,german,french,italian,portuguese) and 19 more (japanese,vietnamese,chinese,swedish,dutch,russian,danish,hindi,arabic,norwegian,romanian,finnish,korean,urdu,catalan,hebrew,turkish,cantonese,afrikaans). It becomes the default model in all 25 languages, so leavingmodel_idout is the recommended path;model_id="assemblyai-tts-1"keeps one of the first six languages on the older model. Library voices of the 19 new languages work only onassemblyai-tts-1-1; the voices of the first six work on both models.The SDK needs no code change for this.
TTSConfig.model_idandTTSConfig.languageare plainstrfields that the SDK sends unchanged (in the JSON body ofTextToSpeech, in the query string ofTTSSession), and the SDK has no voice or model listing helper, so the new model, its languages and its voices already work with the released SDK. What was out of date is the documentation, which named one model and six languages:TTSConfig.model_id,TTSConfig.languageandTTSResponseInfo.modeldocstrings, which also feed the generated API referenceaai.TTSConfigentry__version__1.10.14 to 1.10.15, which the Version Bump Check asks of every PR (the README is the PyPI description, so the docs reach users with a release)No client-side validation is added: the API stays the authority on which
model_idandlanguagevalues are valid.Default voice fix
The docs said a request without
voice_idspeaks withaai-jane. The API uses the default voice of the request's language:aai-kylain English (also whenlanguageis left out),aai-antonioluisin Spanish,aai-magdalenain German,aai-giadain Italian,aai-nelsonin Portuguese andaai-donatienin French, and these defaults may change. TheTTSConfigclass andTTSConfig.voice_iddocstrings, theTTSResponseInfo.voice_iddocstring, the README option list and theaai.TTSConfigentry in CLAUDE.md now say so. Examples that chooseaai-janeexplicitly are unchanged.Testing
test_model_id_and_language_reach_the_api_as_given(japanese,cantonese,afrikaanswithmodel_id="assemblyai-tts-1-1", checking the request body and the response fields) andtest_model_id_and_language_go_in_the_query_as_given(the session's query string)pytest -n auto --cov=assemblyai(the tox command) on Python 3.12 with the latest dependencies: 1040 passed (run again after the default voice fix: 1040 passed)ruff format --checkandruff checkwith ruff 0.3.5 (the CI version) on the changed files: cleanmypy1.5.1 on the changed package files: no issuesscripts/build_api_docs.shanddocs/check_api_docs.py: API reference OK (10 pages); ruff, mypy and the API reference check also rerun clean after the default voice fixLive verification
Run against the pre-production API with the SDK built from this branch: sessions and HTTP requests with and without
model_id, the default voices, voices of Japanese, Chinese, Cantonese, Korean, Arabic and Hindi with word timings, and the error codes (unknown model, a model that does not speak the language, unknown voice, unknown language, a voice not paired with the model, an uppercase model name). Word units in Japanese, Chinese and Cantonese are one Han or kana character each, now documented on the word type.Merge timing
Please merge only once the production rollout of
assemblyai-tts-1-1is confirmed complete, since these docs describe it as the default model of every language in both data zones.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsYWv3Dp7aYzo2QKheqPKU