Back in the old days, we used to require the user to download their own HMM model and CMU dictionary. The HMM model might be installed by installing a system package, along with the download of the pocketsphinx source code, or independently. Same with the CMU dictionary file.
At one point, it just seemed easier to host copies of the HMM model and dictionary ourselves. That way we would know where to download them from and could help the user with that, and would know what format everything is in.
Recently, I decided instead of asking for the locations of both the HMM model and the dictionary, just ask for the HMM model and assume that the dictionary is in that same folder and named CMUDict.dict.
Unfortunately, if it isn't, then that causes problems. I may need to revert to keeping the two settings separate in the future, but for right now, I am going to stop searching in all the odd places for the HMM model and dictionary and just assume we are using our hosted version. If the user does not have that installed, then download it for them.
There was an additional problem where if you did not download the HMM model and CMUDict during startup, the CMUDict variable did not get set.
Expected Behavior
After downloading the correct CMUSphinx_standard_language_models repository branch, you should be able to rebuild your Phonetisaurus model as needed.
Actual Behavior
Right now, if your computer attempts to re-build the Phonetisaurus G2P model, it does not know where to find the CMU dictionary file, because that variable is only set in the block of code used to download the CMUSphinx_standard_language_models repository. Additionally, it may be looking for the dictionary in the wrong place since I am now assuming that the dictionary will be in the HMM directory.
Possible Fix
Move the initialization of that variable outside of that if/then block. Do not search for other versions of the HMM directory other than the one Downloaded from our Github repository.
Steps to Reproduce
Download and install Naomi
Set pocketsphinx as at least one of the STT engines (passive, active, special)
Run Naomi and let it download the CMUSphinx_standard_language_models repository and create a Phonetisaurus G2P FST
Delete the g2p_model.fst file from ~/.config/naomi/pocketsphinx/Standard/... folder
Try to run Naomi again.
Context
This prevents me from running Naomi in certain circumstances, especially when upgrading older versions.
Description
Back in the old days, we used to require the user to download their own HMM model and CMU dictionary. The HMM model might be installed by installing a system package, along with the download of the pocketsphinx source code, or independently. Same with the CMU dictionary file.
At one point, it just seemed easier to host copies of the HMM model and dictionary ourselves. That way we would know where to download them from and could help the user with that, and would know what format everything is in.
Recently, I decided instead of asking for the locations of both the HMM model and the dictionary, just ask for the HMM model and assume that the dictionary is in that same folder and named CMUDict.dict.
Unfortunately, if it isn't, then that causes problems. I may need to revert to keeping the two settings separate in the future, but for right now, I am going to stop searching in all the odd places for the HMM model and dictionary and just assume we are using our hosted version. If the user does not have that installed, then download it for them.
There was an additional problem where if you did not download the HMM model and CMUDict during startup, the CMUDict variable did not get set.
Expected Behavior
After downloading the correct CMUSphinx_standard_language_models repository branch, you should be able to rebuild your Phonetisaurus model as needed.
Actual Behavior
Right now, if your computer attempts to re-build the Phonetisaurus G2P model, it does not know where to find the CMU dictionary file, because that variable is only set in the block of code used to download the CMUSphinx_standard_language_models repository. Additionally, it may be looking for the dictionary in the wrong place since I am now assuming that the dictionary will be in the HMM directory.
Possible Fix
Move the initialization of that variable outside of that if/then block. Do not search for other versions of the HMM directory other than the one Downloaded from our Github repository.
Steps to Reproduce
Context
This prevents me from running Naomi in certain circumstances, especially when upgrading older versions.