简体   繁体   English

Android:同时访问麦克风(RecognizerIntent +自己的应用)

[英]Android: Accessing the microphone simultaneously (RecognizerIntent + own app)

my app uses the RecognizerIntent to record the user's voice and doing some speech recognition. 我的应用程序使用RecognizerIntent记录用户的语音并进行语音识别。

Now, I'd like to compare the results to some open source speech recognition engines. 现在,我想将结果与一些开源语音识别引擎进行比较。 Most of them take an audio file as input. 他们中的大多数都将音频文件作为输入。 My thought was, to capture the sound from the Android's microphone, and start the RecognizerIntent at the same time. 我的想法是,从Android的麦克风捕获声音,同时启动RecognizerIntent。 But it seems, that accessing the microphone is exclusive. 但看起来,访问麦克风是独家的。

  1. Is it possible to use the RecognizerIntent with a recorded audio stream? 是否可以将RecognizerIntent与录制的音频流一起使用?
  2. Is it possible to access the microphone simultaneously with two Activites? 是否可以通过两个Activites同时访问麦克风?

I have tried to find a solution to the same problem and have not had success. 我试图找到解决同样问题的方法并没有取得成功。 One other approach we explored was to access the web service that Google uses for recognition. 我们探索的另一种方法是访问Google用于识别的Web服务。 I posted a question at Google's voice search speech recognition service , but it still goes unanswered. 我在谷歌的语音搜索语音识别服务上发了一个问题,但仍然没有答案。

There was a good post at Voice recognition on android with recorded sound clip? 在Android上使用录制的声音片段进行语音识别时有一个很好的帖子 that dealt with this question and I believe the answer came from a Google employee. 处理这个问题的我认为答案来自Google员工。

I know for sure that is possible to use RecognizerIntent and save the audio, the question is how? 我知道可以使用RecognizerIntent并保存音频,问题是如何?

You can see in Google Keep Android applications doing it once you click in the microphone. 点击麦克风后,您可以在Google Keep Android应用程序中看到它。

不幸的是,你的两个问题的答案都是否定的 ,但有计划将这个问题扩展到Gingerbread和3.0: http//www.mobiclue.com/android-3-0-gingerbread-features-supported-phones.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM