Am I using play_and_detect_speech correctly?
Hello, I am using play_and_detect_speech with Java ESL in my IVR applications. Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine. Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event. I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence. Obviously the new command will stop the utterance speaking of the previous command if it is not finished. My question is will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server? Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"? Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech. Please any one could shed a light on this? Many thanks! Xing -- Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278.
You are using that APP in a way that hasn't been tested. Try to do "speech_detect pause" and see if that helps. It will reserve your ASR session for reuse while "speech_detect stop" will tear it down completely. If that doesn't work, open a jira ticket and attach a full call trace. It's difficult to understand exactly what is happening from your description. Chris On Mon, Jul 30, 2012 at 5:38 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:
**
Hello,
I am using play_and_detect_speech with Java ESL in my IVR applications.
Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine.
Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event.
I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence.
Obviously the new command will stop the utterance speaking of the previous command if it is not finished.
My question is
will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server?
Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"?
Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech.
Please any one could shed a light on this?
Many thanks!
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Chris, Okay, thanks! I will have tries to see how it works. For the normal use of the app: play_and_detect_speech, will it resume previous ASR session, or will it stop previous session and restart a new session each time when I issue it via ESL? For the app of detect_speech, I can first to start an ASR session by "detect_speech speechMod grammar grammarPath", then I can do "detect_speech pause", or "detect_speech resume" or "detect_speech stop". But for play_and_detect_speech, I am not sure how it works in terms of starting, pause, resume/restart sequence. The play_and_detect_speech is a very good, useful app as it supports the barge-in. So we definitely need to use it. Thanks! Xing On 07/31/2012 12:53 AM, Christopher Rienzo wrote:
You are using that APP in a way that hasn't been tested. Try to do "speech_detect pause" and see if that helps. It will reserve your ASR session for reuse while "speech_detect stop" will tear it down completely. If that doesn't work, open a jira ticket and attach a full call trace. It's difficult to understand exactly what is happening from your description.
Chris
On Mon, Jul 30, 2012 at 5:38 PM, Liu, Xingkun <X.Liu@hw.ac.uk <mailto:X.Liu@hw.ac.uk>> wrote:
Hello,
I am using play_and_detect_speech with Java ESL in my IVR applications.
Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine.
Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event.
I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence.
Obviously the new command will stop the utterance speaking of the previous command if it is not finished.
My question is
will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server?
Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"?
Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech.
Please any one could shed a light on this?
Many thanks!
------------------------------------------------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders <http://www.hw.ac.uk/researchleaders> for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278.
I looked over the code again last night and verified that play_and_detect_speech should try to stop detection before loading the grammar. However, that scenario is not really tested, so try the workaround first. If that doesn't work, open a jira ticket with detailed logs so it can be fixed. You can use the detect_speech APP to do everything over ESL. It is a lot more work, but once you figure it out, you have the freedom to do whatever you want, including handling barge-in. play_and_detect_speech is designed to handle the typical use case. Chris On Tue, Jul 31, 2012 at 3:59 AM, x.liu <x.liu@hw.ac.uk> wrote:
Hi Chris,
Okay, thanks! I will have tries to see how it works.
For the normal use of the app: play_and_detect_speech, will it resume previous ASR session, or will it stop previous session and restart a new session each time when I issue it via ESL?
For the app of detect_speech, I can first to start an ASR session by "detect_speech speechMod grammar grammarPath", then I can do "detect_speech pause", or "detect_speech resume" or "detect_speech stop". But for play_and_detect_speech, I am not sure how it works in terms of starting, pause, resume/restart sequence.
The play_and_detect_speech is a very good, useful app as it supports the barge-in. So we definitely need to use it.
Thanks!
On 07/31/2012 12:53 AM, Christopher Rienzo wrote:
You are using that APP in a way that hasn't been tested. Try to do "speech_detect pause" and see if that helps. It will reserve your ASR session for reuse while "speech_detect stop" will tear it down completely. If that doesn't work, open a jira ticket and attach a full call trace. It's difficult to understand exactly what is happening from your description.
Chris
On Mon, Jul 30, 2012 at 5:38 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:
Hello,
I am using play_and_detect_speech with Java ESL in my IVR applications.
Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine.
Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event.
I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence.
Obviously the new command will stop the utterance speaking of the previous command if it is not finished.
My question is
will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server?
Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"?
Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech.
Please any one could shed a light on this?
Many thanks!
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Chris, Many thanks for your info and suggestions! Would you please tell me a bit more or any clue about the idea of using detect_speech APP to handle barge-in over ESL? It is an interesting idea to try but for now I don't have any clue how it could be done over Java ESL without touching or modifying detect_speech APP codes. Thanks again! Best regards, Xing -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Christopher Rienzo Sent: Tue 7/31/2012 13:44 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? I looked over the code again last night and verified that play_and_detect_speech should try to stop detection before loading the grammar. However, that scenario is not really tested, so try the workaround first. If that doesn't work, open a jira ticket with detailed logs so it can be fixed. You can use the detect_speech APP to do everything over ESL. It is a lot more work, but once you figure it out, you have the freedom to do whatever you want, including handling barge-in. play_and_detect_speech is designed to handle the typical use case. Chris On Tue, Jul 31, 2012 at 3:59 AM, x.liu <x.liu@hw.ac.uk> wrote:
Hi Chris,
Okay, thanks! I will have tries to see how it works.
For the normal use of the app: play_and_detect_speech, will it resume previous ASR session, or will it stop previous session and restart a new session each time when I issue it via ESL?
For the app of detect_speech, I can first to start an ASR session by "detect_speech speechMod grammar grammarPath", then I can do "detect_speech pause", or "detect_speech resume" or "detect_speech stop". But for play_and_detect_speech, I am not sure how it works in terms of starting, pause, resume/restart sequence.
The play_and_detect_speech is a very good, useful app as it supports the barge-in. So we definitely need to use it.
Thanks!
On 07/31/2012 12:53 AM, Christopher Rienzo wrote:
You are using that APP in a way that hasn't been tested. Try to do "speech_detect pause" and see if that helps. It will reserve your ASR session for reuse while "speech_detect stop" will tear it down completely. If that doesn't work, open a jira ticket and attach a full call trace. It's difficult to understand exactly what is happening from your description.
Chris
On Mon, Jul 30, 2012 at 5:38 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:
Hello,
I am using play_and_detect_speech with Java ESL in my IVR applications.
Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine.
Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event.
I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence.
Obviously the new command will stop the utterance speaking of the previous command if it is not finished.
My question is
will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server?
Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"?
Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech.
Please any one could shed a light on this?
Many thanks!
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@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@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278.
You need to send a detect_speech command with sendmsg + execute: sendmsg <uuid> call-command: execute execute-app-name: detect_speech execute-app-arg: grammar_name //e.g. unimrcp:nuance5-mrcp2-prod nuancegrm nuancegrm This will trigger an DETECTED_SPEECH event (you need to add this event to your filters, in case you're filtering the events). The detected speech will be part of the bodyLines of the event. I'm using Java ESL client libraries (org.freeswitch.esl.client) and my code looks like: protected void handleEslEvent(ChannelHandlerContext ctx, EslEvent event) { if (event.getEventName().equals("DETECTED_SPEECH")) { if (event.getEventBodyLines().size() > 0) { final String uuid = event.getEventHeaders().get("Unique-ID"); stopSpeechDetection(uuid); //detected speech StringBuilder bodyLines = new StringBuilder(); for (String line : event.getEventBodyLines()) { bodyLines.append(line); } } } } private void stopSpeechDetection(CallSession call) { // sendMessage(uuid, "detect_speech", "stop"); } g.luck! From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Liu, Xingkun Sent: Wednesday, August 01, 2012 4:49 AM To: FreeSWITCH Users Help; FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? Hi Chris, Many thanks for your info and suggestions! Would you please tell me a bit more or any clue about the idea of using detect_speech APP to handle barge-in over ESL? It is an interesting idea to try but for now I don't have any clue how it could be done over Java ESL without touching or modifying detect_speech APP codes. Thanks again! Best regards, Xing -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> on behalf of Christopher Rienzo Sent: Tue 7/31/2012 13:44 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? I looked over the code again last night and verified that play_and_detect_speech should try to stop detection before loading the grammar. However, that scenario is not really tested, so try the workaround first. If that doesn't work, open a jira ticket with detailed logs so it can be fixed. You can use the detect_speech APP to do everything over ESL. It is a lot more work, but once you figure it out, you have the freedom to do whatever you want, including handling barge-in. play_and_detect_speech is designed to handle the typical use case. Chris On Tue, Jul 31, 2012 at 3:59 AM, x.liu <x.liu@hw.ac.uk<mailto:x.liu@hw.ac.uk>> wrote:
Hi Chris,
Okay, thanks! I will have tries to see how it works.
For the normal use of the app: play_and_detect_speech, will it resume previous ASR session, or will it stop previous session and restart a new session each time when I issue it via ESL?
For the app of detect_speech, I can first to start an ASR session by "detect_speech speechMod grammar grammarPath", then I can do "detect_speech pause", or "detect_speech resume" or "detect_speech stop". But for play_and_detect_speech, I am not sure how it works in terms of starting, pause, resume/restart sequence.
The play_and_detect_speech is a very good, useful app as it supports the barge-in. So we definitely need to use it.
Thanks!
On 07/31/2012 12:53 AM, Christopher Rienzo wrote:
You are using that APP in a way that hasn't been tested. Try to do "speech_detect pause" and see if that helps. It will reserve your ASR session for reuse while "speech_detect stop" will tear it down completely. If that doesn't work, open a jira ticket and attach a full call trace. It's difficult to understand exactly what is happening from your description.
Chris
On Mon, Jul 30, 2012 at 5:38 PM, Liu, Xingkun <X.Liu@hw.ac.uk<mailto:X.Liu@hw.ac.uk>> wrote:
Hello,
I am using play_and_detect_speech with Java ESL in my IVR applications.
Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine.
Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event.
I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence.
Obviously the new command will stop the utterance speaking of the previous command if it is not finished.
My question is
will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server?
Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"?
Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech.
Please any one could shed a light on this?
Many thanks!
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@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@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users<mailto:listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org<http://lists.freeswitch.org/mailman/options/freeswitch-usershttp:/www.freeswitch.org>
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
________________________________ Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012. We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278.
Thanks for your response, Hector! Yeah, I am using detect_speech via a similar way to yours. What I am more interested in is to use detect_speech app to handle user's barge-in. After Chris mentioned the barge-in can be also handled by detect_speech I gave it a further thinking. Yeah, I could first "speak" the utterance and immediately resume ASR, then try to catch the begin_speaking event, then stop the TTS -- using this way to handle the user barge-in. (Chris, you may have a better idea, would you please let me know if you do?) One thing I am worry about is that stopping currently playing media or utterance seems not work for me. When I recently try "api uuid_break <uuid>" it stopped currently playing music but also stopped playing following utterances which I sent to TTS soon later on after uuid_break. Anyway I will try it further again and let you all know what I will get. Cheers, Xing -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Hector Geraldino Sent: Wed 8/1/2012 16:52 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? You need to send a detect_speech command with sendmsg + execute: sendmsg <uuid> call-command: execute execute-app-name: detect_speech execute-app-arg: grammar_name //e.g. unimrcp:nuance5-mrcp2-prod nuancegrm nuancegrm This will trigger an DETECTED_SPEECH event (you need to add this event to your filters, in case you're filtering the events). The detected speech will be part of the bodyLines of the event. I'm using Java ESL client libraries (org.freeswitch.esl.client) and my code looks like: protected void handleEslEvent(ChannelHandlerContext ctx, EslEvent event) { if (event.getEventName().equals("DETECTED_SPEECH")) { if (event.getEventBodyLines().size() > 0) { final String uuid = event.getEventHeaders().get("Unique-ID"); stopSpeechDetection(uuid); //detected speech StringBuilder bodyLines = new StringBuilder(); for (String line : event.getEventBodyLines()) { bodyLines.append(line); } } } } private void stopSpeechDetection(CallSession call) { // sendMessage(uuid, "detect_speech", "stop"); } g.luck! From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Liu, Xingkun Sent: Wednesday, August 01, 2012 4:49 AM To: FreeSWITCH Users Help; FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? Hi Chris, Many thanks for your info and suggestions! Would you please tell me a bit more or any clue about the idea of using detect_speech APP to handle barge-in over ESL? It is an interesting idea to try but for now I don't have any clue how it could be done over Java ESL without touching or modifying detect_speech APP codes. Thanks again! Best regards, Xing -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org<mailto:freeswitch-users-bounces@lists.freeswitch.org> on behalf of Christopher Rienzo Sent: Tue 7/31/2012 13:44 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? I looked over the code again last night and verified that play_and_detect_speech should try to stop detection before loading the grammar. However, that scenario is not really tested, so try the workaround first. If that doesn't work, open a jira ticket with detailed logs so it can be fixed. You can use the detect_speech APP to do everything over ESL. It is a lot more work, but once you figure it out, you have the freedom to do whatever you want, including handling barge-in. play_and_detect_speech is designed to handle the typical use case. Chris On Tue, Jul 31, 2012 at 3:59 AM, x.liu <x.liu@hw.ac.uk<mailto:x.liu@hw.ac.uk>> wrote:
Hi Chris,
Okay, thanks! I will have tries to see how it works.
For the normal use of the app: play_and_detect_speech, will it resume previous ASR session, or will it stop previous session and restart a new session each time when I issue it via ESL?
For the app of detect_speech, I can first to start an ASR session by "detect_speech speechMod grammar grammarPath", then I can do "detect_speech pause", or "detect_speech resume" or "detect_speech stop". But for play_and_detect_speech, I am not sure how it works in terms of starting, pause, resume/restart sequence.
The play_and_detect_speech is a very good, useful app as it supports the barge-in. So we definitely need to use it.
Thanks!
On 07/31/2012 12:53 AM, Christopher Rienzo wrote:
You are using that APP in a way that hasn't been tested. Try to do "speech_detect pause" and see if that helps. It will reserve your ASR session for reuse while "speech_detect stop" will tear it down completely. If that doesn't work, open a jira ticket and attach a full call trace. It's difficult to understand exactly what is happening from your description.
Chris
On Mon, Jul 30, 2012 at 5:38 PM, Liu, Xingkun <X.Liu@hw.ac.uk<mailto:X.Liu@hw.ac.uk>> wrote:
Hello,
I am using play_and_detect_speech with Java ESL in my IVR applications.
Previously I call it again each time after I receive any recognition event, like recognition complete, no-input-timeout, or recognition-timeout, it seems to work fine.
Now I have changed my app to issue play_and_detect_speech command based on my available system utterances as well as the speech event.
I.e., I use a separate thread to constantly check if there is a system utterance coming in from another component of my application, if there is any utterance I issue the command which will speak the new utterance and listen to user input no matter whether or not previous command has finished. And if there is any speech event (recognition result, timeout etc.) the play_and_detect_speech command is also issued but with playing silence.
Obviously the new command will stop the utterance speaking of the previous command if it is not finished.
My question is
will the new play_and_detect_speech command also stop the previous ASR listening or will there be many ASR listening channel and sending speech data (or silence) to ASR server?
Do I need to explicitly issue a "stop" commnad before issuing a new play_and_detect_speech? If yes, how to do that, by "detect_speech stop"?
Recently there is a network traffice problem (lots of connections /data transportation to the ASR server machine) when I am running my application. I am not sure if this is because of other issues or because of my new changes to the way of using play_and_detect_speech.
Please any one could shed a light on this?
Many thanks!
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@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@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users<mailto:listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org<http://lists.freeswitch.org/mailman/options/freeswitch-usershttp:/www.freeswitch.org>
------------------------------
*Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.*
We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply.
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
________________________________ Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012. We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders<http://www.hw.ac.uk/researchleaders> for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278. -- Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278.
The basic procedure for barge in is: 1. detect_speech unimrcp {start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000}builtin:grammar/boolean?language=en-US;y=1;n=2 2. playback say:please say yes or no. please say no or yes. please say something! 3. handle begin-speaking event 4. break 5. when playback finishes... detect_speech start_input_timers 6. handle detected-speech event This is pretty much what play_and_detect_speech already does... see switch_ivr_play_and_detect_speech() in switch_ivr_async.c if you know C. Chris On Wed, Aug 1, 2012 at 1:49 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:
**
Thanks for your response, Hector!
Yeah, I am using detect_speech via a similar way to yours.
What I am more interested in is to use detect_speech app to handle user's barge-in.
After Chris mentioned the barge-in can be also handled by detect_speech I gave it a further thinking. Yeah, I could first "speak" the utterance and immediately resume ASR, then try to catch the begin_speaking event, then stop the TTS -- using this way to handle the user barge-in. (Chris, you may have a better idea, would you please let me know if you do?)
One thing I am worry about is that stopping currently playing media or utterance seems not work for me. When I recently try "api uuid_break <uuid>" it stopped currently playing music but also stopped playing following utterances which I sent to TTS soon later on after uuid_break.
Anyway I will try it further again and let you all know what I will get.
Cheers,
Many thanks, Chris! I will have tries on it later on. In my original question regarding to too many network connections/much traffic issues, I re-setup the destination machine OS the problem seems to have been solved. So the play_and_detect_speech APP look likes working fine, so I have not yet tried the workaround by issuing "detect_speech pause". I will try it later if there was something unusual happening to me after more tests. So for now I think the problem has been resolved. Thanks again! Xing -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Christopher Rienzo Sent: Wed 8/1/2012 20:06 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly? The basic procedure for barge in is: 1. detect_speech unimrcp {start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000}builtin:grammar/boolean?language=en-US;y=1;n=2 2. playback say:please say yes or no. please say no or yes. please say something! 3. handle begin-speaking event 4. break 5. when playback finishes... detect_speech start_input_timers 6. handle detected-speech event This is pretty much what play_and_detect_speech already does... see switch_ivr_play_and_detect_speech() in switch_ivr_async.c if you know C. Chris On Wed, Aug 1, 2012 at 1:49 PM, Liu, Xingkun <X.Liu@hw.ac.uk> wrote:
**
Thanks for your response, Hector!
Yeah, I am using detect_speech via a similar way to yours.
What I am more interested in is to use detect_speech app to handle user's barge-in.
After Chris mentioned the barge-in can be also handled by detect_speech I gave it a further thinking. Yeah, I could first "speak" the utterance and immediately resume ASR, then try to catch the begin_speaking event, then stop the TTS -- using this way to handle the user barge-in. (Chris, you may have a better idea, would you please let me know if you do?)
One thing I am worry about is that stopping currently playing media or utterance seems not work for me. When I recently try "api uuid_break <uuid>" it stopped currently playing music but also stopped playing following utterances which I sent to TTS soon later on after uuid_break.
Anyway I will try it further again and let you all know what I will get.
Cheers,
-- Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply. Heriot-Watt University is a Scottish charity registered under charity number SC000278.
participants (4)
-
Christopher Rienzo
-
Hector Geraldino
-
Liu, Xingkun
-
x.liu