在ptyon中用sphinx库进行英文wav文件的语音识别?
import speech_recognition r=speech_recognition.Recognizer() with speech_recognition.AudioFile("C:\\Users\\Administrator\\Desktop\\hellohello.wav") as source: audio_data1=r.record(source) #pip install pocketsphinx -i https://pypi.tuna.tsinghua.edu.cn/simple #为使用 sphinx ,要想成功使用下面的命令需要先安装pocketsphinx库 text1=r.recognize_sphinx(audio_data1, language='en-US') print(text1)
可以看到转化的不太准,可能是因为我发音不准的原因或者有噪音的原因。
还是把这个wav文件提供给大家进行测试
链接:https://pan.baidu.com/s/1uPNMTLBp2SIyJrI2UfzxrQ
提取码:036w
复制这段内容后打开百度网盘手机App,操作更方便哦
还有一个英文的高质量wav
链接:https://pan.baidu.com/s/1oELyAWBc9KbwJkQoVXx2qw
提取码:sc0r
我们再试一下
this they'll smell of old we're lingers it takes heat to bring out the odor called it restores health and zest case all the colt is fine with him couples all pastore my favorite is as full food is the hot cross mon
我们手动加上标点符号如下:
this they'll smell of old we're lingers, it takes heat to bring out the odor called it restores health and zest case all the colt is fine with him couples all pastore .my favorite is as full food is the hot cross mon
然后用百度翻译翻一下
这会让他们闻到我们久久不散的味道,需要加热才能散发出来的气味称之为它恢复健康和热情的情况下所有的小马都很好与他夫妇所有的牧师。我最喜欢的是作为丰盛食物的热十字周一








暂无数据