[Freeswitch-users] Stopping TTS when play_and_detect_speech gets MRCP START-OF-INPUT

mayamatakeshi mayamatakeshi at gmail.com
Thu Mar 18 03:23:19 UTC 2021


On Wed, Mar 17, 2021 at 6:52 PM mayamatakeshi <mayamatakeshi at gmail.com>
wrote:

> Hi,
> I'm trying play_and_detect_speech with an ESL app but START-OF-INPUT
> doesn't interrupt the TTS being played.
> Is this expected?
> (
> https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+play_and_detect_speech
> is not clear about it)
> Or maybe I need to set some channel variable for this to work.
>

Hi,
My app is a fork of https://github.com/plivo/plivoframework
I debugged FS code and found the cause of the problem:
I verified that the DETECTED_SPEECH events (including the one
with Speech-Type begin-speaking) were not being fired.
This was because my app was not setting this variable:
  https://freeswitch.org/confluence/display/FREESWITCH/fire_asr_events
Then I set fire_asr_events=true
but still the prompt didn't get interrupted by speech.
Then I checked how FS code was fetching (dequeuing) events and I realized
it checks for divert_events.
Then I changed my app to send
  divert_events off
in the ESL socket
and after that it worked and FS stopped the prompt upon speech start.
However, it is not stopping the prompt when a DTMF digit is received (it
was already this way before I did the changes).
So things are better but still there is something amiss.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20210318/badab939/attachment.html>


More information about the FreeSWITCH-users mailing list