" /> Playing a WAV in ORS - Genesys CTI User Forum

Author Topic: Playing a WAV in ORS  (Read 8216 times)

Offline gawix

  • Newbie
  • *
  • Posts: 28
  • Karma: 1
Playing a WAV in ORS
« on: January 23, 2013, 03:22:28 AM »
Advertisement
Is it possible to http-fetch and play a WAV in ORS without having to do a <dialog:start>? 

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Playing a WAV in ORS
« Reply #1 on: January 23, 2013, 02:08:57 PM »
?? ORS can replace a GVP?? It excutes VXML but does it has MS features???

Offline gawix

  • Newbie
  • *
  • Posts: 28
  • Karma: 1
Re: Playing a WAV in ORS
« Reply #2 on: January 23, 2013, 03:01:03 PM »
I'm having trouble following you.

ORS is [i]Orchestration Server[/i] (maybe I should have said [i]OS[/i] instead), the SCXML interpreter which is part of URS. URS can either execute a routing script made with IRD or invoke ORS to execute an SCXML document ([i]Orchestration Application[/i] in Genesys terms).

GVP acts as the Media Server and process some directives like PlayAnnouncement.  SCXML sample below (fragment):

    <dialog:play language="'English_US'">
        <dialog:prompts type="ann">
          <dialog:prompt interrupt="true" text="'You reached Genesys'"/>
        </dialog:prompts>
      </dialog:play>

In this example, ORS can use text-to-speech to play an announcement to the user but I'd rather play a pre-recorded audio file (a WAV).  This wav can only be accessed with HTTP.

Values for the "type" attribute of <dialog:prompt> can be:
[list]
[li]ann — This represents a list of normal announcements to be played to the caller.[/li]
[li]tts — This represents a list of TTS-based announcements to be played to the caller. All <prompt> element children must have the text attribute.[/li]
[li]iretry — This represents a list of announcements to be played after input verification has failed and the caller is asked to reenter information.[/li]
[li]ifailure — This represents a list of announcements to be played when the input verification has failed.[/li]
[li]isuccess — This represents a list of announcements to be played when the input verification is successful.[/li]
[li]itimeout — This represents a list of announcements to be played when the time expires for collecting the input from the caller.[/li]
[li]MSG_type — This represents the old MSG* user data key/value pairs that could be used for the <play> and <playandcollect> actions in place of the tts and ann prompt types. When the type attribute is set to this value, there can only be one child <prompt> element.[/li]
[/list]

