1) What you are trying to do is not really the intended use
of a text variable--you should use a Phrase for this.
If you can put the pre-recorded audio files in a folder on the
development environment, then you can create a phrase
and select the pre-recorded audio file. That file is then
copied into the project''s audio file directory and you can
specify the phrase text in the Phrase item. The phrase text
is generated in the VXML as the TTS backup.
If, however, you must keep the audio files on a different
server, you have to fall back to Java code and override the
getURL and getText methods to return the URL for the audio file
("http://192.168.100.10:9600/tfcu/11001.wav")
and the text "Welcome to the Voice Portal".
There are some things to be careful with though if you do this.
Since you are overriding API to return URLs, you should
consider keeping IP/host and port information in some session variable or use a helper class to generate the URL
so that if you need to change the host/port information, you
can do it in one place rather than hundreds.
2) Unfortunately, no there is no way to bulk import the
phrases to generate phrases or prompts for the item
(NOTE: you should NOT be using text variables for
phrases in MOST cases--use the Phrase item, that''s what
they are for). I created an enhancement request for some
mechanism to automate the creation of phrases from pre-
recorded audio.
|