Skip to content

feat(tts): document assemblyai-tts-1-1 and its 25 languages - #377

Open
aleks-mitov wants to merge 4 commits into
masterfrom
aleks/tts-1-1
Open

aleks-mitov wants to merge 4 commits into
masterfrom
aleks/tts-1-1

Conversation

@aleks-mitov

@aleks-mitov aleks-mitov commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

The Text-to-Speech API has a new model, assemblyai-tts-1-1, which speaks 25 languages: the six of assemblyai-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 leaving model_id out 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 on assemblyai-tts-1-1; the voices of the first six work on both models.

The SDK needs no code change for this. TTSConfig.model_id and TTSConfig.language are plain str fields that the SDK sends unchanged (in the JSON body of TextToSpeech, in the query string of TTSSession), 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.language and TTSResponseInfo.model docstrings, which also feed the generated API reference
  • README: the Text-to-Speech option list, plus a short "Speak another language with assemblyai-tts-1-1" example
  • CLAUDE.md: the aai.TTSConfig entry
  • __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_id and language values are valid.

Default voice fix

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, and these defaults may change. The TTSConfig class and TTSConfig.voice_id docstrings, the TTSResponseInfo.voice_id docstring, the README option list and the aai.TTSConfig entry in CLAUDE.md now say so. Examples that choose aai-jane explicitly are unchanged.

Testing

  • New tests: test_model_id_and_language_reach_the_api_as_given (japanese, cantonese, afrikaans with model_id="assemblyai-tts-1-1", checking the request body and the response fields) and test_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 --check and ruff check with ruff 0.3.5 (the CI version) on the changed files: clean
  • mypy 1.5.1 on the changed package files: no issues
  • scripts/build_api_docs.sh and docs/check_api_docs.py: API reference OK (10 pages); ruff, mypy and the API reference check also rerun clean after the default voice fix

Live 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-1 is 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

aleks-mitov and others added 4 commits December 4, 2026 17:38
`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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants