4

我想读出手机中选择的语音识别。

默认情况下,已安装并选择 Google 语音搜索。

一些设备还安装了 Vlingo 语音识别。

如何以编程方式读出选择了哪个语音识别?

有谁能够帮我?

4

1 回答 1

0

如果您没有找到解决方案,您需要执行以下操作:

final List<ResolveInfo> services = context.getPackageManager().queryIntentServices(
        new Intent(RecognitionService.SERVICE_INTERFACE), 0);

String packageName = "";
String serviceName = "";

for (final ResolveInfo info : services) {

    packageName = info.serviceInfo.packageName;
    serviceName = info.serviceInfo.name;

    if (packageName != null && serviceName != null) {
    // Do something with the output here
    }
}

这是我从这个答案中使用的改编。

于 2013-08-19T19:03:30.423 回答