Phone 'MA' is mising in the acoustic model; word 'masoud' - pocketsphinx
<p>my name is <code>masoud</code>.
now I want to when I say <code>masoud</code>, my app print a console log. </p>

<p>to do this I made a <code>mdic.txt</code> file and I put my name inside it :</p>

<blockquote>
  <p>masoud MA S O D</p>
</blockquote>

<p>I changed <code>mdic.txt</code> to <code>mdic.dict</code> and put it at <code>assets/sync</code> direcotry .</p>

<p>I made a <code>cm.txt</code> file and I put a string inside it:</p>

<pre><code>#JSGF V1.0;
/**
 * JSGF Grammar for Hello World example
 */
grammar masoud;
public &lt;greet&gt; = (good morning | masoud) ( bhiksha | evandro | paul | philip | rita | will );
</code></pre>

<p>and I changed <code>cm.txt</code> to <code>cm.gram</code> .</p>

<p>in my MainActivity</p>

<pre><code>private void setupRecognizer(File assetsDir) throws IOException {
    // The recognizer can be configured to perform multiple searches
    // of different kind and switch between them

    recognizer = SpeechRecognizerSetup.defaultSetup()
            .setAcousticModel(new File(assetsDir, "en-us-ptm"))
            //.setDictionary(new File(assetsDir, "cmudict-en-us.dict"))
            .setDictionary(new File(assetsDir, "mdic.dict"))
            //.setRawLogDir(assetsDir) // To disable logging of raw audio comment out this call (takes a lot of space on the device)
            .setKeywordThreshold(1e-45f) // Threshold to tune for keyphrase to balance between false alarms and misses
            .setBoolean("-allphone_ci", true)  // Use context-independent phonetic search, context-dependent is too slow for mobile


            .getRecognizer();
    recognizer.addListener(this);

    /** In your application you might not need to add all those searches.
     * They are added here for demonstration. You can leave just one.
     */

    // Create keyword-activation search.
    //recognizer.addKeyphraseSearch(KWS_SEARCH, KEYPHRASE);

    recognizer.addKeywordSearch(KWS_SEARCH, new File(assetsDir, "mdic.dict"));
</code></pre>

<p>now I got this message:</p>

<blockquote>
  <p>"dict.c", line 195: Line 1: Phone 'MA' is mising in the acoustic
  model; word 'masoud' ignored "kws_search.c", line 171: The word
  'masoud' is missing in the dictionary</p>
</blockquote>

<p>I got this error at <code>recognizer.addKeywordSearch(KWS_SEARCH, new File(assetsDir, "mdic.dict"));</code> line .</p>

<p>The correct transcription for masoud is "M AH S UW D". </p>

<p>There is no phone MA in acoustic model. The error says about that.</p>

android python pocketsphinx pocketsphinx-android