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

Adjusting for ambient Noise missing. #5

Open
AryanEmbered opened this issue Oct 9, 2022 · 4 comments
Open

Adjusting for ambient Noise missing. #5

AryanEmbered opened this issue Oct 9, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@AryanEmbered
Copy link

You might want to add this line after with sr.Microphone as source

r.adjust_for_ambient_noise(source, duration = 1)

Wasn't recording for me till I added this.
Windows btw.

@mallorbc
Copy link
Owner

It fixed the issue for you, but what does it do?

@AryanEmbered
Copy link
Author

I read it on this website. it explains what setting dynamic energy to true and using adjust for ambient does.
according to this person, Using both together gives better results. so I tried it and it worked.
I kinda don't understand why, Since dynamic energy adjusts the value constantly, while adjust for ambient does it once. so It Should be fine with just using dynamic energy in theory.

https://www.codesofinterest.com/2017/04/energy-threshold-calibration-in-speech-recognition.html

@SunnyOd
Copy link

SunnyOd commented Oct 17, 2022

Tried this too and the accuracy seems to have improved significantly. Thanks for sharing

@mallorbc mallorbc added the enhancement New feature or request label Oct 26, 2022
@DevenBL
Copy link

DevenBL commented Feb 4, 2023

It does seem to make it better ill try to do some testing to see how it reacts when you move from environment to environment and if it needs re calibration

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

No branches or pull requests

4 participants