Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
谷歌api客户端语音到文本,Python_Python_Python 3.x_Speech Recognition_Speech To Text_Google Speech Api - Fatal编程技术网

谷歌api客户端语音到文本,Python

谷歌api客户端语音到文本,Python,python,python-3.x,speech-recognition,speech-to-text,google-speech-api,Python,Python 3.x,Speech Recognition,Speech To Text,Google Speech Api,我正在使用Python版本3.4来开发这个程序 有人知道如何使用谷歌API客户端语音识别库吗 我无法执行我的程序;我期望下面的示例中给出的输出 例如: 用户(输入):什么是5+5 计算机(谷歌API语音识别库):5+5等于10 我认为您缺少识别步骤,该步骤应将原始音频位转换为字符串 试试这个: r.recognize(UserSaid) 您还可以通过以下途径获得所有可能的转录本列表: all_transcriptions = r.recognize(UserSaid, True) for t

我正在使用Python版本3.4来开发这个程序

有人知道如何使用谷歌API客户端语音识别库吗

我无法执行我的程序;我期望下面的示例中给出的输出

例如:

用户(输入):什么是5+5

计算机(谷歌API语音识别库):
5+5等于10


我认为您缺少识别步骤,该步骤应将原始音频位转换为字符串

试试这个:

r.recognize(UserSaid)
您还可以通过以下途径获得所有可能的转录本列表:

all_transcriptions = r.recognize(UserSaid, True)

for text in all_transcriptions:
    print("Guess -> {}".format(text)
顺便说一句,您是否尝试过更新的语音到文本API?它似乎有大量的文档。以下是指向Python API的链接:

您得到的错误代码是什么?在不知道的情况下,问题可能是从软件包安装不正确到麦克风不工作
all_transcriptions = r.recognize(UserSaid, True)

for text in all_transcriptions:
    print("Guess -> {}".format(text)