用python访问google api进行语音识别的简单方法
pygsr的Python项目详细描述
使用python访问用于语音识别的google api的简单方法
依赖关系
- sox - apt-get install sox
- pyaudio - apt-get install python-pyaudio
用法
示例:
from pygsr import Pygsr speech = Pygsr() speech.record(3) # duration in seconds (3) phrase, complete_response = speech.speech_to_text('es_ES') # select the language print phrase