如何在Python程序中将Google Speech嵌入到Text API中? [英] How to embed Google Speech to Text API in Python program?

查看:185
本文介绍了如何在Python程序中将Google Speech嵌入到Text API中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我在其中创建了一个客户端和主机之间的聊天程序,并且我必须将语音嵌入到文本中。有什么方法可以将Google语音嵌入到我的程序中的Text API中?

I have a project in which I have created a chat program between a client and host, and I have to embed Speech to Text in it. Is there any way by which I can embed Google Speech to Text API in my program ??

推荐答案

这可能是您的工作不希望用于您的案例,但对于其他可能需要这种一次性项目的人,我前段时间一起攻击了一个简单的Python客户端,它使用内置于Chrome中的API进行语音搜索:

This is probably what you do not want to use in your case, but for other's who may need this for a one-off project, I hacked together a simple python client a while ago that uses the APIs built into Chrome for voice search:

https://github.com/korylprince/python-google-transcribe

对于它的工作,你必须有16000Hz编码的FLAC,并且它们必须相当短。

For it to work, you must have 16000Hz encoded FLACs, and they have to be fairly short.

另外,就像评论中提到的那样,API是非官方的,所以谁知道什么时候它会停止工作。

Also, like the comments mention, the API is unofficial, so who knows when it will stop working.

这篇关于如何在Python程序中将Google Speech嵌入到Text API中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