Skip to content
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

Add option to choose different sample rate #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dalbonio
Copy link

Hi Ricky, I'm sending this PR because i was trying to use the VAD with a sample rate of 8000, but it had no option of choosing the sample rate. The code is simply treating the sample rate as a variable instead of a fixed value of 16000.

I tried to introduce the changes while maintaining the same parameters and a default value of 16000, so it does not break existing code.

@vercel vercel bot temporarily deployed to Preview – vad-ricky0123-com July 21, 2023 17:48 Inactive
@vercel vercel bot temporarily deployed to Preview – vad-demo-script July 21, 2023 17:48 Inactive
@ricky0123
Copy link
Owner

Hi @dalbonio sorry for commenting on this so late. Just wanted to quickly say thanks for this and, although I don't have time to work on this project, if you want to package your fork and make it available on npm I would be happy to mention it in the README here.

@HayatoYagi
Copy link
Collaborator

Sample rate is related to frame samples. I think it's better to add 'sampleRate' into 'FrameProcessorOptions' and control the default 'frameSamples' based on it."

See comments here for more details:

frameSamples: number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants