Repository navigation
Conversation
…ation
- Add SpeechUnderstandingEffort enum ('low', 'medium') to specify task processing effort
- Expose effort parameter on SpeakerIdentificationRequest, TranslationRequest, and CustomFormattingRequest
- Expose force_translation parameter on TranslationRequest
- Export SpeechUnderstandingEffort from assemblyai and assemblyai.types
- Document speech_understanding in TranscriptionConfig options in CLAUDE.md
- Add comprehensive unit tests in tests/unit/test_speech_understanding.py
- Bump version to 1.6.2
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.
Summary
Adds support for the Speech Understanding
effortparameter across all feature requests (SpeakerIdentificationRequest,TranslationRequest, andCustomFormattingRequest) as well asforce_translationonTranslationRequest, matching AssemblyAI API capabilities and restoring parity withassemblyai-node-sdk.Previously, if a user configured
effort(e.g."medium"orSpeechUnderstandingEffort.medium) orforce_translation, the parameters were silently dropped by Pydantic during model instantiation or assignment toTranscriptionConfig.speech_understanding.Changes
SpeechUnderstandingEffortenum: AddedSpeechUnderstandingEffort(str, Enum)with"low"and"medium"values.SpeakerIdentificationRequest: Addedeffort: Optional[Union[SpeechUnderstandingEffort, str]] = None.TranslationRequest: Addedeffort: Optional[Union[SpeechUnderstandingEffort, str]] = Noneandforce_translation: Optional[bool] = False.CustomFormattingRequest: Addedeffort: Optional[Union[SpeechUnderstandingEffort, str]] = None.SpeechUnderstandingEffortinassemblyaiandassemblyai.types, and added to__all__.speech_understandingto theTranscriptionConfigoptions list inCLAUDE.md.tests/unit/test_speech_understanding.pycovering enum values, request instantiation, serialization withdict(exclude_none=True),TranscriptionConfigassignment, and response parsing.1.6.2.Testing
pytest tests/unitpasses (734 passed).ruff check .andruff format --check .pass cleanly on all modified files.