来自浏览器的 Google Speech API

dev*_*evl 5 google-cloud-platform google-speech-api gcp

在文档页面https://cloud.google.com/speech/ 中有一个演示示例,它通过浏览器收听语音并在后台使用 API。此演示的源是否可用?

如果没有,语音 API 将使用 flac 文件。是否有任何开源项目可以从浏览器中记录 flacfiles(与此 API 兼容 - 那里有许多 github 项目,但想知道是否有官方项目)?

dev*_*evl 4

如果它对某人有帮助,这种方法是开始从浏览器录制音频的良好开端:

https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/speech/recognize.js

https://developers.google.com/web/fundamentals/native-hardware/recording-audio/#acquire_access_to_the_microphone

https://github.com/mattdiamond/Recorderjs

编辑:该解决方案作为自己的项目开源: https ://github.com/gridcellcoder/cloud-speech-and-vision-demos

  • 嘿@devl,您是否找到过直接从浏览器流式传输到 Google 语音 API 的方法? (2认同)