Cisco Cisco Customer Voice Portal Downloads Guía Del Desarrollador
C
HAPTER
12:
S
AY
I
T
S
MART
P
LUGINS
V
OICE
XML
P
ROGRAMMING
G
UIDE
FOR
C
ISCO
U
NIFIED
C
USTOMER
V
OICE
P
ORTAL
R
ELEASE
4.0(1)
62
output formats, so when the output format changes, the list of filesets available changes
accordingly. The plugin defines these dependencies using a configuration method. Note that a
fileset deals with audio files so does not apply when the Say It Smart value is rendered in TTS
only.
accordingly. The plugin defines these dependencies using a configuration method. Note that a
fileset deals with audio files so does not apply when the Say It Smart value is rendered in TTS
only.
As usually occurs with components configured in Unified CVP VoiceXML Studio, each type,
input format, output format, and fileset has a real name, display name, and description. The
display name is shown in VoiceXML Studio in dropdown menus. The real name is used
everywhere else. This design allows the Say It Smart plugin developer to use a display name that
visually represents the appropriate information but choose a real name that is small, easy to
remember, and will not change. As long as the real name stays the same, the developer can
change the display name of any component without affecting backwards compatibility. At this
point, the descriptions are not displayed in VoiceXML Studio and are there for future
compatibility.
input format, output format, and fileset has a real name, display name, and description. The
display name is shown in VoiceXML Studio in dropdown menus. The real name is used
everywhere else. This design allows the Say It Smart plugin developer to use a display name that
visually represents the appropriate information but choose a real name that is small, easy to
remember, and will not change. As long as the real name stays the same, the developer can
change the display name of any component without affecting backwards compatibility. At this
point, the descriptions are not displayed in VoiceXML Studio and are there for future
compatibility.
All Java classes related to Say It Smart plugins are found in the
com.audium.server.sayitsmart
package.
Note that unlike elements, Say It Smart plugin classes are instantiated as needed. This means that
the developer is free to use static, member, and local variables as they would expect. It is still
recommended to avoid using static variables in Say It Smart plugin classes unless they are static
final because static variables will be reset whenever the application is updated.
the developer is free to use static, member, and local variables as they would expect. It is still
recommended to avoid using static variables in Say It Smart plugin classes unless they are static
final because static variables will be reset whenever the application is updated.
Execution Methods
SayItSmartContent convertToFiles(Object data, String inputFormat,
String outputFormat, String fileset)
This is the execution method for converting data to a list of audio files with TTS backups. The
first argument is the data to convert. This data can be any Java object and it is up to the plugin to
cast to the appropriate type (usually depending on what the input format is). Most of the time,
though, it will be considered a
first argument is the data to convert. This data can be any Java object and it is up to the plugin to
cast to the appropriate type (usually depending on what the input format is). Most of the time,
though, it will be considered a
String
. The next three arguments list the real names of the input
format, output format, and fileset specified in the voice element configuration (either statically in
Unified CVP VoiceXML Studio or dynamically).
Unified CVP VoiceXML Studio or dynamically).
The method returns an instance of
SayItSmartContent
. This class encapsulates any number of
audio filenames, their TTS backups, and pauses to insert in the playback. The execution method
must create an instance of this class, add the desired content to it, and return it. Unified CVP
VoiceXML Server then reads this content to generate the VoiceXML for the Say It Smart audio
item in the audio group. Note that the path and file type options available in the Say It Smart
configuration in VoiceXML Studio are not passed here as they are added automatically by the
VoiceXML Server once the plugin has converted the data. The plugin should produce just the
audio file names without any paths or extensions.
must create an instance of this class, add the desired content to it, and return it. Unified CVP
VoiceXML Server then reads this content to generate the VoiceXML for the Say It Smart audio
item in the audio group. Note that the path and file type options available in the Say It Smart
configuration in VoiceXML Studio are not passed here as they are added automatically by the
VoiceXML Server once the plugin has converted the data. The plugin should produce just the
audio file names without any paths or extensions.
Note that while the option exists, the plugin need not include TTS backups for the audio files.
They are used as a backup in case the audio file is not found or is corrupted. Not including a
They are used as a backup in case the audio file is not found or is corrupted. Not including a