Menu

Pocketsphinx on Android implementation tutorial have issues

Help
MThang
2015-10-31
2015-11-03
  • MThang

    MThang - 2015-10-31

    Hi. I am using Pocketsphinx to create a speech recogniton project. When i try to implement it while reading tutorial i found that, there are 3 things required to do it - they are :
    _pocketsphinx
    _sphinxbase
    _pocketsphinx-android
    I just dont understand we just have pocketsphinx - sphinxbase are written in C - where is that pocketsphinx-android thing. I search in the demo project what i downloaded in sourceforge i couldnt find anything like that.
    So is there an easier way to use pocketsphinx in android ?
    Thanks. Nice day.

     
    • Nickolay V. Shmyrev

      where is that pocketsphinx-android thing.

      http://github.com/cmusphinx/pocketsphinx-android

      I search in the demo project what i downloaded in sourceforge i couldnt find anything like that.

      Demo already has all the required code precompiled in binary form, you can just use demo, you do not need anything except that.

      So is there an easier way to use pocketsphinx in android ?

      The way to use pocketsphinx on android is covered in our tutorial

      http://cmusphinx.sourceforge.net/wiki/tutorialandroid

       
  • MThang

    MThang - 2015-11-02

    Thanks for your help. Things are very clear. I have tried another way then its work. I coppied pocketsphinx-android-5prealpha-nolib.jar, asset.xml, assets folder, config the manifest file and build.gradle file exactly what your tutorial said.

    But there is another problem that I wonder if i can ask in this post? That is sentence recognition. I have been searching the forum for awhile but nothing can help me. Assume that i use your frameWork. I just add another grammar file then test on this file. Strange thing is it just recognize only one phrase in the file that is "sue dough make me a coffee" - I have tried to adjust the key thresHold by inscrease and descrease it but nothing change.
    Could you take a look at the grammar file ? Did i do right thing to recognize a phrase ( sentence) ?
    Thanks, Have a nice day!

     

    Last edit: MThang 2015-11-02
    • Nickolay V. Shmyrev

      Your grammar file has many public rules, only one of them is used.

      If you want to recognize multiple phrases you need to make a single public rule like this:

      <phrase1> = hello world;
      <phrase2> = how are you;
      ...
      public <result> = <phrase1> | <phrase2> | <phrase3>;
      

      You can learn more about JSGF grammars from JSGF specification.

       
  • MThang

    MThang - 2015-11-03

    Thanks, Really appreciate. I will do a research. Have a nice day - and best wish!

     

Log in to post a comment.