Reply To: Using Russian acoustic model

Home Forums Reply To: Using Russian acoustic model

#1015297
Halle Winkler
Politepix

Ha, no problem, that’s why everyone edits the logs :) . My biggest objection to folks reporting issues with the simulator is when they post OMG TEH ACCURACY !!!ELEVEN!1! on Stack Overflow and then it turns out that they were testing accuracy on the simulator.

But LanguageModelGenerator and basic things like finding file paths should be the same between the simulator and the device because they are deterministic and don’t rely on an audio driver, and if you’ve read up enough to have gotten my repeated suggestions not to test accuracy on the simulator than its fine to test something like this. Keep in mind that one thing you won’t get to see when you use the simulator is what will happen with constrained resources, meaning that if the DMP and dic files with the Russian model contain tens of thousands of words, they will probably work on the simulator but possibly crash or at least ridiculously underperform on the device.

OK, so let’s level-set again because I’m a little confused between the Russian model/Spanish model situation. It looks to me like you are now just testing the Spanish model, is that correct? Can you first start by making absolutely sure that you remove all acoustic model files from your app (I would just start a new app from scratch at this point) and then re-add just the model that you are using? It’s really common that when developers are working with multiple language models they get issues due to having the acoustic model files mixed from two different models at the root of their bundle, and these issues are really hard for me to troubleshoot because the files are found by Pocketsphinx so there is no overt error or warning.

Next, I think there is going to be a general issue with the fact that LanguageModelGenerator only works with English-language phonemes and the acoustic models you are using do not use the same phoneme set. You can see that right here:

ERROR: “dict.c”, line 193: Line 1: Phone ‘EY’ is mising in the acoustic model; word ‘A’ ignored
ERROR: “dict.c”, line 193: Line 2: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONA’ ignored
ERROR: “dict.c”, line 193: Line 3: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONADA’ ignored
ERROR: “dict.c”, line 193: Line 4: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONADAS’ ignored
ERROR: “dict.c”, line 193: Line 5: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONADO’ ignored
ERROR: “dict.c”, line 193: Line 6: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONADOS’ ignored
ERROR: “dict.c”, line 193: Line 7: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONAN’ ignored
ERROR: “dict.c”, line 193: Line 8: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONAR’ ignored
ERROR: “dict.c”, line 193: Line 9: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONARA’ ignored
ERROR: “dict.c”, line 193: Line 10: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONARLA’ ignored
ERROR: “dict.c”, line 193: Line 11: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONARON’ ignored
ERROR: “dict.c”, line 193: Line 12: Phone ‘AH’ is mising in the acoustic model; word ‘ABANDONE’ ignored
ERROR: “dict.c”, line 193: Line 13: Phone ‘EH’ is mising in the acoustic model; word ‘BREGO’ ignored
ERROR: “dict.c”, line 193: Line 14: Phone ‘EH’ is mising in the acoustic model; word ‘F’ ignored
ERROR: “dict.c”, line 193: Line 15: Phone ‘IY’ is mising in the acoustic model; word ‘FRICA’ ignored
ERROR: “dict.c”, line 193: Line 16: Phone ‘AY’ is mising in the acoustic model; word ‘I’ ignored
ERROR: “dict.c”, line 193: Line 17: Phone ‘EY’ is mising in the acoustic model; word ‘K’ ignored
ERROR: “dict.c”, line 193: Line 18: Phone ‘EH’ is mising in the acoustic model; word ‘LVAREZ’ ignored
ERROR: “dict.c”, line 193: Line 19: Phone ‘EH’ is mising in the acoustic model; word ‘LVARO’ ignored
ERROR: “dict.c”, line 193: Line 20: Phone ‘AA’ is mising in the acoustic model; word ‘R’ ignored

What is happening is that you have these words transcribed phonetically with English-language phonemes like AY and EH (probably via the fallback method), but those phonemes are not present in your acoustic model so the words have to be excluded by Pocketsphinx. Rather than generating these dictionaries dynamically you will have to create them by hand. The .dic file that comes with the Spanish acoustic model ought to have the correct phonetic transcriptions for its words. It is possible to use the DMP file that LanguageModelGenerator generates, since that is a probability model and doesn’t directly interact with the acoustic model.