通过蓝牙Android的语音识别 [英] Android voice recognition through Bluetooth

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

问题描述

我使用的语音识别我的活动,我才意识到,如果我有一个耳机连接,识别器仍然只能通过监听手机的麦克风。有没有什么办法让它通过耳机听?

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 但大多数方法都无法使用,直到蜂窝...

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...

在我的声音表彰活动,我第一次调用这个方法: <一href="http://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#startVoiceRecognition%28android.bluetooth.BluetoothDevice%29"相对=nofollow> startVoiceRecognition()然后按照正常的。

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

当我做了,我再调用<一个href="http://developer.android.com/reference/android/bluetooth/BluetoothHeadset.html#stopVoiceRecognition%28android.bluetooth.BluetoothDevice%29"相对=nofollow> stopVoiceRecognition()。实际上,它似乎很好地工作。

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

唯一的问题是,它并没有在API层面&LT工作; 11 ...

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

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

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