app/src/main/java/com/example/jarvis_stts/MainActivity.kt aktualisiert

This commit is contained in:
2026-03-11 16:32:35 +00:00
parent e86a2eb48c
commit 7f7ffa6dc2

View File

@@ -175,8 +175,10 @@ class MainActivity : AppCompatActivity(), RecognitionListener, TextToSpeech.OnIn
putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
putExtra(RecognizerIntent.EXTRA_LANGUAGE, "de-DE") putExtra(RecognizerIntent.EXTRA_LANGUAGE, "de-DE")
putExtra(RecognizerIntent.EXTRA_PROMPT, "Ich höre dir zu...") putExtra(RecognizerIntent.EXTRA_PROMPT, "Ich höre dir zu...")
// Diese Zeile hilft, dass Google nicht zu früh abbricht:
putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_MILLIS, 2000L) // Diese beiden sorgen dafür, dass Google geduldiger ist:
putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, 2000L)
putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS, 2000L)
} }
try { try {
speechRecognizerLauncher.launch(intent) speechRecognizerLauncher.launch(intent)