You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fun recognizeSpeech(recordedAudio: ByteArray): String {
// Assuming VoskModel is a function to load the model from assets
val model = VoskModel.loadModel("assets/final.mdl")
// Check Vosk documentation for the appropriate recognizer constructor
val recognizer = KaldiRecognizer(model, 16000)
recognizer.SetPartialResults(true)
val buffer = recognizer.AcceptWaveform(recordedAudio)
val result = buffer ?: ""
recognizer.FinalizeRecognition()
return result
}
Added Dependency but i am facing the error
implementation ("com.alphacep:vosk-android:0.3.12")
Unresolved reference: VoskModel
Unresolved reference: KaldiRecognizer
The text was updated successfully, but these errors were encountered:
Added Dependency but i am facing the error
implementation ("com.alphacep:vosk-android:0.3.12")
Unresolved reference: VoskModel
Unresolved reference: KaldiRecognizer
The text was updated successfully, but these errors were encountered: