You can use prerecorded speech or text-to-speech in a Java voice application
by using any of the following subclasses of MediaType. These media
data classes specify the sounds that the caller hears:
- The VoiceSegment class specifies recorded voice data and is used
both for output and for input recorded by the Call.record() method.
- AudioCurrency specifies a currency amount to be spoken.
- AudioDate specifies a date to be spoken.
- AudioNumber specifies a number to be spoken.
- AudioString specifies a character string to be spoken.
- AudioTime specifies a time to be spoken.
- DTMFSequence which specifies dual-tone multifrequency signals
to be played.
- MediaSequence which is a composite of other media data objects.
- The TextToSpeech class specifies text from which speech is to
be synthesized.
You can also use arrays of the MediaType object to make a composite
sequences of other media elements.
All the methods capable of playing a message can accept arrays of MediaTypes.
This allows your applications to play chains of MediaType objects in one operation.