Android的SpeechRecognizer能否保证不会向Google发送数据?

5

我正在尝试实现Android的SpeechRecognizer功能。由于公司的隐私限制,数据必须明确地不离开设备

到目前为止:

  • 我使用SpeechRecognizer.createSpeechRecognizer方法实现了SpeechRecognizer类。在没有互联网的情况下尝试,它工作得很好!但是,据我所见,谷歌不能保证在线时不发送数据,如果不是为了转录,而是为了改善他们的音频训练数据..
  • SpeechRecognizer.createOnDeviceSpeechRecognizer - 这可以在Android 12及以上版本中使用。假设我不介意。然而,它只适用于特定的设备,例如Pixel 6,甚至Pixel 4a也不支持。
  • putExtra(RecognizerIntent.EXTRA_PREFER_OFFLINE, true) - 这也不起作用。无论我尝试过哪个设备,它都会给出错误:ERROR_NO_MATCH

因此,我们只能使用普通的SpeechRecognizer.createSpeechRecognizer进行实现,我的实现方式如下:

var recognizerIntent: Intent? = null
        if (SpeechRecognizer.isRecognitionAvailable(applicationContext)) {
            sr = SpeechRecognizer.createSpeechRecognizer(applicationContext)

            val listener = MySpeechRecognitionListener(scopeProvider, lifecycleScope, {
                ...
            }
            sr.setRecognitionListener(listener)
            recognizerIntent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply {
                putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH)
            }
            sr.startListening(recognizerIntent)
} else {...}

问题: 我们能否保证Android的SpeechRecognizer不会将数据发送给Google?

3
如果是安卓系统,我会假设所有东西都会被发送到谷歌。你可以直接问他们。 - Bib
4
请注意,谷歌不是你唯一需要担心的事情。设备制造商也可能修改SpeechRecognizer的工作方式。 - CommonsWare
@Surajkumar_cse,答案是我们不确定,就像Bib所说的那样,我们无法保证。我甚至在Google的论坛上得到了同样的答案,所以我使用了另一种解决方案。(Vosk库) - Orestis Gartaganis
你能分享一下那个Google论坛的链接吗? - Surajkumar_cse
@Surajkumar_cse 好的,找到了:https://support.google.com/android/thread/137964238/can-we-guarantee-that-android-s-speechrecognizer-does-not-send-data-to-google?hl=en - Orestis Gartaganis
2个回答

0

使用:

public static SpeechRecognizer createSpeechRecognizer (Context context, 
                ComponentName serviceComponent)

指定一个开源的serviceComponent,以便您可以验证它不会向Google发送数据。

我没有看到其他解决方案,即我不知道是否有任何Android API标志,如DONT_SEND_DATA_TO_GOOGLE


-1

你可以确保在语音识别期间断开互联网连接(Wi-Fi、蜂窝网络等),但这并不能保证所识别的语音不会在之后有网络连接时被记录/缓存并发送到谷歌。


没错。他们可能会分批次地为“改善语音服务”而这样做。 - Orestis Gartaganis

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接