Dart Documentationchrome.ttsTtsVoice

TtsVoice class

A description of a voice available for speech synthesis.

class TtsVoice extends ChromeObject {
 TtsVoice({String voiceName, String lang, String gender, String extensionId, List<String> eventTypes}) {
   if (voiceName != null) this.voiceName = voiceName;
   if (lang != null) this.lang = lang;
   if (gender != null) this.gender = gender;
   if (extensionId != null) this.extensionId = extensionId;
   if (eventTypes != null) this.eventTypes = eventTypes;
 }
 TtsVoice.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * The name of the voice.
  */
 String get voiceName => jsProxy['voiceName'];
 set voiceName(String value) => jsProxy['voiceName'] = value;

 /**
  * The language that this voice supports, in the form _language_-_region_.
  * Examples: 'en', 'en-US', 'en-GB', 'zh-CN'.
  */
 String get lang => jsProxy['lang'];
 set lang(String value) => jsProxy['lang'] = value;

 /**
  * This voice's gender.
  * enum of `male`, `female`
  */
 String get gender => jsProxy['gender'];
 set gender(String value) => jsProxy['gender'] = value;

 /**
  * The ID of the extension providing this voice.
  */
 String get extensionId => jsProxy['extensionId'];
 set extensionId(String value) => jsProxy['extensionId'] = value;

 /**
  * All of the callback event types that this voice is capable of sending.
  */
 List<String> get eventTypes => listify(jsProxy['eventTypes']);
 set eventTypes(List<String> value) => jsProxy['eventTypes'] = jsify(value);
}

Extends

ChromeObject > TtsVoice

Constructors

new TtsVoice({String voiceName, String lang, String gender, String extensionId, List<String> eventTypes}) #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
TtsVoice({String voiceName, String lang, String gender, String extensionId, List<String> eventTypes}) {
 if (voiceName != null) this.voiceName = voiceName;
 if (lang != null) this.lang = lang;
 if (gender != null) this.gender = gender;
 if (extensionId != null) this.extensionId = extensionId;
 if (eventTypes != null) this.eventTypes = eventTypes;
}

new TtsVoice.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
TtsVoice.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

List<String> eventTypes #

All of the callback event types that this voice is capable of sending.

List<String> get eventTypes => listify(jsProxy['eventTypes']);
set eventTypes(List<String> value) => jsProxy['eventTypes'] = jsify(value);

String extensionId #

The ID of the extension providing this voice.

String get extensionId => jsProxy['extensionId'];
set extensionId(String value) => jsProxy['extensionId'] = value;

String gender #

This voice's gender. enum of male, female

String get gender => jsProxy['gender'];
set gender(String value) => jsProxy['gender'] = value;

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

String lang #

The language that this voice supports, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'.

String get lang => jsProxy['lang'];
set lang(String value) => jsProxy['lang'] = value;

String voiceName #

The name of the voice.

String get voiceName => jsProxy['voiceName'];
set voiceName(String value) => jsProxy['voiceName'] = value;

Methods

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();