Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vosk Dependency did not integerate in android kotin why #1547

Open
Tajammal39 opened this issue Mar 31, 2024 · 0 comments
Open

Vosk Dependency did not integerate in android kotin why #1547

Tajammal39 opened this issue Mar 31, 2024 · 0 comments

Comments

@Tajammal39
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant