-
-
Notifications
You must be signed in to change notification settings - Fork 583
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
Feat: Voice activity threshold #2556
Feat: Voice activity threshold #2556
Conversation
ada2bc5
to
418c207
Compare
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.
I've left more feedback over on the element call PR, but specifically to this PR, remember to check for your editor reformatting files before committing.
Co-authored-by: Hugo Hutri <55588133+hugohutri@users.noreply.github.com>
fix formatting
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.
Just a few nitpicks, we're getting really close with this!
One more tiny nit: we tend to write comments with a space after the slashes (i.e. // comment
not //comment
)
src/webrtc/callFeed.ts
Outdated
mediaStreamAudioSourceNode.connect(this.analyser); | ||
|
||
const streamNode = this.audioContext.createMediaStreamSource(this.stream); | ||
this.audioDelay = this.audioContext.createDelay(0.001); |
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.
Sorry, I think I probably wasn't clear - I was suggesting adding AUDIO_DELAY = 0.001; // ms
at the top of a file and using it here - would that work?
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
No worries, changed the ones in the tests. |
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.
LGTM now! Will also request Dave's review, just to be sure
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Awesome!! Is the intention to mass test this alongside other features in a hosted version of element-call? |
Hmm, I think this would be best to discuss over at element-call with Jake since he's the one on the product team. Sorry, for late response... |
No worries, also got lot's of stuff to do :P |
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.
I was attempting to test this but I couldn't get it to work as it was NPEing on the local call feed:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setVoiceActivityThreshold')
at GroupCall.setVoiceActivityThreshold (groupCall.ts:556:35)
at GroupCallView.tsx:92:15
at commitHookEffectListMount (react-dom.development.js:23150:26)
at commitPassiveMountOnFiber (react-dom.development.js:24926:13)
at commitPassiveMountEffects_complete (react-dom.development.js:24891:9)
at commitPassiveMountEffects_begin (react-dom.development.js:24878:7)
at commitPassiveMountEffects (react-dom.development.js:24866:3)
at flushPassiveEffectsImpl (react-dom.development.js:27039:3)
at flushPassiveEffects (react-dom.development.js:26984:14)
at react-dom.development.js:26769:9
Also, more points that are really for design, but I wasn't sure from the UI when I'd be muted/unmuted based on voice activity. It also seems a bit odd that it's in 'advanced' and not 'audio'.
Adding voice activity detection feature
More information at element-hq/element-call#492
Notes: none
This change has no change notes, so will not be included in the changelog.