通过蓝牙进行安卓语音识别 [英] Android voice recognition through Bluetooth

查看:40
本文介绍了通过蓝牙进行安卓语音识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的活动中使用了语音识别,我刚刚意识到如果我连接了耳机,识别器仍然只能通过电话麦克风收听.有没有办法让它通过耳机听?

I am using voice recognition in my activity and I just realized that if I have a headset connected, the recognizer still only listens through the phone mic. Is there any way to make it listen through the headset?

我确实注意到了这一点:http://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html 但大部分方法直到 HoneyComb 才可用...

I did notice this: http://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html but most of the methods are not available until HoneyComb ...

谢谢.

推荐答案

基本上,这只能使用 BluetoothHeadset 类来完成...

Basically, this can only be done using the BluetoothHeadset class...

在我的语音识别活动中,我首先调用了这个方法:startVoiceRecognition() 然后继续像往常一样.

In my voice recognition activity, I call this method first: startVoiceRecognition() then proceed as normal.

完成后,我调用 stopVoiceRecognition().它实际上似乎工作得很好.

When I am done, I then call stopVoiceRecognition(). It actually appears to work nicely.

唯一的问题是它不适用于 API 级别 <11 ...

Only issue is that it doesn't work on API levels <11 ...

这篇关于通过蓝牙进行安卓语音识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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