Closed Barkerww closed 3 months ago
Feels like you are using big model which doesn't support grammar.
Oh sorry, I forget to provide the details. The model I used is "vosk-model-small-en-us-0.15" on Android 11 device
And what is your grammar in json form? "to" should not be there probably.
It will be like [ "a", "percent", "the", "minute", "minutes", "seconds", "second", "one", "two", "three", "four" "five" "to" "with" .... ] Is it a bad practice to put the Json string like this?
You need to use phrases in the grammar, not separate words. "to" should be in context.
Great!! Thanks for the reply! Another question is about the pronunciation of 'a', is there any method to let model understand "/[æ]/" and "/[ə]/" in different situation?
You can modify model vocabulary as described in https://alphacephei.com/vosk/lm and introduce two words a_1 with pronunciation AH and a_2 with pronunciation AE. After that you can use the new words in grammar.
Thank you so much @nshmyrev I'll start trying to figure out how to add the pronunciation inside.
I'm trying to create a list of words that can be combined to form the sentences I want. The part of materials are as follows:
However, I've found that using this list of words can cause issues for the recognizer. Specifically:
I'm looking for a better approach to address these issues when using the setGrammar() method. Specifically, I'd like to:
The example results I'm seeing are:
Can you please suggest any techniques or approaches that could help me address these issues and improve the recognition accuracy? Many Thanks!!