[Freeswitch-users] Play and detect speech + dtmf

Wilmar Pérez darioperezb at gmail.com
Thu Jul 2 11:06:06 UTC 2020


Hi all,

I am working with freeswitch/LUA.  This is what I am using for my audio
capture function:

play_and_detect_speech(select_an_option.wav detect:unimrcp:unimrcpv2-azure
{start-input-timers = false, no-input-timeout = 10000,recognition-timeout =
20000, speech-incomplete-timeout = 15000, speech-complete-timeout = 1000,
speech-start-timeout = 50, speech-language =
es-MX}builtin:dtmf/digits\nbuiltin:speech/transcribe);

caller_input = session:getVariable('detect_speech_result');

It is working well with dtmf and speech. There is only one more thing I
would like to do: when using dtmf I would like the caller to be able to
press # to signal when the entry is completed and go to the next prompt
immediately.  What is happening now is that # does not really do anything.
After the user presses # it waits until the timeouts are reached (in fact I
have to clean it up from the result after to remove the #).  If I add
*session:setVariable('playback_terminators','#') *before
*play_and_detect_speech*, the result is that whatever was captured is
overridden by the  playback_terminator.  In other words, the
*detect_speech_result *variable does not come back with the digits entered
by the customer but with (literally) "DIGITS: #" instead.

Do you have any tricks in your bag of tricks I can use?

I hope the above is clear.

Thanks!

-- 
--------------------------------------------------------
*Wilmar Pérez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200702/062fc541/attachment.html>


More information about the FreeSWITCH-users mailing list