app/src/main/java/com/example/jarvis_stts/MainActivity.kt aktualisiert
This commit is contained in:
@@ -112,7 +112,7 @@ class MainActivity : AppCompatActivity(), RecognitionListener, TextToSpeech.OnIn
|
||||
Log.d("JARVIS", "Vosk hört: $recognizedText")
|
||||
|
||||
if (recognizedText.contains("computer") || recognizedText.contains("jarvis")) {
|
||||
voskService?.pause() // Pause statt Stop ist oft schneller
|
||||
voskService?.stop() // Pause statt Stop ist oft schneller
|
||||
startVoiceInput()
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ class MainActivity : AppCompatActivity(), RecognitionListener, TextToSpeech.OnIn
|
||||
webSocket?.send(spokenText)
|
||||
}
|
||||
// WICHTIG: Warte kurz oder prüfe, ob TTS spricht, bevor du das hier machst:
|
||||
voskService?.resume()
|
||||
voskService?.startVosk()
|
||||
}
|
||||
|
||||
override fun onResult(hypothesis: String) {}
|
||||
|
||||
Reference in New Issue
Block a user