Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.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
Google cloud platform SyntaxError:positional参数跟在关键字参数| Python Client之后,用于语音到文本的转换_Google Cloud Platform_Speech Recognition_Speech To Text - Fatal编程技术网

Google cloud platform SyntaxError:positional参数跟在关键字参数| Python Client之后,用于语音到文本的转换

Google cloud platform SyntaxError:positional参数跟在关键字参数| Python Client之后,用于语音到文本的转换,google-cloud-platform,speech-recognition,speech-to-text,Google Cloud Platform,Speech Recognition,Speech To Text,我正在尝试使用谷歌云API将音频转换为文本。我在关注他们的官方文件,但它让我不断地给出一个错误 File "heyfinal.py", line 15 ,requests, ^ SyntaxError: positional argument follows keyword argument 指向文档的链接是: 一些python版本可能比其他版本对语法更严格。只需按如下方式进行更改: results = sample.streaming_recognize( confi

我正在尝试使用谷歌云API将音频转换为文本。我在关注他们的官方文件,但它让我不断地给出一个错误

File "heyfinal.py", line 15
    ,requests,
    ^
SyntaxError: positional argument follows keyword argument
指向文档的链接是:


一些python版本可能比其他版本对语法更严格。只需按如下方式进行更改:

results = sample.streaming_recognize(
    config=speech.types.StreamingRecognitionConfig(config=config),
    requests=requests)
它会起作用的

results = sample.streaming_recognize(
    config=speech.types.StreamingRecognitionConfig(config=config),
    requests=requests)