Menu

Sendump.py script error

Help
Anonymous
2012-08-23
2012-09-22
  • Anonymous

    Anonymous - 2012-08-23

    My ultimate aim is to have PocketSphinx detecting a small number (around 12)
    of 1 - 3 word commands on an iPhone device, and to allow the user to adapt the
    acoustic model on their device to improve the recognition accuracy. I have
    PocketSphinx running and recognising commands, so now I am trying to implement
    the training part of the app. I'm following the tutorial here: http://cmusphi
    nx.sourceforge.net/wiki/tutorialadapt

    So far, I have the first stage working (running sphinx_fe from within the app
    to generate the .mfc files from the .wav files). I am having problems with the
    second stage, converting the sendump file into a mixture weights file. I tried
    duplicating what the sendump.py script did in the app, but it was crashing, so
    I tried running the sendump.py script on the sendump file from PocketSphinx
    (from the hub4wsj_sc_8k acoustic model), but it gave me the following error:

    Traceback (most recent call last):
    File "C:\SDKs\Python27\Lib\site-packages\cmusphinx\sendump.py", line 59, in
    <module>
    cluster_count = (int)(header.split())
    ValueError: invalid literal for int() with base 10: 'centroids' </module>

    I tried catching the exception around the header reading part of the script,
    and it seemed to extract reasonable values from the header, but then gave an
    error a bit further down the script:

    Traceback (most recent call last):
    File "C:\SDKs\Python27\Lib\site-packages\cmusphinx\sendump.py", line 80, in
    <module>
    opdf_8b = numpy.power(1.0001, -mixw)
    ValueError: operands could not be broadcast together with shapes (256) (178) </module>

    From what I can tell, the sendump file is in a different format from what
    sendump.py expects. Is there a way to extract mixture weights from
    PocketSphinx sendump files? Has anyone else come across this issue when trying
    to adapt the acoustic model that comes with PocketSphinx?

    On a wider note, has anyone managed to perform adaption of the acoustic model
    on an iPhone? Are there any major problems I'm likely to come across? Any help
    or pointers would be appreciated.

    Thanks for the help.

     
  • Nickolay V. Shmyrev

    I am having problems with the second stage, converting the sendump file into
    a mixture weights file.

    Tutorial never says to convert sendump. Instead, original mixture weights file
    is used

    Is there a way to extract mixture weights from PocketSphinx sendump files?

    No, this feature is not implemented

    ? Has anyone else come across this issue when trying to adapt the acoustic
    model that comes with PocketSphinx?

    No, because tutorial never said to convert sendump

    On a wider note, has anyone managed to perform adaption of the acoustic
    model on an iPhone?

    Yes

    Are there any major problems I'm likely to come across?

    No

     
  • Anonymous

    Anonymous - 2012-08-28

    Thanks for the reply. The tutorial does actually mention converting the
    sendump file, under the "Converting the sendump and mdef files" section. Prior
    to yesterday, it said:

    Alternately, if you have installed the SphinxTrain Python modules, you can
    use sendump.py to convert the ''sendump'' file from the acoustic model to a
    ''mixture_weights'' file.

    However, it seems that the tutorial was updated yesterday to mention that this
    can only be done for older sendump files, which I'm guessing was in response
    to this question, and that the sendump file I'm trying to convert is of the
    newer format. Not sure who updated the Wiki, but thanks for clearing that
    issue up.

     

Log in to post a comment.