Class SpeechSynthesisVoice
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SpeechSynthesisVoice interface of the Web Speech API represents a voice that the system supports.
Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI.
[Value("SpeechSynthesisVoice")]
public class SpeechSynthesisVoice
- Inheritance
-
SpeechSynthesisVoice
- Inherited Members
Remarks
Constructors
SpeechSynthesisVoice()
public SpeechSynthesisVoice()
Properties
Default
The default read-only property of the
SpeechSynthesisVoice interface returns a boolean value
indicating whether the voice is the default voice for the current app
(true), or not (false.)
[Value("default")]
public bool Default { get; }
Property Value
- bool
A boolean value.
Remarks
NOTE
For some devices, it might be the default voice for the
voice's language. The spec is not very clear on which it should be, so some
implementations may differ.
Lang
The lang read-only property of the SpeechSynthesisVoice interface returns a BCP 47 language tag indicating the language of the voice.
[Value("lang")]
public string Lang { get; }
Property Value
- string
A string representing the language of the device.
Remarks
LocalService
The localService read-only property of the
SpeechSynthesisVoice interface returns a boolean value
indicating whether the voice is supplied by a local speech synthesizer service
(true), or a remote speech synthesizer service (false.)
[Value("localService")]
public bool LocalService { get; }
Property Value
- bool
A boolean value.
Remarks
This property is provided to allow differentiation in the case that some voice options
are provided by a remote service; it is possible that remote voices might have extra
latency, bandwidth or cost associated with them, so such distinction may be useful.
Name
The name read-only property of the
SpeechSynthesisVoice interface returns a human-readable name that
represents the voice.
[Value("name")]
public string Name { get; }
Property Value
- string
A string representing the name of the voice.
Remarks
VoiceURI
The voiceURI read-only property of the
SpeechSynthesisVoice interface returns the type of URI and location of
the speech synthesis service for this voice.
[Value("voiceURI")]
public string VoiceURI { get; }
Property Value
- string
A string representing the URI of the voice. This is a generic URI and
can point to local or remote services, e.g., it could be a proprietary system URN or a URL to a remote service.