1 Star 1 Fork 1

okay6/paddlepaddle-model

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
s.py 599 Bytes
一键复制 编辑 原始数据 按行查看 历史
coding666 提交于 2018-07-24 13:00 . Add files via upload
#coding:utf-8
import speech_recognition as sr
def recognize(file):
# obtain audio from the microphone
r = sr.Recognizer()
h = sr.WavFile(file)
with h as source:
audio = r.record(source)
# recognize speech using Sphintry:
return(r.recognize_sphinx(audio))
'''
import speech_recognition as sr
# obtain audio from the microphone
r = sr.Recognizer()
h = sr.WavFile('out.wav')
with h as source:
audio = r.record(source)
# recognize speech using Sphintry:
#r.recognize_sphinx(audio)
print("Sphinx thinks you said " + r.recognize_sphinx(audio))
'''
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/okay_6/paddlepaddle-model.git
git@gitee.com:okay_6/paddlepaddle-model.git
okay_6
paddlepaddle-model
paddlepaddle-model
master

搜索帮助