google-speech-api - 谷歌语音 API OGG_OPUS
问题描述
我尝试使用 Google Speech API 将音频文件转录为文本。我通过使用 .flac 文件来完成这项工作,但我还需要转换 .opus 文件。因为我后来在 Android 上,所以我无法将 .opus 转换为 .flac。以下配置适用于 flac 文件:
网址
POST https://www.google.com/speech-api/v2/recognize?key=123456&lang=de-DE
身体
data=file
标题
Content-Type=audio/x-flac; rate=48000
2.
我必须使用哪些 Content-Type 或其他设置来转录 ogg_opus 文件?如果我将 Content-Type 更改为“audio/ogg”,它就不起作用。
解决方案
推荐阅读
- symfony - Symfony 4.1 功能测试中的环境变量/隔离环境变量
- javascript - 在反应中使用 dispatchEvent 时不会触发复选框更改事件
- angular - 如果名称重复,堆叠器水平条形图不显示正确的数据
- javascript - 从类 javascript 中调用函数
- php - 无法将双引号参数传递给 php shell
- laravel - 在 Laravel 中仅向 1 个用户发送推送通知
- java - 如何检查代码是否在后台运行?
- mysql - Spring Boot,执行自定义查询
- android - Delphi Android项目中是否可以有2个活动,第二个活动在运行后在哪里显示一个简单的表单?
- php - 知道为什么我的查询只适用于第一个但在第二个 isset 什么都没有发生