app/src/main/java/com/example/jarvis_stts/MainActivity.kt aktualisiert
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user