Menu

Changing FSG at runtime in GStreamer

Help
2010-04-22
2012-09-22
  • Gopalakrishna

    Gopalakrishna - 2010-04-22

    Hello,
    I am having problem changing the FSG file dynamically in pocketsphinx using
    gstreamer. I am able to initialize the fsg for the first time.

    g_object_set(G_OBJECT(filter4),"fsg","first.fsg",NULL);
    

    When I attempt to change the FSG using

    g_object_set(G_OBJECT(filter4),"fsg","second.fsg",NULL);
    

    it gives
    INFO: fsg_model.c(542): FSG: 50 states, 44 unique words, 44 transitions (89
    null)
    INFO: fsg_model.c(177): Computing transitive closure for null transitions
    INFO: fsg_model.c(228): 43 null transitions added
    INFO: fsg_model.c(281): Adding silence transitions for <sil> to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++NOISE++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++BREATH++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++SMACK++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++COUGH++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++LAUGH++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++TONE++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++UH++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(281): Adding silence transitions for ++UM++ to FSG
    INFO: fsg_model.c(301): Added 50 silence word transitions
    INFO: fsg_model.c(325): Adding alternate word transitions (ZERO,ZERO(2)) to
    FSG
    INFO: fsg_model.c(358): Added 1 alternate word transitions
    INFO: fsg_model.c(325): Adding alternate word transitions (ONE,ONE(2)) to FSG
    INFO: fsg_model.c(358): Added 1 alternate word transitions
    INFO: fsg_model.c(325): Adding alternate word transitions (A,A(2)) to FSG
    INFO: fsg_model.c(358): Added 1 alternate word transitions
    INFO: fsg_model.c(325): Adding alternate word transitions (EXIT,EXIT(2)) to
    FSG
    INFO: fsg_model.c(358): Added 1 alternate word transitions </sil>

    and then simply exits.

    The source code of pocket sphinx gstreamer plugin does allow this change. I am
    not able to get the mistake.

    Please help.

     
  • Nickolay V. Shmyrev

    1. Which pocketsphinx version are you talking about?
    2. Are there words missing in the dictionary inside fsg?
     
  • Gopalakrishna

    Gopalakrishna - 2010-04-23

    I am using pocketsphinx 0.6 and all the words are in the dictionary.

    Btw the above problem is solved by adding

    FSG_BEGIN second

    to the fsg file as per the example in the source code tidigits.fsg.

    Now I have a new problem the accuracy of the words spoken while the second fsg
    is loaded is low, the accuracy is low when he new fsg has more states than the
    first.

     
  • Gopalakrishna

    Gopalakrishna - 2010-04-24

    Thanks every one for the help. I solved my problem, the problem was that I was
    not running

    g_object_set(G_OBJECT(filter4),"configured",TRUE,NULL);
    

    after the g_object_set.

     
  • Nickolay V. Shmyrev

    Btw the above problem is solved by adding
    FSG_BEGIN second

    That issue was fixed after the release, will be available in next version

    problem was that I was not running
    Code:
    g_object_set(G_OBJECT(filter4),"configured",TRUE,NULL);

    Hm, that's not a straightforward API indeed. We need to fix this.

     

Log in to post a comment.