我关注了这个页面: https ://cloud.google.com/speech/docs/getting-started
我可以毫无问题地完成它。
但是,在示例中,处理了文件 'uri':'gs://cloud-samples-tests/speech/brooklyn.flac'。
如果我想处理本地文件怎么办?如果这是不可能的,我如何通过命令行上传我的 .flac?
谢谢
我关注了这个页面: https ://cloud.google.com/speech/docs/getting-started
我可以毫无问题地完成它。
但是,在示例中,处理了文件 'uri':'gs://cloud-samples-tests/speech/brooklyn.flac'。
如果我想处理本地文件怎么办?如果这是不可能的,我如何通过命令行上传我的 .flac?
谢谢
您现在可以通过指定本地路径而不是 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 ) 发送此命令。
找到的解决方案:
我创建了自己的存储桶(my_bucket_test),并通过以下方式上传了文件:gsutil cp speech.flac gs://my_bucket_test