python 库将 .wav 与麦克风输入进行比较?
我需要一个 python 库或模块或任何可以将 .wav 文件与麦克风输入进行比较而无需太多代码的东西。示例代码也很酷。泰!
I need a python library or module or whatever that can compare a .wav file to microphone input without too too much code. Sample code would be cool too. TY!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道是否已经有一个库可以实现这一点,但如果您也将麦克风输入作为 WAV 文件,则可以使用
wave
和audiooop
模块并自己编写。I don't know if there's a library already for that, but if you have the microphone input as a WAV file as well, you can use the
wave
andaudioop
modules and write it yourself.如果您尝试比较诸如人们所说的话之类的内容,那么这必须是一段相当复杂的代码。您可以直接在频率/波级别上比较它们,但您很少会获得匹配。
If you're trying to compare something like, what words people are saying, this would have to be a fairly complex piece of code. You could directly compare them at a frequency/wave level, but you'll very rarely if ever get a match.