-
Notifications
You must be signed in to change notification settings - Fork 471
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
fix ws VAD for codec Opus, pcm8, pcm16 #565
Merged
+77
−56
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b3fd503
fix ws VAD for codec Opus, pcm8, pcm16
0xzre 5b60966
revert main, fix buffer maxlen, add missing vad audio buffer clear
0xzre 11745bc
fix pcm8 and pcm16 vad and for the dg transcription now works, missin…
0xzre 2bef541
fix opus codec decoding
0xzre c758076
fix pcm8 and change threshold
0xzre 91c8d5d
tested
0xzre 70d1767
fix some function to match working one
0xzre a6b8b81
fix WS transcribe: reset state, data length sent to DG, sleep logic, …
0xzre 3f40a43
Merge remote-tracking branch 'origin' into ws-vad-fix
0xzre 465cb34
Merge branch 'main' of https://github.com/0xzre/Friend into ws-vad-fix
0xzre 25f30d2
feat prespeech(500ms), change speechtimeout & threshold & VAD window …
0xzre 52fd340
more accuracy on speech timeout
0xzre 2f0f3d8
only using VAD on pcm8/16 now
0xzre 4aa433f
remove sentece log
0xzre 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 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 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 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.
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.
Why use 10ms chunks here?
20ms seems like a more standard size
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.
On my testing, I have not found the practical difference between them. I choose 10ms because more responsive would be good. Deepgram still buffer them until a good transcription is detected, right? Although 20ms would mean 2x less times of sending through the DG socket, I don't think that would increase the cost to the DG.
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.
There is no increase or decrease in cost of sending audio chunks but 10ms is very low and not recomended
20ms is the recommended minimum.
The server also has very high CPU usage with 10ms when multiple streams are running.
The receiver thread will be blocked by sender threads too eg if you have 100 connections all doing work 10ms apart
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.
Nice insight. Generally we should do stress test but I think going for the standard for baseline is never wrong. I'll make the required changes soon. Thanks!