Menu

gstreamer + python + pocketsphinx

Help
lynucs
2010-02-15
2012-09-22
  • lynucs

    lynucs - 2010-02-15

    there is a pocketsphinx plugin for gstreamer. In this case, pocketsphinx can
    be launched only with the 3 main parameters (hmm, lm, dic) but not with
    others. is there a new version of this gst plugin to handle all parameters???

    ex:
    -mdef french_f0.5725.mdef -hmm french_f0 -dict frenchWords62K.dic -lm french3g62K.DMP -fdict frenchFillers.dic -feat 1s_c_d_dd -agc emax -samprate 16000

     
  • Nickolay V. Shmyrev

    Hi

    We dont think it's needed. You can drop -mdef by renaming mdef file to
    standard "mdef". You can ddro 1s_c_d_dd and you can put "-agc emax" in
    standard feat.params file. So it will work out-of-box.

     
  • lynucs

    lynucs - 2010-02-18

    hi,

    in the hmm directory:
    -i've copied the mdef file and rename it to 'mdef'
    - i ve created a feat.params file and put the line -agc emax

    it works but the result is bad.

    There are some differences between the version based on
    pocketsphinx_continuous and the python version with gst-pocketsphinx, for
    examples:
    -samprate 16000 8.000000e+03 (with gst)
    -samprate 16000 1.600000e+04 (with pocketsphinx_contiuous)

    Could be the explanation ??

    I cannot add the parameter in the feat.params file or in the python program,
    it failed!!

     
  • Nickolay V. Shmyrev

    Hm,

    "-samprate", "8000",

    is in gstpocketsphinx.c. It seems you have to edit sample rate inside
    pocketsphinx sources.

     
  • lynucs

    lynucs - 2010-02-19

    No, does not work at all.
    in the gstpocketsphinx.c: "-samprate", "16000" , same result.
    i ve removed other parameters in the sources to have the same default
    parameters: Same result
    (i check that parameters change for any modifications)

    my dictionnary is an otan alphanet... when i say bravo the B appears, tango
    for T, etc.... works well with the command line.

    I don't know how to go ahead??

     
  • Nickolay V. Shmyrev

    Hm, but gstreamer component also has the following:

    GST_STATIC_CAPS("audio/x-raw-int, "
                                                "width = (int) 16, "
                                                "depth = (int) 16, "
                                                "signed = (boolean) true, "
                                                "endianness = (int) BYTE_ORDER, "
                                                "channels = (int) 1, "
                                                "rate = (int) 8000")
    

    Which causes sample rate conversion. Did you change that?

     
  • lynucs

    lynucs - 2010-02-22

    i have change to rate = (int) 16000) .... it does not work at all. nothing is
    decoded. the recording seems not working.
    i went back to the original version with english LM and DICT, i checked it
    works. If i change to :
    rate = (int) 16000. Nothing works!!!
    Same, if i change the sample rate conversion (rate =int 16000) and the
    pocketsphinx parameters ('samprate 16000' + -nfft 512???) to be coherent.

    I try the example in C from this url http://www.speech.cs.cmu.edu/cmusphinx/m
    oinmoin/PocketSphinxMigration

    It work well with the french LM & DICT. But i don't have any example to do a
    live decoding. I don't know how to do this.
    The usage of gstreamer was a solution by using the vader plugin, especially in
    python which is easier, unfortunately as you see it does not work.

    Laurent

     
  • Nickolay V. Shmyrev

    Hm, I probably need to look at this myself. From a quick look you need to put
    16000 in three places:

    vader element, pocketsphinx element, pocketsphinx options

    Did you change vader?

     
  • lynucs

    lynucs - 2010-02-24

    yes for pockecsphinx element and options.
    not for the vader plugin.
    I did not see any parameters to change the rate for vader. Maybe in the
    source.
    I m going to see...

     
  • lynucs

    lynucs - 2010-02-24

    it is better. i have a result, it is better than to have nothing :)
    the rate is 16000 on all components (vader, pocketshinx plugin & options), i
    have the same result as before the rate was 8000 everywhere: it is not
    accurate at all.
    I ve also removed some options in the pocketsphinx plugin (-nfft, -cmn,
    -fwdflat, -bestpath, -maxhmmpf, -maxwpf), and i'm now quite sure pocketsphinx
    is launched with same parameters in both case... i think the problem comes
    from the gstreamer pipeline, not pocketsphinx, but not sure.

    Regards,
    Laurent

     
  • lynucs

    lynucs - 2010-03-02

    I give up the usage of python for the moment.
    I tested successfully pocketsphinx in C, but i did not find any examples to do
    a live decoding.

    My goal is still to have a LIVE french recognition with a small dictionary...

    could you help me?
    Laurent

     
  • lynucs

    lynucs - 2010-03-02

    Thanks, don't want to rush you. Sure the solution in python will be welcome :)
    seems very complicate to develop C to have the same thing like
    python+gstreamer+vader

     
  • hkonevke

    hkonevke - 2012-07-16

    I am sorry. I posted it again in the correct forum.

     

Log in to post a comment.