I am using Window's voice recognition API, and it keeps detecting very low background noise as the word "if" repetitively. I have been trying to find a way to put a minimum volume requirement for it to start accepting input, but all its members are set to read-only.
How can I set a minimum cut off for the microphone's volume?
Edit: Figured out a way to get the average and ignore the text if it's under the average I want
public void hRecognition_AudioStateChanged(object sender, AudioStateChangedEventArgs e)
{
if (e.AudioState == AudioState.Stopped)
{
volumeAverage开发者_运维技巧 /= volumeCount;
}
else if (e.AudioState == AudioState.Speech)
{
volumeAverage = 0;
volumeCount = 0;
}
}
public void hRecognition_AudioLevelUpdated(object sender, AudioLevelUpdatedEventArgs e)
{
volumeAverage += e.AudioLevel;
volumeCount += 1;
}
Good question, i had to a little work on some sound analyses software. And you could implement a sound filter, sound filters. I have no experience with windows voice recognition but with i hope this helps, look into signal proccesing simple noise filters
精彩评论