录制的声音文件(就像谷歌现在,谷歌保留) - RecognizerIntent /监听器 [英] Recorded sound file (ala google now, google keep) - RecognizerIntent/Listener

查看:255
本文介绍了录制的声音文件(就像谷歌现在,谷歌保留) - RecognizerIntent /监听器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发一个使用recognizerIntent获得语音输入的应用程序。然而,由于果冻豆展开后,我还没有能够从我的声音输入得到实际的声音文件。

I have been developing an application that uses the recognizerIntent to get voice input. However, since jelly bean was launched, I have not been able to get the actual sound file from my voice input.

在recognitionListener( http://developer.android.com/reference/安卓/语音/ RecognitionListener.html )有一个名为onBufferReceived方法。但是,有没有承诺,这种方法将被调用,当我实现它,它从来没有得到所谓的。有没有什么办法,迫使这个方法来执行或什么是最佳实践-approach采集声音文件的recognizerIntent分析?

In the recognitionListener (http://developer.android.com/reference/android/speech/RecognitionListener.html) there is a method called onBufferReceived. However, there are no promises that this method will be called, and when I implemented it, it never got called. Is there any way to force this method to execute or what is the "best-practice"-approach to gather the sound file that the recognizerIntent analyzes?

这应该是可能的,因为这两个谷歌现在可以使用语音命令注意对自我这样做,和谷歌保持:声音,笔记做了同样的

It should be possible since both google now can do it with the voice-command "note-to-self", and Google Keep:s voice-notes does the same.

感谢

推荐答案

我不认为有一种方法来迫使它。它清楚地依赖于识别服务的实现。如果谷歌决定不叫 onBufferReceived 那么有没有办法让所使用的实际数据。需要注意的是所提到的谷歌应用程序不使用(公共)目的/服务的API来访问语音识别,但似乎在应用程序中使用私有API(语音识别可能他们的应用程序中被捆绑)。

I don't think there is a way to force it. It clearly depends on the recognition service implementation. If Google decides to not call onBufferReceived then there is no way to get the actual data that is used. Note that the mentioned Google apps don't use the (public) Intent / Service API to access the speech recognition but seem to use a private API within the apps (the speech recognition might be bundled within their apps).

这篇关于录制的声音文件(就像谷歌现在,谷歌保留) - RecognizerIntent /监听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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