how change language with cmu sphinx

985 views
Skip to first unread message

Julien De visscher

unread,
May 8, 2015, 10:02:27 AM5/8/15
to jasper-sup...@googlegroups.com
how can i change language with pocketsphinx ?

Julien De visscher

unread,
May 12, 2015, 1:53:35 PM5/12/15
to jasper-sup...@googlegroups.com
can you help me?
i would like speak in french with pockectsphinx how can y do for make this?

Julien De visscher

unread,
May 13, 2015, 12:14:15 AM5/13/15
to jasper-sup...@googlegroups.com
i found this : 

pocketsphinx_continuous -inmic yes -lm 8521.lm -dict 8521.dic
with that i think i can start pocketsphinx with oter dictionary. 

if i found the launch command in jasper i can start jasper and he listening in french but where is it?

Guilhem

unread,
May 14, 2015, 1:38:04 PM5/14/15
to jasper-sup...@googlegroups.com
Hello Julien

I am trying to do configure Jasper in French too.
There is documentation on Ubuntu FR documentation to configure pocketsphinx in French :

http://doc.ubuntu-fr.org/pocketsphinx


I followed the instructions to get all needed stuff, and configured my Jasper profile to use French acoustic model (and kept default FST model, I don't know whether we need a specific one for French)

pocketsphinx:
  fst_model: '/home/pi/phonetisaurus/g014b2b.fst'
  hmm_dir: '/usr/local/share/pocketsphinx/model/hmm/fr_FR/french_f0'


Anyway it is still not working for me : it is like it doesn't hear anything :

INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['']


Debug mode doesn't show anything useful either :-(

$ jasper/jasper.py --debug
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
DEBUG:client.diagnose:Checking network connection to server 'www.google.com'...
DEBUG:client.diagnose:Network connection working
DEBUG:__main__:Trying to read config file: '/home/pi/.jasper/profile.yml'
DEBUG:client.diagnose:Checking python import 'pocketsphinx'...
DEBUG:client.diagnose:Python module 'pocketsphinx' found: '/usr/local/lib/python2.7/dist-packages/pocketsphinx.so'
DEBUG:client.diagnose:Checking executable 'aplay'...
DEBUG:client.diagnose:Executable 'aplay' found: '/usr/bin/aplay'
DEBUG:client.diagnose:Checking executable 'pico2wave'...
DEBUG:client.diagnose:Executable 'pico2wave' found: '/usr/bin/pico2wave'
DEBUG:client.vocabcompiler:compiled_revision is 'bb74ae36d130ef20de710e3a77b43424b8fa774f'
DEBUG:client.brain:Looking for modules in: '/home/pi/Development/Jasper/jasper/client/modules'
DEBUG:client.brain:Found module 'Birthday' with words: ['BIRTHDAY']
DEBUG:client.brain:Found module 'Bonjour' with words: ['BONJOUR', 'SALUT']
DEBUG:client.brain:Found module 'Gmail' with words: ['EMAIL', 'INBOX']
DEBUG:client.brain:Found module 'HN' with words: ['HACKER', 'NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Joke' with words: ['JOKE', 'KNOCK KNOCK']
DEBUG:client.brain:Found module 'Life' with words: ['MEANING', 'OF', 'LIFE']
DEBUG:client.brain:Found module 'MPDControl' with words: ['MUSIC', 'SPOTIFY']
DEBUG:client.brain:Found module 'News' with words: ['NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Notifications' with words: ['FACEBOOK', 'NOTIFICATION']
DEBUG:client.brain:Found module 'Time' with words: ['TIME']
DEBUG:client.brain:Found module 'Unclear' with words: []
DEBUG:client.brain:Found module 'Weather' with words: ['WEATHER', 'TODAY', 'TOMORROW']
DEBUG:client.vocabcompiler:compiled_revision is '2c0658c72555a75a30689e8dae6abe4e86bcade7'
INFO:client.mic:Initializing PyAudio. ALSA/Jack error messages that pop up during this process are normal and can usually be safely ignored.
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'Comment puis-je vous aider, messieurs dames?' with 'pico-tts'
DEBUG:client.tts:Executing pico2wave --wave /tmp/tmpsMQ6ND.wav -l fr-FR 'Comment puis-je vous aider, messieurs dames?'
DEBUG:client.tts:Executing aplay -D hw:0,0 /tmp/tmpsMQ6ND.wav
DEBUG:client.tts:Output was: 'Lecture WAVE '/tmp/tmpsMQ6ND.wav' : Signed 16 bit Little Endian, Fréquence 16000 Hz, Mono'
DEBUG:client.brain:Looking for modules in: '/home/pi/Development/Jasper/jasper/client/modules'
DEBUG:client.brain:Found module 'Birthday' with words: ['BIRTHDAY']
DEBUG:client.brain:Found module 'Bonjour' with words: ['BONJOUR', 'SALUT']
DEBUG:client.brain:Found module 'Gmail' with words: ['EMAIL', 'INBOX']
DEBUG:client.brain:Found module 'HN' with words: ['HACKER', 'NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Joke' with words: ['JOKE', 'KNOCK KNOCK']
DEBUG:client.brain:Found module 'Life' with words: ['MEANING', 'OF', 'LIFE']
DEBUG:client.brain:Found module 'MPDControl' with words: ['MUSIC', 'SPOTIFY']
DEBUG:client.brain:Found module 'News' with words: ['NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Notifications' with words: ['FACEBOOK', 'NOTIFICATION']
DEBUG:client.brain:Found module 'Time' with words: ['TIME']
DEBUG:client.brain:Found module 'Unclear' with words: []
DEBUG:client.brain:Found module 'Weather' with words: ['WEATHER', 'TODAY', 'TOMORROW']
WARNING:client.notifier:gmail_address or gmail_password not set in profile, Gmail notifier will not be used
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
INFO:client.conversation:Starting to handle conversation with keyword 'JASPER'.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-05-14 17:36:01.795635+00:00 (in 29.990079 seconds)
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'



Guilhem

unread,
May 15, 2015, 3:20:21 AM5/15/15
to jasper-sup...@googlegroups.com

Julien De visscher

unread,
May 18, 2015, 12:42:04 PM5/18/15
to jasper-sup...@googlegroups.com
hello
je vais parler en français pour avoir plus simple. j'ai lut énormément de chose en français et en anglais j'ai voulus faire des test avec julius pour jasper, tout a foirer. j'ai même fait une overdose de lecture tellement j’étais a bout et je n'ai rien trouver. n’étant pas non plus un expert linux je suis d'autant plus larguer. pourrais tu m'aider avec des instructions claire?
je lit " j'ai fait des modif dans fst.py " mais il est ou ce fst.py. a chaque coup je me fait avoir parce que à un moment je ne trouve pas un fichier ou j'ai un commande qui passe pas. enfin
j'ai une pi b+ jasper et pocketsphinx qui tourne en anglais ( après 30 minutes ça plante sa me dit overfload, mais ce problème c'est pour plus tard) 

Guilhem

unread,
May 18, 2015, 1:18:22 PM5/18/15
to jasper-sup...@googlegroups.com
If you don't mind, I continue in english so that others can take advantage of that discussion too

Default configuration is the following :

pocketsphinx:
  fst_model: '[JASPER_INSTALL_DIR]/phonetisaurus/g014b2b.fst'
  hmm_dir: '/usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k'


What I tried : I downloaded the following files :
http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/French%20Language%20Model/french3g62K.lm.dmp/download
http://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/French%20F0%20Broadcast%20News%20Acoustic%20Model/lium_french_f0.tar.gz/download

And declared them in /home/pi/.jasper/profile.yml to replace default configuration :

pocketsphinx:
  fst_model: '/usr/local/share/pocketsphinx/model/lm/fr_FR/french3g62K.lm.dmp'
  hmm_dir: '/usr/local/share/pocketsphinx/model/hmm/fr_FR/french_f0'


Anyway, it does not work :-(
Jasper just doesn't hear anything
I don't know why !

Julien De visscher

unread,
May 21, 2015, 12:03:55 PM5/21/15
to jasper-sup...@googlegroups.com
ok for everybody in english

i test pocketsphinx with the french dictionary with this command in a shell : 

pocketsphinx_continuous -inmic yes -lm 8521.lm -dict 8521.dic
i dont understant how pocketsphinx work and after a lot of error he start.

i you found solution tell me please. i search to but i lose hope.

Julien De visscher

unread,
May 21, 2015, 12:26:32 PM5/21/15
to jasper-sup...@googlegroups.com
i have compile g014b2b.fst when i install it 

can be compile lium_french?

Julien De visscher

unread,
May 21, 2015, 12:49:19 PM5/21/15
to jasper-sup...@googlegroups.com
i don't understand, when i read about pocketsphinx he talk about file.lm and file.dic 
but i don't found this in jasper

Dũng Lê Xuân

unread,
Apr 12, 2018, 11:22:25 PM4/12/18
to Jasper Support Forum
Hi @Julien,
Have you done that yet?
help me. 
i don't understand, when i read about pocketsphinx he talk about file.lm and file.dic 
but i don't found this in jasper
thanks you
Reply all
Reply to author
Forward
0 new messages