We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

How to specify file source in audio tag

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
rgstephens
Posts: 2
Joined: Thu Jun 16, 2016 5:57 pm

How to specify file source in audio tag

Post by rgstephens »

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?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: How to specify file source in audio tag

Post by support »

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

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

Re: How to specify file source in audio tag

Post by rgstephens »

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?

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: How to specify file source in audio tag

Post by support »

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.

Post Reply