Menu

How to use the other acoustic models from sourceforge.net?

2014-01-25
2014-10-21
  • Carlos Antunes

    Carlos Antunes - 2014-01-25

    Hello all,

    There is a document called "How to use Models from SphinxTrain in
    Sphinx-4" which I am using to try to make sense out of it.

    It seems that the en-us.tar.gz is a better database than the HUB4.

    From Sphinx-4 build.xml file we have:

    <!-- ********************************************************** -->
    <!-- *                                                        * -->
    <!-- * For generating the WSJ and TIDIGITS models.            * -->
    <!-- *                                                        * -->
    <!-- ********************************************************** -->
    
    <property name="wsj_name" value="WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz"/>
    <property name="wsj_data_dir" value="models/acoustic/wsj"/>
    
    <property name="wsj_8kHz_name"
    

    value="WSJ_8gau_13dCep_8kHz_31mel_200Hz_3500Hz"/>
    <property name="wsj_8kHz_data_dir" value="models/acoustic/wsj_8kHz"></property>

    <property name="tidigits_name"
    

    value="TIDIGITS_8gau_13dCep_16k_40mel_130Hz_6800Hz"/>
    <property name="tidigits_data_dir" value="models/acoustic/tidigits"></property>

    The build all command creates the jars for them.

    Now, at http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/
    you have other language models.

    When you download, say en-us.tar.gz, you have a bunch of files inside
    but then you need to have a jar like those above built when you
    compile Sphinx-4.

    So, first off is, what is the advice you can give on how to build that
    and also how to proceed on the configuration of Sphinx-4 to use that.

    I am using the Application Programmer Guide as sample as well as other
    documentation but I would appreciate any pointers.

    Thanks,

    Carlos.

     
  • Nickolay V. Shmyrev

    Generic en_US model only works with hl-interface branch. It doesn't work with any other sphinx4 branch or with a release.

    You can checkout hl-interface branch from subversion, see the tutorial for details

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

    You do not need to put the model into jar to use it, you can just specify a model folder in the source code.

    Application manual is outdated.

     
    • gdupont

      gdupont - 2014-10-21

      Hi Nickolay,
      I can't manage to find this hI-interface branch you're mentionning in this thread. I looked over the branches and tags on the SVN but it doesn't stand out. Any link?
      br,
      gd

       
      • Alexander Solovets

        That branch has been already merged, use trunk.

        On Tue, Oct 21, 2014 at 3:00 PM, gdupont g_d@users.sf.net wrote:

        Hi Nickolay,
        I can't manage to find this hI-interface branch you're mentionning in this thread. I looked over the branches and tags on the SVN but it doesn't stand out. Any link?
        br,
        gd


        How to use the other acoustic models from sourceforge.net?


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cmusphinx/discussion/sphinx4/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

        --
        Sincerely, Alexander

         
        • gdupont

          gdupont - 2014-10-21

          Got that one firgured out in between. Last issue on my side: using this high level interface, I cannot change the logLevel, can I? (I only load the lib through maven, so I do not have direct access to default.config.xml).

          As a sidenote, I'm using the HL API because I can't get the us-english-generic models to work with the config file.

           

          Last edit: gdupont 2014-10-21
  • Carlos Antunes

    Carlos Antunes - 2014-01-25

    Thanks Nickolay! Yes, I did download and built the hi-interface branch.

    I still have a few questions which I am not clear.

    Now the questions are related to the en_US model properties. I do not know what which values to adjust here:

        <property name="relativeBeamWidth" value="1E-60"/>
        <property name="absoluteWordBeamWidth" value="22"/>
        <property name="relativeWordBeamWidth" value="1E-30"/>
        <property name="wordInsertionProbability" value=".2"/>
        <property name="languageWeight" value="10.5"/>
        <property name="silenceInsertionProbability" value=".1"/>
        <property name="acousticLookahead" value="1.7"/>
    

    Also, I would like to add them under my /src/main/resouces/model/ folder so that I can generate a JAR with Maven. I want the models to be part of the JAR.

    If I do so, can I do something like this: "resource:/model/language_model.DMP" using the resource:/ in front?

    Also, HUB4 for instance comes with a Model.class. I do not see any Model.class on the other Language Models for download here.

    Form the examples, you have:
    <component name="hub4" type="edu.cmu.sphinx.model.acoustic. HUB4_8gau_13dCep_16k_40mel_133Hz_6855Hz.Model">
    <property name="loader" value="sphinx3Loader">
    <property name="unitManager" value="unitManager">
    </property></property></component>

    If I an to use the en_US language models, then shall I skip that? I imagine I still need the sphinx3Loader as that model much have been trained with sphinx3. Correct?

    Thank you!

     
  • Nickolay V. Shmyrev

    Now the questions are related to the en_US model properties. I do not know what which values to adjust here:

    You shouldn't adjust any of these

    Also, I would like to add them under my /src/main/resouces/model/ folder so that I can generate a JAR with Maven. I want the models to be part of the JAR.
    If I do so, can I do something like this: "resource:/model/language_model.DMP" using the resource:/ in front?

    Yes

    Also, HUB4 for instance comes with a Model.class. I do not see any Model.class on the other Language Models for download here.

    Model class is not needed for a long time

    If I an to use the en_US language models, then shall I skip that? I imagine I still need the sphinx3Loader as that model much have been trained with sphinx3. Correct?

    No, please read the tutorial first

     
    • Carlos Antunes

      Carlos Antunes - 2014-01-25

      Thanks again Nickolay,

      I have been reading (and I have printed) all the tutorials. You are
      referring to "Sphinx-4 Application Programmer's Guide" under
      http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4 which has one
      page and uses the WSJ model as the example?

      Looks like it is slightly different from the last time I have played
      with it. That is the confusion for me then.

      I will try that.

      Cheers.

      On Sat, Jan 25, 2014 at 2:39 PM, Nickolay V. Shmyrev
      nshmyrev@users.sf.net wrote:

      Now the questions are related to the en_US model properties. I do not know
      what which values to adjust here:

      You shouldn't adjust any of these

      Also, I would like to add them under my /src/main/resouces/model/ folder so
      that I can generate a JAR with Maven. I want the models to be part of the
      JAR.
      If I do so, can I do something like this:
      "resource:/model/language_model.DMP" using the resource:/ in front?

      Yes

      Also, HUB4 for instance comes with a Model.class. I do not see any
      Model.class on the other Language Models for download here.

      Model class is not needed for a long time

      If I an to use the en_US language models, then shall I skip that? I imagine
      I still need the sphinx3Loader as that model much have been trained with
      sphinx3. Correct?

      No, please read the tutorial first


      How to use the other acoustic models from sourceforge.net?


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cmusphinx/discussion/sphinx4/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.

MongoDB Logo MongoDB