alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.38k stars 1.04k forks source link

Feature Request - Speaker identification with limited words #263

Open pukhrajp opened 3 years ago

pukhrajp commented 3 years ago

Hi, Recognizer constructor doesn't accept word list when we provide a speaker model, is it possible to add a constructor which can accept speaker models and custom words list. for example. rec = KaldiRecognizer(model, spk_model, wf.getframerate(), '["oh one two three four five six seven eight nine zero", "[unk]"]') currently I cannot use both speaker identification and custom words, I have to create two recognizer objects first get the text and then verify the speaker in second one. I want to use limited words only as they increase accuracy and are almost instant on my rpi.

nshmyrev commented 3 years ago

Yes, we need to rework constructor to have more flexible params.