Class SpeechSynthesis
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SpeechSynthesis interface of the Web Speech API is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides.
[Value("SpeechSynthesis")]
public class SpeechSynthesis : EventTarget
- Inheritance
-
SpeechSynthesis
- Inherited Members
Remarks
Constructors
SpeechSynthesis()
public SpeechSynthesis()
Properties
Onvoiceschanged
[Value("onvoiceschanged")]
public EventHandlerNonNull Onvoiceschanged { get; set; }
Property Value
Paused
The paused read-only property of the
SpeechSynthesis interface is a boolean value that returnstrue if the SpeechSynthesis object is in a paused state, or false if not.
[Value("paused")]
public bool Paused { get; }
Property Value
- bool
A boolean value.
Remarks
It can be set to Pause() even if nothing is
currently being spoken through it. If
SpeechSynthesisUtterance are then added to the utterance
queue, they will not be spoken until the SpeechSynthesis object is
unpaused, using Resume().
Pending
The pending read-only property of the
SpeechSynthesis interface is a boolean value that returnstrue if the utterance queue contains as-yet-unspoken utterances.
[Value("pending")]
public bool Pending { get; }
Property Value
- bool
A boolean value.
Remarks
Speaking
The speaking read-only property of the
SpeechSynthesis interface is a boolean value that returnstrue if an utterance is currently in the process of being spoken — even
if SpeechSynthesis is in a
SpeechSynthesispause state.
[Value("speaking")]
public bool Speaking { get; }
Property Value
- bool
A boolean value.
Remarks
Methods
Cancel()
The cancel() method of the SpeechSynthesis
interface removes all utterances from the utterance queue.
[Value("cancel")]
public GlobalObject.Undefined Cancel()
Returns
Remarks
If an utterance is currently being spoken, speaking will stop immediately.
GetVoices()
The getVoices() method of the
SpeechSynthesis interface returns a list of
SpeechSynthesisVoice objects representing all the available voices on the
current device.
[Value("getVoices")]
public List<SpeechSynthesisVoice> GetVoices()
Returns
- List<SpeechSynthesisVoice>
A list (array) of SpeechSynthesisVoice objects.
Remarks
Pause()
The pause() method of the SpeechSynthesis
interface puts the SpeechSynthesis object into a paused state.
[Value("pause")]
public GlobalObject.Undefined Pause()
Returns
Remarks
Resume()
The resume() method of the SpeechSynthesis
interface puts the SpeechSynthesis object into a non-paused state:
resumes it if it was already paused.
[Value("resume")]
public GlobalObject.Undefined Resume()
Returns
Remarks
Speak(SpeechSynthesisUtterance)
The speak() method of the SpeechSynthesis
interface adds an SpeechSynthesisUtterance to the utterance
queue; it will be spoken when any other utterances queued before it have been spoken.
[Value("speak")]
public GlobalObject.Undefined Speak(SpeechSynthesisUtterance utterance)
Parameters
utteranceSpeechSynthesisUtterance