

Classes | |
| class | ActorOutput |
| Output of actors to be queued and played by the audio thread. More... | |
| class | ActorReferences |
| Reference to an actor configuration, and the AudioSource it should play it's output audio from. More... | |
Public Member Functions | |
| void | ToggleMicMute () |
| Toggle the director's microphone on or off. | |
| void | ToggleChatbox () |
| Toggle the chatbox to be active or inactive. | |
| void | ResetIdleTimer () |
| Reset the idle timer, usually invoked whenever there's any input by the user, such as typing something into the chatbox, or unmuting the microphone. | |
| async Awaitable< bool > | SubmitUserTextInput (string message) |
| Submit the user text input. Used as an alternative to speaking into the microphone, usually for development & debugging purposes. | |
| int | GetRoundCounter () |
| int | GetFinishRound () |
Private Types | |
| enum | State { Invalid = -1 , Idle , Prepare , Wait , Listen , FreeTalk , Discuss , Finish , Num } |
| All the possible states of the system. More... | |
Private Member Functions | |
| void | Awake () |
| void | OnDestroy () |
| void | OnEnable () |
| void | OnDisable () |
| void | Start () |
| void | Update () |
| void | LateUpdate () |
| void | QueueActorOutput (ActorOutput actorOutput) |
| Queue up an actor's output to be played by the audio thread. | |
| IEnumerator | AudioThread () |
| Launch an audio thread via Coroutine to play any queued audio from the actors. | |
| void | PropogateActorMessage (Actor speaker, string message) |
| Send the message received from one actor, to all the other actors. | |
| void | PropogateUserMessage (string message) |
| Send the message received from the user to all the actors. | |
| void | BeginQueuingAudio () |
| Flag that audio is being queued. | |
| void | EndQueuingAudio () |
| Flag that audio is not queued. | |
| void | OnEnterIdle () |
| void | OnEnterPrepare () |
| void | OnEnterWait () |
| void | OnUpdateWait () |
| void | OnEnterListen () |
| void | OnUpdateListen () |
| async void | RunFreeTalk () |
| void | OnEnterFreeTalk () |
| async void | RunScriptedDiscussion (ScriptedDiscussion discussion) |
| async void | RunGeneratedDiscussion (GeneratedDiscussion discussion) |
| void | OnEnterDiscuss () |
| void | OnEnterFinish () |
| void | OnGameStart () |
| void | OnGameContinue () |
| void | OnPushToTalkStarted (UnityEngine.InputSystem.InputAction.CallbackContext context) |
| void | OnPushToTalkCancelled (UnityEngine.InputSystem.InputAction.CallbackContext context) |
| void | OnDirectorResponse (Director.Response response) |
| void | Override () |
Private Attributes | |
| EchoTrio.UI.Chatbox | chatbox = null |
| TMPro.TextMeshProUGUI | roundCounterText = null |
| TMPro.TextMeshProUGUI | idleTimerText = null |
| DirectorConfig | directorConfig = null |
| ActorReferences[] | actorReferences = new ActorReferences[0] |
| Discussion[] | discussions = new Discussion[0] |
| int | finishRound = 10 |
| bool | enableDebug = true |
| bool | showReasoning = true |
| GameInputActions | gameInputActions = null |
| FSM.FiniteStateMachine | fsm = new FSM.FiniteStateMachine((int)State.Num) |
| Dictionary< string,(Actor, AudioSource)> | actors = new Dictionary<string, (Actor, AudioSource)>() |
| Director | director = null |
| int | roundCounter = 0 |
| float | idleTimer = 0.0f |
| bool | continueChat = false |
| bool | isAudioPlaying = false |
| bool | isQueueingAudio = false |
| Queue< ActorOutput > | actorOutputQueue = new Queue<ActorOutput>() |
| Dictionary< AudioClip, bool > | audioClipGarbageCollector = new Dictionary<AudioClip, bool>() |
| List< Discussion > | untriggeredDiscussions = null |
| Queue< Discussion > | discussionQueue = new Queue<Discussion>() |
| Queue< string > | speakerQueue = new Queue<string>() |
Static Private Attributes | |
| const string | OverrideFileName = "GameOverrides.ini" |
Voice chat system that acts as an intermediary between the human user and the AI models. The system works using the concept of rounds. During every round, a few things may happen.
Definition at line 18 of file VoiceChat.cs.
|
private |
All the possible states of the system.
Definition at line 22 of file VoiceChat.cs.
|
inlineprivate |
Launch an audio thread via Coroutine to play any queued audio from the actors.
Definition at line 265 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 141 of file VoiceChat.cs.
|
inlineprivate |
Flag that audio is being queued.
Definition at line 349 of file VoiceChat.cs.
|
inlineprivate |
Flag that audio is not queued.
Definition at line 356 of file VoiceChat.cs.
|
inline |
Definition at line 138 of file VoiceChat.cs.
|
inline |
Definition at line 136 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 231 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 173 of file VoiceChat.cs.
|
inlineprivate |
Callback invoked by the director when it has a response ready.
| response | The director's response. |
Definition at line 565 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 194 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 183 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 517 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 537 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 471 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 363 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 406 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 366 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 390 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 551 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 545 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 561 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 559 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 425 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 392 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 606 of file VoiceChat.cs.
|
inlineprivate |
Send the message received from one actor, to all the other actors.
| speaker | The actor that the message was received from. |
| message | The actor's message. |
Definition at line 329 of file VoiceChat.cs.
|
inlineprivate |
Send the message received from the user to all the actors.
| message | The user's message. |
Definition at line 341 of file VoiceChat.cs.
|
inlineprivate |
Queue up an actor's output to be played by the audio thread.
| actorOutput | The actor output to queue. |
Definition at line 240 of file VoiceChat.cs.
|
inline |
Reset the idle timer, usually invoked whenever there's any input by the user, such as typing something into the chatbox, or unmuting the microphone.
Definition at line 125 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 451 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 496 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 477 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 205 of file VoiceChat.cs.
|
inline |
Submit the user text input. Used as an alternative to speaking into the microphone, usually for development & debugging purposes.
| message | The user text input. |
Definition at line 132 of file VoiceChat.cs.
|
inline |
Toggle the chatbox to be active or inactive.
Definition at line 119 of file VoiceChat.cs.
|
inline |
Toggle the director's microphone on or off.
Definition at line 113 of file VoiceChat.cs.
|
inlineprivate |
Definition at line 211 of file VoiceChat.cs.
|
private |
Definition at line 101 of file VoiceChat.cs.
|
private |
Definition at line 77 of file VoiceChat.cs.
|
private |
Definition at line 92 of file VoiceChat.cs.
|
private |
Definition at line 102 of file VoiceChat.cs.
|
private |
Definition at line 71 of file VoiceChat.cs.
|
private |
Definition at line 96 of file VoiceChat.cs.
|
private |
Definition at line 93 of file VoiceChat.cs.
|
private |
Definition at line 76 of file VoiceChat.cs.
|
private |
Definition at line 106 of file VoiceChat.cs.
|
private |
Definition at line 80 of file VoiceChat.cs.
|
private |
Definition at line 86 of file VoiceChat.cs.
|
private |
Definition at line 83 of file VoiceChat.cs.
|
private |
Definition at line 91 of file VoiceChat.cs.
|
private |
Definition at line 90 of file VoiceChat.cs.
|
private |
Definition at line 95 of file VoiceChat.cs.
|
private |
Definition at line 73 of file VoiceChat.cs.
|
private |
Definition at line 99 of file VoiceChat.cs.
|
private |
Definition at line 100 of file VoiceChat.cs.
|
staticprivate |
Definition at line 19 of file VoiceChat.cs.
|
private |
Definition at line 94 of file VoiceChat.cs.
|
private |
Definition at line 72 of file VoiceChat.cs.
|
private |
Definition at line 87 of file VoiceChat.cs.
|
private |
Definition at line 109 of file VoiceChat.cs.
|
private |
Definition at line 105 of file VoiceChat.cs.