Windows 语音识别时麦克风音量的最小截止值
我正在使用 Window 的语音识别 API,它会不断检测到非常低的背景噪音,即重复的“if”一词。我一直在尝试找到一种方法来设置最低数量要求,以使其开始接受输入,但其所有成员都设置为只读。
如何设置麦克风音量的最小截止值?
编辑:找到一种方法来获取平均值并忽略文本(如果它低于我想要的平均值)
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;
}
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;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好问题,我必须在一些声音分析软件上做一些工作。您可以实现一个声音过滤器,声音过滤器。我没有 Windows 语音识别经验,但希望这会有所帮助,请研究信号处理简单的噪声滤波器
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