Packagecom.diadraw.extensions.texttospeech
Classpublic class TextToSpeechDriver
InheritanceTextToSpeechDriver Inheritance flash.events.EventDispatcher

The TextToSpeechDriver class produces synthesized speech from text on an iOS device, and provides methods for controlling or monitoring the progress of ongoing speech.



Public Properties
 PropertyDefined By
  defaultSpeechRate : Number
[read-only] The default speech rate value.
TextToSpeechDriver
  maxSpeechRate : Number
[read-only] The maximum allowed value for the speech rate.
TextToSpeechDriver
  minSpeechRate : Number
[read-only] The minimum allowed value for the speech rate.
TextToSpeechDriver
  pitchMultiplier : Number
The baseline pitch at which the utterance will be spoken.
TextToSpeechDriver
  speechRate : Number
The rate at which the utterance will be spoken.
TextToSpeechDriver
  voiceLanguage : String
A BCP-47 code specifying language and locale for a voice.
TextToSpeechDriver
  volume : Number
The volume used when speaking the utterance.
TextToSpeechDriver
Public Methods
 MethodDefined By
  
TextToSpeechDriver(target:IEventDispatcher = null)
The default constructor.
TextToSpeechDriver
  
isLanguageSupported(_languageCode:String):Boolean
Checks if a language code is supported by the device.
TextToSpeechDriver
  
isSpeaking():Boolean
Checks whether the synthesizer is speaking.
TextToSpeechDriver
  
startTextToSpeech(_text:String):void
Starts text to speech engine with text to be spoken.
TextToSpeechDriver
  
stopTextToSpeech(_immediate:Boolean = true):void
Stops all speech at the specified boundary constraint.
TextToSpeechDriver
Property Detail
defaultSpeechRateproperty
defaultSpeechRate:Number  [read-only]

The default speech rate value.


Implementation
    public function get defaultSpeechRate():Number
maxSpeechRateproperty 
maxSpeechRate:Number  [read-only]

The maximum allowed value for the speech rate.


Implementation
    public function get maxSpeechRate():Number
minSpeechRateproperty 
minSpeechRate:Number  [read-only]

The minimum allowed value for the speech rate.


Implementation
    public function get minSpeechRate():Number
pitchMultiplierproperty 
pitchMultiplier:Number

The baseline pitch at which the utterance will be spoken. The default pitch is 1.0. Allowed values are in the range from 0.5 (for lower pitch) to 2.0 (for higher pitch).


Implementation
    public function get pitchMultiplier():Number
    public function set pitchMultiplier(value:Number):void
speechRateproperty 
speechRate:Number

The rate at which the utterance will be spoken. Lower values correspond to slower speech, and vice versa.


Implementation
    public function get speechRate():Number
    public function set speechRate(value:Number):void
voiceLanguageproperty 
voiceLanguage:String

A BCP-47 code specifying language and locale for a voice.


Implementation
    public function get voiceLanguage():String
    public function set voiceLanguage(value:String):void
volumeproperty 
volume:Number

The volume used when speaking the utterance. Allowed values are in the range from 0.0 (silent) to 1.0 (loudest). The default volume is 1.0.


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Constructor Detail
TextToSpeechDriver()Constructor
public function TextToSpeechDriver(target:IEventDispatcher = null)

The default constructor.

Parameters
target:IEventDispatcher (default = null)
Method Detail
isLanguageSupported()method
public function isLanguageSupported(_languageCode:String):Boolean

Checks if a language code is supported by the device.

Parameters

_languageCode:String — A BCP-47 code specifying language and locale for a voice.

Returns
Boolean — True if the language code is supported, false otherwise.
isSpeaking()method 
public function isSpeaking():Boolean

Checks whether the synthesizer is speaking.

Returns
Boolean — Returns true if the synthesizer is speaking. Returns false if the synthesizer has finished speaking.
startTextToSpeech()method 
public function startTextToSpeech(_text:String):void

Starts text to speech engine with text to be spoken.

Parameters

_text:String — The text to be spoken.

stopTextToSpeech()method 
public function stopTextToSpeech(_immediate:Boolean = true):void

Stops all speech at the specified boundary constraint.

Parameters

_immediate:Boolean (default = true) — Boundary constraint describing whether speech should stop immediately or only after finishing the word currently being spoken.