[Freeswitch-users] Re- mod_pocketsphinx working example

Andrew Keil andrew.keil at visytel.com
Mon Dec 12 06:19:08 MSK 2016


To FreeSWITCH users,

I am about to experiment with Speech Recognition inside FreeSWITCH and seem to have hit a wall.

After building FreeSWITCH 1.6.13 with asr_tts/mod_pocketsphinx uncommented successfully.
Then uncommenting from autoload_configs/modules.conf.xml <load module="mod_pocketsphinx/>.

Then trying to run the pizza demo from the old Wiki: https://wiki.freeswitch.org/wiki/Mod_pocketsphinx

I get the following:

...
EXECUTE sofia/internal/1000 at 192.168.15.50:5080 detect_speech(pocketsphinx pizza_order  undefined)
2016-12-12 14:07:16.345674 [DEBUG] switch_core_media_bug.c:828 Attaching BUG to sofia/internal/1000 at 192.168.15.50:5080
2016-12-12 14:07:16.345674 [WARNING] mod_pocketsphinx.c:172 Can't open speech model /usr/local/freeswitch/grammar/model/wsj1.
2016-12-12 14:07:16.345674 [DEBUG] switch_ivr_async.c:4800 Error loading Grammar
2016-12-12 14:07:16.345674 [INFO] mod_pocketsphinx.c:257 Port Closed.
2016-12-12 14:07:16.345674 [DEBUG] switch_core_media_bug.c:1190 Removing BUG from sofia/internal/1000 at 192.168.15.50:5080
2016-12-12 14:07:16.366177 [CRIT] SpeechTools.jm:213 ----ERROR:
ReferenceError: XML is not defined
EXECUTE sofia/internal/1000 at 192.168.15.50:5080 detect_speech(resume)
2016-12-12 14:07:16.865609 [DEBUG] switch_core_file.c:334 File /usr/local/freeswitch/sounds/en/us/callie/pizza/GP-DeliveryorTakeout.wav sample rate 8000 doesn't match requested rate 16000
2016-12-12 14:07:16.865609 [DEBUG] switch_ivr_play_say.c:1468 Codec Activated L16 at 16000hz 1 channels 20ms
2016-12-12 14:07:19.585569 [DEBUG] switch_ivr_play_say.c:1911 done playing file /usr/local/freeswitch/sounds/en/us/callie/pizza/GP-DeliveryorTakeout.wav
EXECUTE sofia/internal/1000 at 192.168.15.50:5080 detect_speech(resume)
2016-12-12 14:07:21.245871 [NOTICE] sofia.c:1011 Hangup sofia/internal/1000 at 192.168.15.50:5080 [CS_EXECUTE] [NORMAL_CLEARING]
2016-12-12 14:07:21.245871 [ERR] SpeechTools.jm:472 Exception: Session is not active! (near: "                                                 rv = this.asr.session.collectInput(this.asr.onInput, this.asr, 1000);")
...

I noticed that there is no grammar model "wsj1" inside /usr/local/freeswitch/grammar/model
Also I cannot find wsj1 anywhere from the src or freeswitch files online.  Does anyone have a tar.gz version of this?  So at least I can get past this issue.

Then I decided to follow the Lua directory example: https://freeswitch.org/confluence/display/FREESWITCH/Lua+ASR+TTS+Directory+Example

About half way down it states:
==========================================

Next we create our dictionary and language model file. Change your directory to /usr/local/freeswitch/grammar and create a file called directory.sent
We are using Matthew Williams and Joe Smith as our examples.
<s> MATTHEW_WILLIAMS </s>
<s> MATT_WILLIAMS </s>
<s> JOSEPH_SMITH </s>
<s> JOE_SMITH </s>

Type make in the /usr/local/freeswitch/grammar directory.

This should give you the following files.
ls -la directory
-rw-r--r--  1 root root   82 2008-08-13 10:59 directory.dic
-rw-r--r--  1 root root  727 2008-08-13 10:59 directory.lm

This does not work since the "make" does not work here!
Any ideas?

So far not much luck.  I understand that pocketsphinx is not really a production product, however my client would like to make use of it for internal testing only.

Any assistance would be great.

Thanks in advance,

Andrew Keil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20161212/14822447/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list