【问题标题】:Google Cloud Speech API real time recognitionGoogle Cloud Speech API 实时识别
【发布时间】:2017-05-19 06:19:13
【问题描述】:

我正在开发一个用于实时翻译的 Python 应用程序。我需要实时识别语音:当用户说话时,它会自动将这段音频发送到 Google Speech API 并返回一个文本。所以我希望识别的文本在说话时立即出现。

我找到了 Streaming Speech Recognition,但似乎我仍然需要先录制完整的语音,然后将其发送到服务器。另外,没有关于如何在 Python 中使用它的示例

是否可以使用 Google Speech API 做到这一点?

【问题讨论】:

    标签: python google-speech-api


    【解决方案1】:

    您可以使用 Google Speech API 做到这一点。

    但是,它有 1 分钟的内容限制。

    请检查下面的链接。

    https://cloud.google.com/speech/quotas

    所以你必须每 1 分钟重新启动一次。

    下面的链接是python的麦克风流示例代码。

    https://cloud.google.com/speech/docs/streaming-recognize#speech-streaming-recognize-python

    【讨论】:

      【解决方案2】:

      查看此链接:

      https://github.com/Uberi/speech_recognition/blob/master/examples/microphone_recognition.py

      这是从麦克风获取音频的示例。识别过程有几个组成部分。以我的经验,Sphinx Recognition 缺乏准确性。 Google 语音识别效果很好。

      【讨论】:

        【解决方案3】:

        使用 Google Speech API 进行实时转录有点麻烦。您可以使用此存储库获得灵感 https://github.com/saharmor/realtime-transcription

        它实时转录客户端的麦克风(免责声明:我是作者)。

        【讨论】:

          猜你喜欢
          • 2017-01-25
          • 1970-01-01
          • 1970-01-01
          • 2019-09-11
          • 1970-01-01
          • 2017-02-24
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多