I've build my own acoustic model in Bahasa Indonesia semi-continuous for digit recognizer and I want to use it for my app in Windows Phone.
I've included my acoustic model to hmm folder in folder Assets, dict file and lm file as well. I modified digits.gram file become like this
#JSGF V1.0;grammardigits;
<digit> = satu |
dua |
tiga |
empat |
lima |
enam |
tujuh |
delapan |
sembilan |
sepuluh |
sebelas|
puluh|
belas|
ya|
tidak|
ada;
public<digits> = <digit>+;
In this method , I got error said "fault adding grammar search : digits"
My question :
1. I build my acoustic model with .lm, can I use .gram/.jsgf in pocketsphinx, instead of .lm ?
2. Is there something wrong with my digits.gram file since the error came up from it
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I attach my full errors.log here and I couldn't find any information regarding the "fault adding grammar search". You may want to take a look the log. The only information that I have suspicion on became a problem is this line
My app also will crash when I tried to add Ngram search with my .DMP file.
That makes me crazy since PocketSphinx in Linux did great. Is there some possibility there is something wrong with SpeechRecognizer.cpp made by Toine de Boer? Or there is something I miss here.
Okay. But errors.log still same with the previous , again.
Edit
Is there any alternatives way to get the full error logs ?
I got the errors.log from LocalStorage
Here's the method in SpeechRecognizer.cpp to get the log provided in project example by Toine de Boer
Platform::String^SpeechRecognizer::Initialize(Platform::String^hmmFilePath,Platform::String^dictFilePath){if(initializedRecognitionType!=RecognitionType::None){return"PocketSphinx is already initialized";}cmd_ln_t*config;//GetLocalStoragePathwcstombs(applicationLocalStorageFolder,Windows::Storage::ApplicationData::Current->LocalFolder->Path->Data(),1024);//GetInstalledFolderpathwcstombs(applicationInstallFolderPath,Windows::ApplicationModel::Package::Current->InstalledLocation->Path->Data(),1024);//GetErrorfilepath(optionaly)char*logPath=concat(applicationLocalStorageFolder,"\\errors.log");//CreatefullhmmanddictfilepathsautoChmmFilePath=convertStringToChars(hmmFilePath);autoCdictFilePath=convertStringToChars(dictFilePath);char*hmmPath=concat(applicationInstallFolderPath,ChmmFilePath);char*dictPath=concat(applicationInstallFolderPath,CdictFilePath);//Createdecoderconfigconfig=cmd_ln_init(NULL,ps_args(),TRUE,"-hmm",hmmPath,"-dict",dictPath,"-mmap","yes","-logfn",logPath,"-kws_threshold","1.000000e+00",NULL);//Cleanupfree(ChmmFilePath);free(CdictFilePath);free(logPath);free(hmmPath);free(dictPath);if(config==NULL)return"Could not create a config";decoder=ps_init(config);if(decoder==NULL)return"Could not create a decoder";initializedRecognitionType=RecognitionType::Grammatic;return"PocketSphinx initialized";}
Personally I always tested new build models first on PocketSphinx_Continuous.... just to get direct feedback through command line.
If you get it running with PocketSphinx_Continous you just have to user the same arguments in the config of the Windows Phone app.... like:
I've build my own acoustic model in Bahasa Indonesia semi-continuous for digit recognizer and I want to use it for my app in Windows Phone.
I've included my acoustic model to hmm folder in folder Assets, dict file and lm file as well. I modified digits.gram file become like this
In this method , I got error said "fault adding grammar search : digits"
My question :
1. I build my acoustic model with .lm, can I use .gram/.jsgf in pocketsphinx, instead of .lm ?
2. Is there something wrong with my digits.gram file since the error came up from it
Thank you
Yes.
It looks fine. You can check log output for details.
Hi, thank you for the answer.
I attach my full errors.log here and I couldn't find any information regarding the "fault adding grammar search". You may want to take a look the log. The only information that I have suspicion on became a problem is this line
Since my model using semi-continuous, not PTM.
My app also will crash when I tried to add Ngram search with my .DMP file.
That makes me crazy since PocketSphinx in Linux did great. Is there some possibility there is something wrong with SpeechRecognizer.cpp made by Toine de Boer? Or there is something I miss here.
Thank you
I just did train with PTM type, but the error stil occured. I think my model is not the problem.
Sorry abour the error.log . It must be incompleted. I just noticed that you've answered my question at https://sourceforge.net/p/cmusphinx/discussion/help/thread/3ace5e43/?limit=25#1291
You said that "You can add a call of fflush(stderr) to err.c" . But, I'm sorry I don't understand where I can add fflush() in that file.
In the end of
err_logfp_cb
function.As you mentioned, I've add a call
fflush(stderr)
and rebuild the project. But , the error log still same with the previous.Add
fflush(fp)
instead of stderrOkay. But errors.log still same with the previous , again.
Edit
Is there any alternatives way to get the full error logs ?
I got the errors.log from LocalStorage
Here's the method in SpeechRecognizer.cpp to get the log provided in project example by Toine de Boer
Last edit: Hamdan Prakoso 2016-07-26
Did you get it to run already?
Personally I always tested new build models first on PocketSphinx_Continuous.... just to get direct feedback through command line.
If you get it running with PocketSphinx_Continous you just have to user the same arguments in the config of the Windows Phone app.... like: