【问题标题】:Can we guarantee that Android's SpeechRecognizer does not send data to Google?我们能保证 Android 的 SpeechRecognizer 不会向 Google 发送数据吗?
【发布时间】:2021-11-27 06:50:45
【问题描述】:

我正在尝试实现 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 发送数据?

【问题讨论】:

  • 如果是 Android,我会假设任何东西都会发送给 Google。你可以随时问他们。
  • 另请注意,Google 不是您唯一关心的问题。设备制造商还可以修改SpeechRecognizer 的工作方式。

标签: android speech-recognition offline privacy


【解决方案1】:

用途:

public static SpeechRecognizer createSpeechRecognizer (Context context, 
                ComponentName serviceComponent)

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

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

【讨论】:

    【解决方案2】:

    您可以确保在识别过程中禁用互联网连接(wifi、蜂窝网络等),但这并不能保证识别出的语音不会被记录/缓存并稍后在有网络连接时发送到谷歌。

    【讨论】:

    • 没错。他们可能会在以后分批“改善​​他们的语音服务”
    猜你喜欢
    • 2013-01-22
    • 2012-09-25
    • 1970-01-01
    • 2013-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多