app/src/main/java/com/example/jarvis_stts/MainActivity.kt aktualisiert
This commit is contained in:
@@ -85,13 +85,18 @@ class MainActivity : AppCompatActivity(), RecognitionListener, TextToSpeech.OnIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initVoskModel() {
|
private fun initVoskModel() {
|
||||||
|
// Der erste Name "model-de" MUSS exakt dem Ordnernamen in 'assets' entsprechen!
|
||||||
StorageService.unpack(this, "model-de", "model",
|
StorageService.unpack(this, "model-de", "model",
|
||||||
{ model: Model ->
|
{ model: Model ->
|
||||||
|
Log.d("JARVIS", "Vosk Modell erfolgreich geladen!")
|
||||||
voskModel = model
|
voskModel = model
|
||||||
startVosk()
|
startVosk()
|
||||||
},
|
},
|
||||||
{ exception: IOException ->
|
{ exception: IOException ->
|
||||||
Log.e("JARVIS", "Vosk Fehler: ${exception.message}")
|
Log.e("JARVIS", "Vosk Fehler beim Entpacken: ${exception.message}")
|
||||||
|
runOnUiThread {
|
||||||
|
Toast.makeText(this, "Modell Fehler: ${exception.message}", Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user