title: freeswitch pocketsphinx: install model language
body: <p>i'm using freeswitch with pocketsphinx for speech detection, it's working fine when i use english in grammar files, but now i want to use french, i already downloaded the french model from <a href="https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/French/" rel="nofollow noreferrer">https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/French/</a> then i extracted the cmusphinx-fr-ptm-5.2.tar.gz file in freeswitch/grammar/model/fr/ and the fr.dict in freeswitch/grammar/</p>
  
  <p>this the conf/autoload_configs/pocketsphinx.conf.xml:</p>
  
  <pre><code>&lt;configuration name="pocketsphinx.conf" description="PocketSphinx ASR Configuration"&gt;
    &lt;settings&gt;
      &lt;param name="threshold" value="400"/&gt;
      &lt;param name="silence-hits" value="25"/&gt;
      &lt;param name="listen-hits" value="1"/&gt;
      &lt;param name="auto-reload" value="true"/&gt;
      &lt;!--&lt;param name="language-weight" value="1"/&gt;--&gt;
      &lt;param name="narrowband-model" value="fr"/&gt;
      &lt;!--&lt;param name="wideband-model" value="wsj1"/&gt;--&gt;
      &lt;param name="dictionary" value="fr.dict"/&gt;
    &lt;/settings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>the problem is that freeswitch is blocked when trying to load the grammar file:
  here are the logs:</p>
  
  <pre><code>break=on-false
      Dialplan: sofia/internal/abdofariss@sip.linphone.org parsing [default-&gt;vidson_ivr] continue=false
      Dialplan: sofia/internal/abdofariss@sip.linphone.org Regex (PASS) [vidson_ivr] destination_number(vidson) =~ /^vidson$/ break=on-false
      Dialplan: sofia/internal/abdofariss@sip.linphone.org Action javascript(vidson.js)
      2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:286 (sofia/internal/abdofariss@sip.linphone.org) State Change CS_ROUTING -&gt; CS_EXECUTE
      2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:643 (sofia/internal/abdofariss@sip.linphone.org) State ROUTING going to sleep
      2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/abdofariss@sip.linphone.org) Running State Change CS_EXECUTE (Cur 1 Tot 1)
      2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/abdofariss@sip.linphone.org) State EXECUTE
      2017-01-03 18:36:39.106882 [DEBUG] mod_sofia.c:200 sofia/internal/abdofariss@sip.linphone.org SOFIA EXECUTE
      2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:328 sofia/internal/abdofariss@sip.linphone.org Standard EXECUTE
      EXECUTE sofia/internal/abdofariss@sip.linphone.org set(open=true)
      2017-01-03 18:36:39.106882 [DEBUG] mod_dptools.c:1562 SET sofia/internal/abdofariss@sip.linphone.org [open]=[true]
      EXECUTE sofia/internal/abdofariss@sip.linphone.org hash(insert/164.132.197.182-spymap/abdofariss/31da341e-f146-4239-94f8-1966bbb3c96d)
      EXECUTE sofia/internal/abdofariss@sip.linphone.org hash(insert/164.132.197.182-last_dial/abdofariss/vidson)
      EXECUTE sofia/internal/abdofariss@sip.linphone.org hash(insert/164.132.197.182-last_dial/global/31da341e-f146-4239-94f8-1966bbb3c96d)
      EXECUTE sofia/internal/abdofariss@sip.linphone.org export(RFC2822_DATE=Tue, 03 Jan 2017 18:36:39 +0100)
      2017-01-03 18:36:39.106882 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [RFC2822_DATE]=[Tue, 03 Jan 2017 18:36:39 +0100]
      EXECUTE sofia/internal/abdofariss@sip.linphone.org javascript(vidson.js)
      2017-01-03 18:36:39.126878 [DEBUG] fsglobal.cpp:524 Loading XML
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[opus:116:48000:20:0:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[G722:9:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMU:0:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMA:8:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[opus:116:48000:20:0:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[G722:9:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[opus:116:48000:20:0:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[G722:9:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMU:0:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMA:8:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4843 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4843 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4704 Set telephone-event payload to 101@8000
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:3385 Set Codec sofia/internal/abdofariss@sip.linphone.org PCMA/8000 20 ms 160 samples 64000 bits 1 channels
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_codec.c:111 sofia/internal/abdofariss@sip.linphone.org Original read codec set to PCMA:8
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:5047 Set telephone-event payload to 101@8000
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:5106 sofia/internal/abdofariss@sip.linphone.org Set 2833 dtmf send payload to 101 recv payload to 101
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7653 AUDIO RTP [sofia/internal/abdofariss@sip.linphone.org] 164.132.197.182 port 30020 -&gt; 192.168.0.1 port 48260 codec: 8 ms: 20
      2017-01-03 18:36:39.126878 [DEBUG] switch_rtp.c:3888 Starting timer [soft] 160 bytes per 20ms
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7961 sofia/internal/abdofariss@sip.linphone.org Set 2833 dtmf send payload to 101
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7968 sofia/internal/abdofariss@sip.linphone.org Set 2833 dtmf receive payload to 101
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7991 sofia/internal/abdofariss@sip.linphone.org Set rtp dtmf delay to 40
      2017-01-03 18:36:39.126878 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/abdofariss@sip.linphone.org!
      2017-01-03 18:36:39.126878 [DEBUG] switch_channel.c:3473 (sofia/internal/abdofariss@sip.linphone.org) Callstate Change RINGING -&gt; EARLY
      2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7636 Audio params are unchanged for sofia/internal/abdofariss@sip.linphone.org.
      2017-01-03 18:36:39.126878 [DEBUG] mod_sofia.c:826 Local SDP sofia/internal/abdofariss@sip.linphone.org:
      v=0
      o=FreeSWITCH 1483434979 1483434980 IN IP4 164.132.197.182
      s=FreeSWITCH
      c=IN IP4 164.132.197.182
      t=0 0
      m=audio 30020 RTP/AVP 8 101
      a=rtpmap:8 PCMA/8000
      a=rtpmap:101 telephone-event/8000
      a=fmtp:101 0-16
      a=ptime:20
      a=sendrecv
  
      2017-01-03 18:36:39.126878 [DEBUG] sofia.c:7116 Channel sofia/internal/abdofariss@sip.linphone.org entering state [completed][200]
      2017-01-03 18:36:39.126878 [NOTICE] fssession.cpp:1168 Channel [sofia/internal/abdofariss@sip.linphone.org] has been answered
      2017-01-03 18:36:39.126878 [DEBUG] switch_channel.c:3772 (sofia/internal/abdofariss@sip.linphone.org) Callstate Change EARLY -&gt; ACTIVE
      EXECUTE sofia/internal/abdofariss@sip.linphone.org set(tts_engine=cepstral)
      2017-01-03 18:36:39.126878 [DEBUG] mod_dptools.c:1562 SET sofia/internal/abdofariss@sip.linphone.org [tts_engine]=[cepstral]
      EXECUTE sofia/internal/abdofariss@sip.linphone.org set(tts_voice=isabel)
      2017-01-03 18:36:39.126878 [DEBUG] mod_dptools.c:1562 SET sofia/internal/abdofariss@sip.linphone.org [tts_voice]=[isabel]
      2017-01-03 18:36:39.126878 [DEBUG] fssession.cpp:980 Raw Codec Activation Success L16@8000hz 1 channel 20ms
      2017-01-03 18:36:39.126878 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Bienvenue sur la prise de rendez-vous téléphonique de Vidson-Medical
      2017-01-03 18:36:39.246877 [DEBUG] sofia.c:7116 Channel sofia/internal/abdofariss@sip.linphone.org entering state [ready][200]
      2017-01-03 18:36:39.986880 [INFO] switch_rtp.c:6957 Auto Changing audio port from 192.168.0.1:48260 to ip:48260
      2017-01-03 18:36:44.566901 [DEBUG] switch_rtp.c:7233 RTP RECV DTMF 1:960
      2017-01-03 18:36:44.566901 [INFO] switch_channel.c:515 RECV DTMF 1:960
      2017-01-03 18:36:44.566901 [DEBUG] switch_ivr_play_say.c:2871 done speaking text
      2017-01-03 18:36:44.666896 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Merci de sélectionner une action.
      2017-01-03 18:36:44.666896 [DEBUG] switch_ivr_play_say.c:2871 done speaking text
      2017-01-03 18:36:44.766896 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Pour prendre un rendez-vous, tapez 1
      2017-01-03 18:36:44.766896 [DEBUG] switch_ivr_play_say.c:2871 done speaking text
      2017-01-03 18:36:44.866885 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Pour annuler un rendez-vous, tapez 2
      2017-01-03 18:36:44.866885 [DEBUG] switch_ivr_play_say.c:2871 done speaking text
      2017-01-03 18:36:44.966881 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Pour joindre le secrétariat, tapez 3
      2017-01-03 18:36:44.966881 [DEBUG] switch_ivr_play_say.c:2871 done speaking text
  </code></pre>
  
  <p>can you help me install the model please ?</p>