| Package | com.acapela.vaas.advanced |
| Class | public class Message |
| Subclasses | MessageExt |
A message is used to communicate with the service about the details of a VaaS message. It is both:
generateMessage and retrieveMessageSound objectsoundLength, soundURL, soundSize and accessCounter.When you want to generate a message, usually you create a message and set the voice, text and, optionnaly, comment properties.
The API will add the id property and the read-only properties after receiving the service answer. Then you will receive a complete message as result of the call to createMessage.
When you want to retrieve an existing message, you create a message and just set its id.
The API will retrieve all the missing properties using the service and you will receive a complete message as result of the call to retrieveMessage.
Note that when you want to create a message, you can also set the id property to force the service to create a message with a predifined ID or override an existing message.
If you have specific constraints for the sound format, you might be interested by the MessageExt additionnal features.
See also
| Property | Defined by | ||
|---|---|---|---|
| accessCounter : Number [read-only]
Number of times that this message was accessed (using
retrieveMessage function). | Message | ||
| comment : String
The comment associated to a message.
| Message | ||
| equalizer : Equalizer
[read-only]
The equalizer settings of the sound associated to the message
| Message | ||
| id : String
The identifier of the message.
| Message | ||
| shaping : Number
The shaping of the sound associated to the message
| Message | ||
| sound : Sound [read-only]
The instance of
Sound | Message | ||
| soundLength : Number [read-only]
Duration in milliseconds of the sound associated to the message.
| Message | ||
| soundSize : Number [read-only]
Size in octets of the sound associated to the message.
| Message | ||
| soundURL : String [read-only]
URL of the sound associated to the message.
| Message | ||
| speed : Number
The speed of the sound associated to the message
| Message | ||
| text : String
The text of the message that will be synthesized.
| Message | ||
| voice : String
The voice used to synthesize the text of the message.
| Message | ||
| volume : Number
The volume of the sound associated to the message
| Message | ||
| Method | Defined by | ||
|---|---|---|---|
|
Message()
constuctor
| Message | ||
| accessCounter | property |
accessCounter:Number [read-only]
Number of times that this message was accessed (using retrieveMessage function).
public function get accessCounter():Number
| comment | property |
comment:String [read-write]The comment associated to a message.
Free text field, can contain creator's details for instance.
Optionnal when generating a message, useless when retrieving one existing.
Will be setted by the API when retrieving an existing message if a comment was associated to it.
Implementation public function get comment():String
public function set comment(value:String):void
| equalizer | property |
equalizer:Equalizer [read-only]The equalizer settings of the sound associated to the message
Implementation public function get equalizer():Equalizer
| id | property |
id:String [read-write]The identifier of the message.
Depending on the context, this property can be generated by the service or setted by you.
Message object with a null id to the generateMessage functin of Synthesizer.id of the message before calling generateMessage when you want to create/override a message when a specific ID.id of the message before calling retrieveMessage in order to get the message corresponding to it.Warning: the message id can only contains digits, occidental letters (no accent) and the underscore symbol "_".
Implementation public function get id():String
public function set id(value:String):void
| shaping | property |
shaping:Number [read-write]The shaping of the sound associated to the message
Implementation public function get shaping():Number
public function set shaping(value:Number):void
| sound | property |
sound:Sound [read-only]
The instance of Sound class associated to the message.
public function get sound():Sound
| soundLength | property |
soundLength:Number [read-only]Duration in milliseconds of the sound associated to the message.
Implementation public function get soundLength():Number
| soundSize | property |
soundSize:Number [read-only]Size in octets of the sound associated to the message.
Implementation public function get soundSize():Number
| soundURL | property |
soundURL:String [read-only]
URL of the sound associated to the message.
Warning:
This URL is valid only for an immediat usage.
Please store/share only the message ID and use retrieveMessage to get the URL.
public function get soundURL():String
| speed | property |
speed:Number [read-write]The speed of the sound associated to the message
Implementation public function get speed():Number
public function set speed(value:Number):void
| text | property |
text:String [read-write]The text of the message that will be synthesized. Required when creating a message, setted by the API when retrieving an existing message.
Implementation public function get text():String
public function set text(value:String):void
| voice | property |
voice:String [read-write]The voice used to synthesize the text of the message. Required when creating a message, setted by the API when retrieving an existing message.
Implementation public function get voice():String
public function set voice(value:String):void
| volume | property |
volume:Number [read-write]The volume of the sound associated to the message
Implementation public function get volume():Number
public function set volume(value:Number):void
| Message | () | constructor |
public function Message()constuctor