# class SpeechSynthesisUtterance

#### package js.html

#### extends EventTarget

Available on HTML5

The `SpeechSynthesisUtterance` interface of the Web Speech API represents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.)

Documentation SpeechSynthesisUtterance by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance

### Constructor

###

`new (text:String)`

`new ()`

Throws:

`null` | DOMError

### Variables

###

`lang:String`

Gets and sets the language of the utterance.

###

`onboundary:Function`

Fired when the spoken utterance reaches a word or sentence boundary.

###

`onend:Function`

Fired when the utterance has finished being spoken.

###

`onerror:Function`

Fired when an error occurs that prevents the utterance from being succesfully spoken.

###

`onmark:Function`

Fired when the spoken utterance reaches a named SSML "mark" tag.

###

`onpause:Function`

Fired when the utterance is paused part way through.

###

`onresume:Function`

Fired when a paused utterance is resumed.

###

`onstart:Function`

Fired when the utterance has begun to be spoken.

###

`pitch:Float`

Gets and sets the pitch at which the utterance will be spoken at.

###

`rate:Float`

Gets and sets the speed at which the utterance will be spoken at.

###

`text:String`

Gets and sets the text that will be synthesised when the utterance is spoken.

###

`voice:SpeechSynthesisVoice`

Gets and sets the voice that will be used to speak the utterance.

###

`volume:Float`

Gets and sets the volume that the utterance will be spoken at.

### Inherited Variables

### Inherited Methods

#### Defined by EventTarget

###

`addEventListener (type:String, listener:Function, capture:Bool = false):Void`

`addEventListener (type:String, listener:EventListener, capture:Bool = false, ?wantsUntrusted:Bool):Void`

Throws:

`null` | DOMError

###

`dispatchEvent (event:Event):Bool`

Throws:

`null` | DOMError

###

`removeEventListener (type:String, listener:Function, capture:Bool = false):Void`

`removeEventListener (type:String, listener:EventListener, capture:Bool = false):Void`

Throws:

`null` | DOMError