Cisco Cisco Unified Customer Voice Portal 10.0(1) Guía Del Desarrollador
C
HAPTER
12:
S
AY
I
T
S
MART
P
LUGINS
P
ROGRAMMING
G
UIDE FOR
C
ISCO
U
NIFIED
CVP
VXML
S
ERVER
AND
C
ISCO
U
NIFIED
C
ALL
S
TUDIO
R
ELEASE
4.1(1)
65
reads back a better-sounding number by requiring more audio files). Filesets are dependent on
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.
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.
As usually occurs with components configured in Builder for Call Studio, each type, input
format, output format, and fileset has a real name, display name, and description. The display
name is shown in the Builder 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 the Builder and are there for future compatibility.
format, output format, and fileset has a real name, display name, and description. The display
name is shown in the Builder 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 the Builder 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
Builder for Call Studio or dynamically).
Builder for Call 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. VXML 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 the
Builder are not passed here as they are added automatically by VXML 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. VXML 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 the
Builder are not passed here as they are added automatically by VXML Server once the plugin
has converted the data. The plugin should produce just the audio file names without any paths or
extensions.