有什么方法可以将音频文件发送到语音到文本识别 [英] Is there any way to send audio file to the speech-to-text recognition

查看:148
本文介绍了有什么方法可以将音频文件发送到语音到文本识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望Android语音识别系统分析音频文件,而不是麦克风的默认传入语音.

I want the Android speech recognition system analysing audio file and not the default incoming voice from microphone.

有什么办法吗?

谢谢.

推荐答案

cmusphinx.sourceforge.net/wiki/tutorialandroid刚刚发现链接听起来像是有人在创建一个Android版本的Sphinx.

cmusphinx.sourceforge.net/wiki/tutorialandroid Just found that link sounds like someone has created a android version of Sphinx.

似乎不支持查看Android api来执行此操作. ( http://developer.android.com/reference/android/speech/package-summary.html )

Looking at the Android api doing this doesn't seem to be supported. (http://developer.android.com/reference/android/speech/package-summary.html)

您也许可以使用其他API.

You might be able to using another API.

我知道Microsoft的C#API允许这样做,但是为了使其有用,您可能需要使用编写的程序来设置服务器,该程序编写了在电话上录制声音文件,然后将其发送到服务器.

I know that Microsoft's C# api allows this but in order for that to be useful you would probably need to setup a server with a program you wrote record the sound file on the phone and then send it to the server.

CMUSphinx( http://cmusphinx.sourceforge.net/wiki/)用Java编写因此可能可以使其在Android设备上运行.在该api上,您创建一个StreamSpeechReconizer.

CMUSphinx (http://cmusphinx.sourceforge.net/wiki/) is written in Java so it might be possible to get it running on an Android device. On that api you create a StreamSpeechReconizer.

StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer(configuration);
recognizer.startRecognition(new File("speech.wav").toURI().toURL());
SpeechResult result = recognizer.getResult();
recognizer.stopRecognition();

我发现此 https://gist.github.com/alotaiba/1730160 快速的网络搜索(Google语音识别api接受文件"),因此网络上可能还有其他服务可以接受要发送给他们的文件.

I found this https://gist.github.com/alotaiba/1730160 with a quick web search (google "speech recognition api accepts file") so there might be other services available on the web that would accept a file to be sent to them.

这篇关于有什么方法可以将音频文件发送到语音到文本识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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