Menu

use German language

Help
GeneralG
2017-06-12
2017-06-14
  • GeneralG

    GeneralG - 2017-06-12

    Hi, I'm using my Raspberry Pi 3 for a smart home project wich uses jasper and pocketsphinx for speech recognition. So far I managed to get everything up and running but I can't really figure out how to make it recognize other languages than English (German in my case). I know that I need a acoustic model and a language model wich I found in the download section, but I don't know wich files i need, how install them and how to tell pocketsphinx to use them.
    It's hard to find a solution to this for me because I'm rather new to linux and speech recognition. In addition to that comes that many of the threads about this topic are pretty old and some of the (important?) links in them are not workling anymore.
    A step by step manual would be perfect, although not necessary, I appreciate every help.

     
  • G10DRAS

    G10DRAS - 2017-06-13

    jasper-dev version support geman language. Unfortunatly no document available for it and you need to dig into code yourself for more info.
    you need german acoustic model and g2p (fst) model, language model is not required as jasper generate one for you.

    Try German Acoustic Model (voxforge.cd_cont_3000)
    voxforge-de-r20141117.tgz
    with g2p model
    dict-xsampa.fst

    jasper configuration for this is as follows:

    stt_engine: sphinx
    pocketsphinx:
       fst_model: '<fst path>/dict-xsampa.fst'
       hmm_dir: '<acoustic model path>/model_parameters/voxforge.cd_cont_3000'
       fst_model_alphabet: 'xsampa'
    

    If you are using jasper-master version then

    Try German Acoustic Model (voxforge.cd_cont_3000)
    voxforge-de-r20141117.tgz
    with g2p model voxforge-de.fst, download it from
    https://www.dropbox.com/s/vbkf8qjvsf67b66/voxforge-de.fst?dl=0

    jasper configuration for this is as follows:

    stt_engine: sphinx
    pocketsphinx:
       fst_model: '<fst path>/voxforge-de.fst'
       hmm_dir: '<acoustic model path>/model_parameters/voxforge.cd_cont_3000'
    

    Note:- seems voxforge-de-r20141117.tgz is not available anymore, you can try
    http://www.repository.voxforge1.org/downloads/de/Tags/AcousticModels/voxforge-de-r20140216.tgz

     
  • GeneralG

    GeneralG - 2017-06-13

    Hi, thx for the fast reply. I tryed g2p model from dropbox with voxforge-de-r20140216 but i get this error when executing jasper:

    *******************************************************
    *             JASPER - THE TALKING COMPUTER           *
    * (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
    *******************************************************
    ERROR:root:Error occured!
    Traceback (most recent call last):
      File "jasper.py", line 146, in <module>
        app = Jasper()
      File "jasper.py", line 109, in __init__
        stt_passive_engine_class.get_passive_instance(),
      File "/home/pi/jasper/client/stt.py", line 48, in get_passive_instance
        return cls.get_instance('keyword', phrases)
      File "/home/pi/jasper/client/stt.py", line 42, in get_instance
        instance = cls(**config)
      File "/home/pi/jasper/client/stt.py", line 90, in __init__
        import pocketsphinx as ps
      File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/__init__.py", line 37, in <module>
        from pocketsphinx import *
      File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 42, in <module>
        _pocketsphinx = swig_import_helper()
      File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 38, in swig_import_helper
        _mod = imp.load_module('_pocketsphinx', fp, pathname, description)
    ImportError: libpocketsphinx.so.3: cannot open shared object file: No such file or directory
    Exception AttributeError: "'PocketSphinxSTT' object has no attribute '_logfile'" in <bound method PocketSphinxSTT.__del__ of <client.stt.PocketSphinxSTT object at 0x75bc2ed0>> ignored
    

    It might work with dict-xsampa.fst, where can i find it?
    Also voxforge.cd_cont_3000 is now voxforge.cd_cont_4000, does that matter?

     

    Last edit: GeneralG 2017-06-13
  • G10DRAS

    G10DRAS - 2017-06-13

    You are using jasper-master version, dict-xsampa.fst will not work with it.

    Error seems not related to acoustic model and g2p model. Try to run Jasper with--debug flag for detailed error messages.

    Check Jasper installation doc for Pocketsphinx version and installation for jasper-master version.

    You can tryvoxforge.cd_cont_4000 and see if it make any difference.

     
  • GeneralG

    GeneralG - 2017-06-14

    I deleted jasper and pocketsphinx completely and set up the profile with the new models, but i still get this error:

    ERROR:root:Error occured!
    Traceback (most recent call last):
      File "jasper.py", line 146, in <module>
        app = Jasper()
      File "jasper.py", line 109, in __init__
        stt_passive_engine_class.get_passive_instance(),
      File "/home/pi/jasper/client/stt.py", line 48, in get_passive_instance
        return cls.get_instance('keyword', phrases)
      File "/home/pi/jasper/client/stt.py", line 42, in get_instance
        instance = cls(**config)
      File "/home/pi/jasper/client/stt.py", line 90, in __init__
        import pocketsphinx as ps
      File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/__init__.py", line 37, in <module>
        from pocketsphinx import *
      File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 42, in <module>
        _pocketsphinx = swig_import_helper()
      File "/usr/local/lib/python2.7/dist-packages/pocketsphinx/pocketsphinx.py", line 38, in swig_import_helper
        _mod = imp.load_module('_pocketsphinx', fp, pathname, description)
    ImportError: /usr/local/lib/libpocketsphinx.so.3: undefined symbol: fe_get_vad_state
    Exception AttributeError: "'PocketSphinxSTT' object has no attribute '_logfile'" in <bound method PocketSphinxSTT.__del__ of <client.stt.PocketSphinxSTT object at 0x75c59c10>> ignored
    

    Even thou this might wonder off topic a bit, do you have and idea what to do?

     
    • Nickolay V. Shmyrev

      ImportError: /usr/local/lib/libpocketsphinx.so.3: undefined symbol: fe_get_vad_state

      Your version of sphinxbase is too old.

       
  • GeneralG

    GeneralG - 2017-06-14

    ok, I'm using sphinxbase-0.8 at the moment but I can't find a newer version. Should i use the sphinxbase-5prealphaand how can I tell Jasper to use it? And if not how do I update my current version or where can I get the New verion?

     
  • G10DRAS

    G10DRAS - 2017-06-15

    pocketsphinx-5prealpha is not supported by jasper-master.

    better use jasper-dev branch. checkout and install pocketsphinx-5prealpha from github https://github.com/cmusphinx.
    and use following config with jasper-dev

    language: 'de-DE'
    stt_engine: sphinx
    pocketsphinx:
       fst_model: '<fst path>/voxforge-de.fst'
       hmm_dir: '<acoustic model path>/model_parameters/voxforge.cd_cont_3000'
       fst_model_alphabet: arpabet
       nbest: 1
    
     
  • GeneralG

    GeneralG - 2017-06-21

    I couldn't make Jasper work with pocketsphinx 5prealpha so I decided to compleatly reinstall Raspbian. Now I'm trying to run Jasper with pocketsphinx0.8 and the new models from github you posted and even thou Jasper starts nothing happens after the "welcome" message. I'm not even getting an error message. Do you have an Idea where that comes from? Or as I'm rather new to speech recognition do you know a good guide for installing the prealpha?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.