feat(types): add short_file_diarization_method to SpeakerOptions - #220
feat(types): add short_file_diarization_method to SpeakerOptions#220ccampbell-aai wants to merge 1 commit into
Conversation
Exposes the short-file diarization method API parameter (deliberate | balanced | conservative | aggressive), completing the pair started in PR #161 — its long_file_diarization_method half already landed via the #162 sync, which is also what left #161 conflicted. Field definition and tests carried over from #161. Supersedes and closes #161. Co-Authored-By: zack <[email protected]> Co-Authored-By: Claude Fable 5 <[email protected]>
Live E2E verificationVerified end-to-end against the production API (beyond the unit tests): Request — real transcription submitted with the new field via this branch's SDK code; serialized request body contained: "speaker_options": {"short_file_diarization_method": "aggressive", "long_file_diarization_method": "experimental"}Accepted & echoed — transcript "speaker_options": {"short_file_diarization_method": "aggressive", "long_file_diarization_method": "experimental", ...}Parsed & applied server-side — confirmed via internal API logs that the raw request body arrived with the parameter, the diarization routing evaluated it (this job took the short-file path, so 🤖 Generated with Claude Code |
Summary
Supersedes #161 (with credit — the field definition and tests are carried over from @zkleb-aai's PR).
Adds
short_file_diarization_method: Optional[Literal["deliberate", "balanced", "conservative", "aggressive"]]toSpeakerOptions.Why supersede: #161 added two fields, but its
long_file_diarization_methodhalf already landed via the #162 internal sync (merged the same day #161 was opened), which is also what left #161 permanently conflicted. This PR carries over only the missing half, rebased on current master.Verified real: both diarization-method params are fully implemented API-side (async_api handlers, DTOs, TRS converter, and integration tests in the internal repo) — the SDK just never exposed the short-file one.
Testing
pytest tests/unit/test_speaker_options.py— 18 passed (3 new short_file tests + the all-options test extended, carried over from feat: add diarization method options to SpeakerOptions #161)ruff==0.3.5format + check clean,mypy==1.5.1clean on both changed files🤖 Generated with Claude Code