Class TTSMessage
A message to be spoken in the text-to-speech (TTS) subsystem.
Inherited Members
Namespace: VivoxUnity
Assembly: VivoxUnity.dll
Syntax
public sealed class TTSMessage
Constructors
TTSMessage(string, TTSDestination)
Create a new TTS message in the NotEnqueued state.
Declaration
public TTSMessage(string text, TTSDestination destination)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to be synthesized into speech. |
TTSDestination | destination |
Remarks
To synthesize this text into speech and inject it into the destination, use ILoginSession.TTS.Speak() or ILoginSession.TTS.Messages.Enqueue().
Properties
Destination
The destination of this message.
Declaration
public TTSDestination Destination { get; }
Property Value
Type | Description |
---|---|
TTSDestination |
Duration
The duration of the synthesized voice clip in seconds.
Declaration
public double Duration { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
Duration is set when playback starts, and is always 0.0 until that occurs.
NumConsumers
The number of active sessions (for remote playback destinations), local players (for local playback destinations), or both that the text-to-speech (TTS) message is playing into.
Declaration
public uint NumConsumers { get; }
Property Value
Type | Description |
---|---|
uint |
Remarks
NumConsumers is set when playback starts, and is always 0 until that occurs.
State
The Playing/Enqueued state of the message.
Declaration
public TTSMessageState State { get; }
Property Value
Type | Description |
---|---|
TTSMessage |
Text
The text to be synthesized into speech.
Declaration
public string Text { get; }
Property Value
Type | Description |
---|---|
string |
Voice
The voice used to synthesize this message.
Declaration
public ITTSVoice Voice { get; }
Property Value
Type | Description |
---|---|
ITTSVoice |
Methods
Cancel()
Cancel the message if it is Playing or Enqueued.
Declaration
public void Cancel()
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
Speak(ILoginSession)
Inject a new text-to-speech (TTS) message as the supplied user.
Declaration
public void Speak(ILoginSession userSpeaking)
Parameters
Type | Name | Description |
---|---|---|
ILogin |
userSpeaking | The local user that speaks the message. |
Remarks
This method is a shortcut for userSpeaking.TTS.Speak(this)
.
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
Property |