-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Updated Speechmatics STT integration #4359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4259538
Updated to use Voice SDK.
sam-s10s d4d1662
Include missing updates
sam-s10s 7655115
format update
sam-s10s c43b6d9
remove messages not needed
sam-s10s 7681cd2
mypy fixes
sam-s10s 096fc27
Updated for using `FIXED` as an end of turn mode.
sam-s10s fd59362
Ann START_ and END_OF_TURN messages by default
sam-s10s d047bad
remove extra debugging
sam-s10s c9dd7cf
Resolved comments in PR.
sam-s10s 9959505
support for external VAD (e.g. Silero)
sam-s10s 5bd61c5
remove debug code
sam-s10s 8c96976
doc update
sam-s10s 3bf80a8
updated docs
sam-s10s d2e7dbc
merged with PR
sam-s10s 8576e2f
fixes from Devin AI
sam-s10s 8d221b1
Merge branch 'main' into smx/stt-voice-sdk
sam-s10s ee807ac
linting updates from CI
sam-s10s 1569d05
doc update
sam-s10s e306249
fix from Devin AI
sam-s10s f1932e5
Updated Devin AI errors
sam-s10s 6ed69eb
Added support for audio metrics
sam-s10s a3d36dc
remove redundant disconnect() on Speechmatics client
sam-s10s 24d4a6b
restore disconnect()
sam-s10s a8afc2d
attribute error
sam-s10s 628091c
Show deprecation warnings for migrated parameters.
sam-s10s f939ccc
type checking
sam-s10s ba68543
fix to AgentServerMessageType
sam-s10s 38ed1b9
fix missing dependency
sam-s10s 8d1c488
Squashed commit of the following:
sam-s10s 434500d
remove debug messages
sam-s10s 3b01689
ignore `on` message
sam-s10s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 SpeechHandle.allow_interruptions not restored if session._update_activity raises
In the
InlineTask.__await_impl__method,speech_handle.allow_interruptionsis set toFalsebefore entering thetryblock, but restoration only occurs in thefinallyblock. Ifsession._update_activity()raises an exception (line 790), the finally block never executes andallow_interruptionsremains permanently disabled.Click to expand
Code flow showing the issue:
Impact:
If
_update_activityfails for any reason (network issues, invalid state, etc.), the speech handle will be stuck withallow_interruptions=False, preventing all future interruptions for that speech. This could cause the agent to become uninterruptible, leading to a poor user experience where users cannot stop the agent from speaking.(Refers to lines 768-790)
Recommendation: Move the
speech_handle.allow_interruptions = Falseassignment inside the try block, or wrap the entire section from line 768 to the try block in a try/finally to ensure restoration happens regardless of where exceptions occur.Was this helpful? React with 👍 or 👎 to provide feedback.