Repository navigation
Conversation
dvmarchuk
marked this pull request as draft
November 19, 2026 03:37
The STT-3.7 migration guide sends `language_codes` on POST /v2/transcript, and the API accepts it, but TranscriptOptionalParams did not declare it. TypeScript rejected the request and suggested `language_code`, which sends a single-language request instead. Also correct the `disfluencies` doc comment: it defaults to true when `speech_models` includes `assemblyai-stt-3-7`. Fixes AssemblyAI#215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dvmarchuk
force-pushed
the
fix/transcript-language-codes
branch
from
November 19, 2026 15:29
0593344 to
c87dca8
Compare
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.
Fixes #215
Summary
language_codesexisted only on theTranscriptresponse, so the request from the STT-3.7 migration guide did not compile. This adds it to the request params.The
language_codesdoc comment says what the guide says: it can't be combined withlanguage_codeorlanguage_detection, any number of languages onassemblyai-stt-3-7, at most two (one"en") onuniversal-2. Version bumped to 4.43.5 with a CHANGELOG entry.Evidence
New test
tests/unit/language-codes.test.ts, at the publictranscripts.submit()/transcribe()API:TS2561: Object literal may only specify known properties, but 'language_codes' does not exist in type 'TranscribeParams'. Did you mean to write 'language_code'?(0 tests run)After:
Tests: 2 passed, 2 totalpnpm lintandpnpm buildpass. Inpnpm test:unit, 3 user-agent tests intests/unit/utils.test.tsfail on Node 22.21.1; they fail the same way onmainwithout this change.Merge Danger
Door: two-way
Types and doc comments only. No runtime code changes; the SDK already sent unknown fields through.
Blast Radius: none
An optional field is added, so no existing code stops compiling.
🤖 Generated with Claude Code