Menu

How to add a new dictionary to PocketSphinxAndroidDemo project

taka
2015-01-20
2015-01-21
  • taka

    taka - 2015-01-20

    Hi. When I add a new dictionary into official sample Android project, I get an error is below.
    ERROR: "ngram_search_fwdtree.c", line 336: No word from the language model has pronunciation in the dictionary.

    So what can I do to handle this issue ?

    Thanks

     
    • Alexander Solovets

      1. Check that you edited the right file, it should have .dic extension.
      2. Check that the file is being copied to the device, often people imply that whilst it's not true.
       

      Last edit: Nickolay V. Shmyrev 2015-01-20
  • taka

    taka - 2015-01-20

    Thanks for your respond Alexander.
    I had created the dictionary file with imtool and add it both into source code and into files. I also checked application files and yes the file is copied into my device.

     
    • Alexander Solovets

      Looks like you confused language model with dictionary. In order to introduce new words into your application you need to add corresponding records to both files.

       

      Last edit: Nickolay V. Shmyrev 2015-01-20
  • taka

    taka - 2015-01-20

    Hi again,
    Actually I am not modelling a new dictionary, I am trying to reduce size of dictionary. It has words that I don't need and I removed words from the dictionary named cmu07a.dic .
    I also create a topic at stackoverflow you may want to check out .
    http://stackoverflow.com/questions/28044020/reducing-dictionary-size-on-cmusphinx

    You said "... you need to add corresponding records to both files." What are these files. I changed .dic files what else should I change ?

    Thanks

     
    • Alexander Solovets

      I think the error message speaks for itself - cmu07a.dic does not contain the word that you included in the language model. Language model is the file that ends with .lm.

       

      Last edit: Nickolay V. Shmyrev 2015-01-20
  • taka

    taka - 2015-01-21

    Thanks Alexander. I missed out to remove weather.dmp which is default dmp file in sample project. Removing it did work. I appriciate

     

Log in to post a comment.

MongoDB Logo MongoDB