VoiceGuide IVR Software Main Page
Jump to content

Play Wav File From Within "text To Speak"

Recommended Posts

I have a long string of text that gets passed to "Text to speak" so that it is converted to speech, and played back to the caller.

 

In the middle of the text there is a point where I need to play a wav file.

 

For example I'd want to pass something like this:

 

My ringer sounds like this <play file="myring.wav"/> but my firends sounds like this <play file="friendring.wav"/>

 

Additional points:

  • I am not aware of any SAPI tag that enables you to play a wav file.
  • In this project I am not able to create a seperate module for the wav playback. It needs to be all part of one long string.

Share this post


Link to post

Our recommendation would be to use a number of separate Play modules, with 'replys' set to 0 in each module and a 'Timeout 0' path taking caller to next module immedialty after the WAV/TTS completes playing.

 

You mention that this is not an approach that you'd like to take. Can you describe in more detail what is preventing you from structuring the script hat way? Once we know more about the situation perhaps we can suggest a workaround.

Share this post


Link to post

The module solution would work if the sequence of wav1-text1-wav2-text2 followed a constant pattern.

 

However in our case it's always changing.

 

For example....

For one caller we would need to play: WAV5-TTS5-WAV6-TTS6-WAV7-TTS7
For another caller we would need to play: WAV8-TTS8-WAV9-TTS9-WAV1-TTS1 (After #9 it goes back to #1)

The content to be spoken is generated by a complex data-driven server-side script which takes into account many factors (the calendar date, the user's present location, account preferences). It then generates a text string which is gets stored to a voiceGuide variable for playback. We are not able to have this server script run inside of voiceguide.

 

We need to have all TTS and WAV placements determined by the server script which outputs a single string that contains the complete content to be spoken.

Share this post


Link to post

If you are using a TTS engine that supports the <audio> element then you may be able to get the TTS engine to generate one sound file from the the intermixed TTS/WAV input.

 

Please see: http://www.w3.org/TR/speech-synthesis/#S3.3.1

 

 

-or-

 

 

If the server-side script can generate the output like this:

 

[wav1]{filename}[tts1]{some text}[wav2]{filename}[tts2]{some text}[wav3]{filename}[tts3]{some text}

 

then this format can then be loaded into VoiceGuide $RVs, and either chain of Play modules can play the $RV[wav1] then $RV[tts1] then $RV[wav2] then $RV[tts2] etc.

 

or a single Play module can play $RV[wav$RV[myidx]] then $RV[tts$RV[myidx]] where $RV[myidx]is incremented in a loop.

 

 

-or-

 

 

Otherwise VoiceGuide software would need to be modified to accommodate your requirement. Please contact sales@voiceguide.com if you would like to look into having this modification carried out.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×