feat(voice): forced-EOU rework and Smart Turn no-signal handling#123
Draft
sam-s10s wants to merge 1 commit into
Draft
feat(voice): forced-EOU rework and Smart Turn no-signal handling#123sam-s10s wants to merge 1 commit into
sam-s10s wants to merge 1 commit into
Conversation
Make forced end-of-utterance the default path: use_forced_eou defaults to True and is enforced in validate_config (now an explicit method, not a pydantic validator). Collapse _uses_fixed/forced_eou into a single _use_forced_eou flag and rename _uses_eot_prediction -> _emit_eot_predictions. Add SMART_TURN_NO_SIGNAL annotation + penalty for when Smart Turn is active but has no result yet.
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
The core turn-taking rework from the
voice/v0.2.9-rc3pre-release: make forced end-of-utterance (FEOU) the default path and simplify the surrounding state, plus add a "no signal" path for Smart Turn.Changes
Forced-EOU
EndOfTurnConfig.use_forced_eounow defaults toTrueand is enforced —validate_configraises if it isFalse.validate_configis now an explicit method (called after preset/overlay merging) instead of a pydantic@model_validator(mode="after"), so intermediate configs can be built without tripping cross-field validation. Removes the old "FIXED + FEOU without VAD" rule._uses_fixed_eou/_uses_forced_eouinto a single_use_forced_eouflag; renames_uses_eot_prediction→_emit_eot_predictions.finalize()(drops the unusedend_of_turnarg), the EOU listener registration, and the EOT-prediction gating. Renames_vad_evaluation→_speaker_start_stop_evaluation.EndOfTurnConfig(use_forced_eou=True).Smart Turn "no signal"
AnnotationFlags.SMART_TURN_NO_SIGNAL, applied when Smart Turn is active but has no result yet when the TTL fires (distinguished from a genuine false prediction /result.error).Tests
test_17_eou_feou; newtest_18_feou_timestamp,test_19_no_feou_fix; offline tests switched to settingclient._use_forced_eou = Falseand droppedEndOfTurnConfig(use_forced_eou=False)(now invalid).Notes
tests/voice/assets/audio_10_16kHz.wav(~560 KB) is added fortest_19and exceeds the repo's 500 KB pre-commit limit. Needs a decision before merge (git-LFS, raise the limit, or a smaller fixture) — committed here with--no-verify.sdk/voice/speechmatics/voice/_client.py; sibling PRspr/voice-ws-headersandpr/voice-8khztouch disjoint regions of the same file (clean merge, possible trivial rebase)._models.py/_client.py.Test plan
test_17/test_18/test_19pass