PixelCrushers.DialogueSystem.RTVoiceActor Class Reference
Inheritance diagram for PixelCrushers.DialogueSystem.RTVoiceActor:
Collaboration diagram for PixelCrushers.DialogueSystem.RTVoiceActor:

Classes

class  VoicePreference
 

Public Types

enum  Gender { Female , Male , Any }
 
enum  VoiceState { Silent , Starting , Speaking }
 

Public Member Functions

virtual void Awake ()
 
virtual void Start ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 
void OnConversationLine (Subtitle subtitle)
 When a conversation line is spoken, speak it through RT-Voice.
 
void OnBarkLine (Subtitle subtitle)
 When a bark line is spoken, speak it through RT-Voice.
 
void SpeakSubtitle (Subtitle subtitle, bool wait)
 
virtual void Speak (string text)
 Speak the specified text using RT-Voice.
 
Voice GetVoice ()
 Finds the system's closest match voice to the preferred voice for the current language, or for the system language if no current language is set.
 

Public Attributes

VoicePreference[] voicePreferences = new VoicePreference[0]
 The voice preferences to try to match.
 
float rate = 1
 
float pitch = 1
 
float volume = 1
 
bool waitForVoiceInConversations = true
 In conversations, make the dialogue entry wait until RT-Voice is done playing.
 
VoiceState voiceState = VoiceState.Silent
 

Protected Member Functions

virtual void RegisterRTVoiceCallbacks ()
 
virtual void UnregisterRTVoiceCallbacks ()
 
virtual void OnSpeakStart (Crosstales.RTVoice.Model.Wrapper wrapper)
 
virtual void OnSpeakComplete (Crosstales.RTVoice.Model.Wrapper wrapper)
 
virtual IEnumerator SpeakWhenVoicesAreReady (string text)
 
bool MatchesVoicePreference (Voice voice, VoicePreference voicePreference)
 

Protected Attributes

AudioSource m_audioSource = null
 
bool m_started = false
 

Member Enumeration Documentation

◆ Gender

Enumerator
Female 
Male 
Any 

◆ VoiceState

Enumerator
Silent 
Starting 
Speaking 

Member Function Documentation

◆ Awake()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.Awake ( )
inlinevirtual

◆ GetVoice()

Voice PixelCrushers.DialogueSystem.RTVoiceActor.GetVoice ( )
inline

Finds the system's closest match voice to the preferred voice for the current language, or for the system language if no current language is set.

Returns
The voice that best matches the actor's preferences.

◆ MatchesVoicePreference()

bool PixelCrushers.DialogueSystem.RTVoiceActor.MatchesVoicePreference ( Voice  voice,
VoicePreference  voicePreference 
)
inlineprotected

◆ OnBarkLine()

void PixelCrushers.DialogueSystem.RTVoiceActor.OnBarkLine ( Subtitle  subtitle)
inline

When a bark line is spoken, speak it through RT-Voice.

Parameters
subtitleSubtitle.

◆ OnConversationLine()

void PixelCrushers.DialogueSystem.RTVoiceActor.OnConversationLine ( Subtitle  subtitle)
inline

When a conversation line is spoken, speak it through RT-Voice.

Parameters
subtitleSubtitle.

◆ OnDisable()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.OnDisable ( )
inlinevirtual

◆ OnEnable()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.OnEnable ( )
inlinevirtual

◆ OnSpeakComplete()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.OnSpeakComplete ( Crosstales::RTVoice::Model::Wrapper  wrapper)
inlineprotectedvirtual

◆ OnSpeakStart()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.OnSpeakStart ( Crosstales::RTVoice::Model::Wrapper  wrapper)
inlineprotectedvirtual

◆ RegisterRTVoiceCallbacks()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.RegisterRTVoiceCallbacks ( )
inlineprotectedvirtual

◆ Speak()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.Speak ( string  text)
inlinevirtual

Speak the specified text using RT-Voice.

You can override this if you need to do anything extra.

Parameters
textText.

◆ SpeakSubtitle()

void PixelCrushers.DialogueSystem.RTVoiceActor.SpeakSubtitle ( Subtitle  subtitle,
bool  wait 
)
inline

◆ SpeakWhenVoicesAreReady()

virtual IEnumerator PixelCrushers.DialogueSystem.RTVoiceActor.SpeakWhenVoicesAreReady ( string  text)
inlineprotectedvirtual

◆ Start()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.Start ( )
inlinevirtual

◆ UnregisterRTVoiceCallbacks()

virtual void PixelCrushers.DialogueSystem.RTVoiceActor.UnregisterRTVoiceCallbacks ( )
inlineprotectedvirtual

Member Data Documentation

◆ m_audioSource

AudioSource PixelCrushers.DialogueSystem.RTVoiceActor.m_audioSource = null
protected

◆ m_started

bool PixelCrushers.DialogueSystem.RTVoiceActor.m_started = false
protected

◆ pitch

float PixelCrushers.DialogueSystem.RTVoiceActor.pitch = 1

◆ rate

float PixelCrushers.DialogueSystem.RTVoiceActor.rate = 1

◆ voicePreferences

VoicePreference [] PixelCrushers.DialogueSystem.RTVoiceActor.voicePreferences = new VoicePreference[0]

The voice preferences to try to match.

◆ voiceState

VoiceState PixelCrushers.DialogueSystem.RTVoiceActor.voiceState = VoiceState.Silent

◆ volume

float PixelCrushers.DialogueSystem.RTVoiceActor.volume = 1

◆ waitForVoiceInConversations

bool PixelCrushers.DialogueSystem.RTVoiceActor.waitForVoiceInConversations = true

In conversations, make the dialogue entry wait until RT-Voice is done playing.


The documentation for this class was generated from the following file: