How to specify file source in audio tag

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

  • Author
  • Message
Offline

rgstephens

  • Posts: 2
  • Joined: Thu Jun 16, 2016 5:57 pm

How to specify file source in audio tag

PostTue Jun 05, 2018 8:07 pm

I need to specify the source location for a pre-recorded audio file, but without using an http URL.
I tried variations of this:
<audio src="file://servername/c:/path/myfile.wav">Default text to speech</audio>
and also using a simple relative path:
<audio src="myfile.wav">Default text to speech</audio>
where in the second case the audio file is in the same location as the vxml file that is referencing it.
But I have been unable to get it to work. It always fails to find the pre-recorded audio and uses the default text.
Are any special access permissions needed or is there something else needed to use a non-http URI for the audio file location?
Offline

support

  • Posts: 3456
  • Joined: Mon Jun 02, 2003 3:47 pm
  • Location: Boston, MA

Re: How to specify file source in audio tag

PostWed Jun 06, 2018 9:50 am

Hi,

Unfortunately because of the architecture of VoiceXML, it is not possible to reference audio files that are not hosted on a web server. For Plum DEV, your VoiceXML code needs to be hosted either on a web server or in one of our hosted options (e.g. File Repository). That VoiceXML code then can use relative references to the audio files that are stored relative to that code. It is also possible to upload your audio to the File Repository and then use an absolute reference in your VoiceXML to the file that was uploaded. The audio repository provides an icon with the full link to each file that you can copy and paste into your code.

Regards,
Plum Support
Offline

rgstephens

  • Posts: 2
  • Joined: Thu Jun 16, 2016 5:57 pm

Re: How to specify file source in audio tag

PostWed Jun 06, 2018 12:51 pm

If we were to go with the file repository route, can you add sub-folders into the repository? We have two versions of each audio file, english and spanish. Or would we be required to rename the files with a language indicator to make them unique?
Offline

support

  • Posts: 3456
  • Joined: Mon Jun 02, 2003 3:47 pm
  • Location: Boston, MA

Re: How to specify file source in audio tag

PostWed Jun 06, 2018 1:11 pm

Hi,

Yes, you can add sub-folders in your File Repository. You can refer to this documentation for using File Repository:

http://www.plumvoice.com/docs/dev/plumdevguide:filerepo

Regards,
Plum Support.

Return to Plum DEV Q&A

Who is online

Users browsing this forum: No registered users and 1 guest