[Freeswitch-users] Speech recognition SpeechTools.jm Error
Gonzalo Gasca Meza
gascagonzalo at gmail.com
Wed Jan 11 09:07:19 MSK 2017
I renamed @confidence to confidence helped solving this specific issue but
still getting errors when reading result.interpretation.
2017-01-11 00:52:52.739773 [DEBUG] mod_pocketsphinx.c:464 Recognized:
takeout, Confidence: 99, Confidence-Threshold: 0
2017-01-11 00:52:52.759764 [DEBUG] SpeechTools.jm:188 ----XML:
<result grammar="pizza_order">
<interpretation grammar="pizza_order" confidence="99">
<input mode="speech">takeout</input>
</interpretation>
</result>
2017-01-11 00:52:52.759764 [CRIT] SpeechTools.jm:214 ----ERROR:
TypeError: Cannot read property 'interpretation' of undefined
2017-01-11 00:52:55.559759 [NOTICE] sofia.c:1011 Hangup sofia/external/
14088053951 at 104.236.190.206 [CS_EXECUTE] [NORMAL_CLEARING]
On Tue, Jan 10, 2017 at 12:37 AM, Gonzalo Gasca Meza <gascagonzalo at gmail.com
> wrote:
> Code is from sample Grammar provided by Wiki, not my original code...
>
> On Tue, Jan 10, 2017 at 12:32 AM, Артур <findmeinwland at gmail.com> wrote:
>
>> But it's a syntax error, no? I think you need to verify your code
>>
>>
>> 10.01.2017 13:26, Gonzalo Gasca Meza пишет:
>> > Hi all,
>> >
>> > I'm trying to install Speech Recognition engine.
>> >
>> > Version: FreeSWITCH (Version 1.6.13 -21-e755b43 64bit)
>> >
>> > Following this example:
>> >
>> > https://wiki.freeswitch.org/wiki/Mod_pocketsphinx
>> >
>> > <include>
>> > <extension name="pizza_demo">
>> > <condition field="destination_number"
>> expression="^(pizza|74992)$"/>
>> > <condition field="${module_exists(mod_v8)}" expression="true"/>
>> > <condition field="${module_exists(mod_pocketsphinx)}"
>> > expression="true">
>> > <action application="javascript" data="ps_pizza.js"/>
>> > </condition>
>> > </extension>
>> > </include>
>> >
>> > I'm replacing mod_spidermonkey with mod_v8 based on this document and
>> > when I call this number I get:
>> >
>> > EXECUTE sofia/external/14088053951 at 104.236.190.206
>> > javascript(ps_pizza.js)
>> > 2017-01-10 03:04:39.099748 [ERR] SpeechTools.jm:191 Exception:
>> > SyntaxError: Unexpected identifier (near: "
>> if
>> > (result.interpretation. at confidence >= grammar_object.min_score) {")
>> >
>> > If I change: result.interpretation. at confidence to
>> > result.interpretation.['@confidence']
>> >
>> > EXECUTE sofia/external/14088053951 at 104.236.190.206
>> > export(RFC2822_DATE=Tue, 10 Jan 2017 03:13:10 -0500)
>> > 2017-01-10 03:13:10.139816 [DEBUG] switch_channel.c:1296 EXPORT
>> > (export_vars) [RFC2822_DATE]=[Tue, 10 Jan 2017 03:13:10 -0500]
>> > EXECUTE sofia/external/14088053951 at 104.236.190.206
>> > javascript(ps_pizza.js)
>> > 2017-01-10 03:13:10.159763 [ERR] SpeechTools.jm:191 Exception:
>> > SyntaxError: Unexpected string (near: "
>> if
>> > (result.interpretation.['@confidence'] >= grammar_object.min_score) {")
>> >
>> > SpeechTools.jm from:
>> > https://raw.githubusercontent.com/lordnull/FreeSWITCH/master
>> /scripts/javascript/js_modules/SpeechTools.jm
>> >
>> > Similar discussion:
>> > http://lists.freeswitch.org/pipermail/freeswitch-users/2014-
>> June/105818.html
>> >
>> > Any pointers?
>> > I get the mod_v8 module compiled from Freeswitch using this:
>> > https://freeswitch.org/confluence/display/FREESWITCH/mod_v8
>> >
>> > Thanks
>> >
>> >
>> >
>> >
>> > ____________________________________________________________
>> _____________
>> > Professional FreeSWITCH Consulting Services:
>> > consulting at freeswitch.org
>> > http://www.freeswitchsolutions.com
>> >
>> > Official FreeSWITCH Sites
>> > http://www.freeswitch.org
>> > http://confluence.freeswitch.org
>> > http://www.cluecon.com
>> >
>> > FreeSWITCH-users mailing list
>> > FreeSWITCH-users at lists.freeswitch.org
>> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/
>> freeswitch-users
>> > http://www.freeswitch.org
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170110/4d7f8ad4/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list