Open securigy opened 1 year ago
You can remove rescore folder from the model to make it load and run faster. Big models are for more powerful servers.
I have a good machine AMD Ryzen 7 5800X 8-Core Processor with RTX 3060 GPU... I will try to use your advise...
Now that I have working code, I am wondering about the rest of the vosk capabilities...
You can check API docs here:
https://github.com/alphacep/vosk-api/blob/master/src/vosk_api.h
I still don't understand the entire 'spk' thing. It says: /* Loads speaker model data from the file and returns the model object
@returns model object or NULL if problem occurred */
But what is the speaker model? is it something you train for particular parson's voice? I am asking this because it would be great if I conducted interview with someone and the vosk could recognize and designate 2 different voices in the response... mine and the person I interview. I obviously can format it correctly when displayed, but at least some indication that this is the other person's voice would be great...
So far, I tried 3 different approaches to achieve dictation in a way Microsoft does it in Word with Dictate button.
I used the following:
All the examples below were recognized perfectly by Word Dictation.
1 was pretty bad - it could recognized just a few words and the rest was nonsense.
2 I had great hopes for it but it was bad as well, here are some results, and believe me I had great headset mic and I spoke very clearly and a bit slower to separate between words...
I said Output "This is the first example" "the for example" "This is the second example" "the descending bull" "I do not understand what is going on" "i don't understand what going on" “So, what is I am doing wrong here" "the what is in the winter" "Hello there, are you alive?" "the previous peak of the blood" "Why the speech recognition is so bad?" "the white asparagus is bad"
As you can see, it is a complete nonsense as well. Therefore, I am asking myself: "What did I do wrong?" I downloaded and pointing to the model folder of "vosk-model-en-us-0.22" (BTW, initialization takes 15 seconds!) Here is the code, it followed the example I got here that used PortAudioSharp library from NuGet. Based on this I did not even try generating audio file using NAudio... Can anybody tell me what am I doing wrong? (I have a slight German accent in English) I assume here that all the projects that are using vosk has better quality... How MS Word doing it with Dictate? What are they using?
When I click on the button in my WinForms app, the following is executed:
and the functions:
EDIT: Half an hour later, I tried option #3: vosk with NAudio and it not only generated the correct audio file (no wonders here because that use case worked 12 years ago), but also generated the correct text that I output to screen... Problem Solved!
Still, I wondering why vosk initialization takes 15 seconds... probably due to model size of 1GB+ (?)