(See [url=http://wiki.genesyslab.com/wiki/index.php?title=Dialog_Interface#.3Cprompts.3E]http://wiki.genesyslab.com/wiki/index.php?title=Dialog_Interface#.3Cprompts.3E[/url])

I don't see how I can specify an external HTTP audio resource.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Playing a WAV in ORS
« Reply #3 on: January 23, 2013, 03:09:41 PM »
[quote author=Kubig link=topic=7621.msg32810#msg32810 date=1358951026]
Generaly,gawix's topics have any sense and were so confused and begginer.
[/quote]

You sir made me laugh loud and hard ;) Lucky for me everyone is on lunch

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Playing a WAV in ORS
« Reply #4 on: January 23, 2013, 03:13:08 PM »
[quote author=gawix link=topic=7621.msg32811#msg32811 date=1358953263]
I'm having trouble following you.

ORS is [i]Orchestration Server[/i] (maybe I should have said [i]OS[/i] instead), the SCXML interpreter which is part of URS. URS can either execute a routing script made with IRD or invoke ORS to execute an SCXML document ([i]Orchestration Application[/i] in Genesys terms).

GVP acts as the Media Server and process some directives like PlayAnnouncement.  SCXML sample below (fragment):

    <dialog:play language="'English_US'">
        <dialog:prompts type="ann">
          <dialog:prompt interrupt="true" text="'You reached Genesys'"/>
        </dialog:prompts>
      </dialog:play>

In this example, ORS can use text-to-speech to play an announcement to the user but I'd rather play a pre-recorded audio file (a WAV).  This wav can only be accessed with HTTP.

Values for the "type" attribute of <dialog:prompt> can be:
[list]
[li]ann — This represents a list of normal announcements to be played to the caller.[/li]
[li]tts — This represents a list of TTS-based announcements to be played to the caller. All <prompt> element children must have the text attribute.[/li]
[li]iretry — This represents a list of announcements to be played after input verification has failed and the caller is asked to reenter information.[/li]
[li]ifailure — This represents a list of announcements to be played when the input verification has failed.[/li]
[li]isuccess — This represents a list of announcements to be played when the input verification is successful.[/li]
[li]itimeout — This represents a list of announcements to be played when the time expires for collecting the input from the caller.[/li]
[li]MSG_type — This represents the old MSG* user data key/value pairs that could be used for the <play> and <playandcollect> actions in place of the tts and ann prompt types. When the type attribute is set to this value, there can only be one child <prompt> element.[/li]
[/list]

(See [url=http://wiki.genesyslab.com/wiki/index.php?title=Dialog_Interface#.3Cprompts.3E]http://wiki.genesyslab.com/wiki/index.php?title=Dialog_Interface#.3Cprompts.3E[/url])

I don't see how I can specify an external HTTP audio resource.
[/quote]

We also have trouble following you my friend. There is no way ORS can play audio resources, as you said, it uses GVP to do so. So if you take the time to read how the call flow is you could easily call a GVP application and prompt any audio file you want.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Playing a WAV in ORS
« Reply #5 on: January 23, 2013, 03:39:56 PM »
And it is a big problem to use instead of dialog:prompt a pointer to another vxml file,which contains required treatment/prompt?

I mean following:

<dialog:start type="vxml">
<param name="AnnApplicationUri" expr="http://host:port/appname/apparguments(appvxmlfilename.vxml)" />
</dialog:start>

instead of:

<dialog:play language="'English_US'">
        <dialog:prompts type="ann">
          <dialog:prompt interrupt="true" text="'You reached Genesys'"/>
        </dialog:prompts>
      </dialog:play>

Offline gawix

  • Newbie
  • *
  • Posts: 28
  • Karma: 1
Re: Playing a WAV in ORS
« Reply #6 on: January 23, 2013, 03:53:17 PM »
(ok ok, I didn't get the sarcasm because I was not expecting it here. If you think my questions are ill-formulated, then just say so and I'll clarify. If you think I shouldn't posted have posted a question that is, in your opinion, too basic, well don't feel obligated to comment.)

I'm well aware that GVP will play the audio resource in the end. I was merely asking if there was a way ORS could tell GVP to play a file located on an HTTP server without having to provide a VoiceXML application doing that.

So I'll do that, no big deal. I was just wondering. Yep. Really. Thanks.

Offline bublepaw

  • Sr. Member
  • ****
  • Posts: 283
  • Karma: 10
Re: Playing a WAV in ORS
« Reply #7 on: January 24, 2013, 02:57:48 PM »
It is possible - on MCP side You can configure that root of all wav files requested by ORS/URS is http server. In such case when You specify in ORS to play xxxx.wav MCP will actually request file from http server ending with xxx.wav. Option to specify root of all music files is play.basepath and play.musicbasepath in section msml or in netann section annc.basepath and annc.musicbasepath.

Offline gawix

  • Newbie
  • *
  • Posts: 28
  • Karma: 1
Re: Playing a WAV in ORS
« Reply #8 on: April 23, 2014, 05:32:17 PM »
Finally, the trick is to pass the URL in the text attribute of <prompt>:

      <dialog:play language="'English (US)'" interactionid="_data.idInteraction">
        <dialog:prompts type="ann">
          <dialog:prompt interrupt="false" text="'http://server.example.com/path/file.wav'" />
        </dialog:prompts>
      </dialog:play>

You can do that in composer with the "Play Message" block.