我关注此页面: https://cloud.google.com/speech/docs/getting-started
我可以毫无问题地达到目的。
在示例中,该文件 'URI': 'GS://cloud-samples-tests/speech/brooklyn.flac' 处理完毕。
如果我想处理本地文件怎么办?如果无法做到这一点,我如何通过命令行上传我的.flac?
由于
答案 0 :(得分:1)
找到解决方案:
我创建了自己的存储桶(my_bucket_test),然后通过以下方式上传文件: gsutil cp speech.flac gs:// my_bucket_test
答案 1 :(得分:1)
您现在可以通过指定本地路径而非google存储路径来处理本地文件:
gcloud ml speech recognize '/Users/xxx/cloud-samples-tests/speech/brooklyn.flac' \ --language-code='en-US'
您可以使用gcloud工具(https://cloud.google.com/speech-to-text/docs/quickstart-gcloud)发送此命令。