Class RealtimeEventHandler
Event handler for real-time assistant events. Provides UnityEvents that are triggered by the RealtimeEventReceiver.
Inherited Members
Namespace: Glitch9.AIDevKit.Components
Assembly: .dll
Syntax
public class RealtimeEventHandler : AIDevKitEventHandler
Fields
onReceiveAudio
Invoked when a chunk of audio data (float array) is received during streaming.
Declaration
public UnityEvent<float[]> onReceiveAudio
Field Value
Type | Description |
---|---|
UnityEvent<float[]> |
onReceiveAudioClip
Invoked when an AudioClip is constructed from received audio.
Declaration
public UnityEvent<AudioClip> onReceiveAudioClip
Field Value
Type | Description |
---|---|
UnityEvent<AudioClip> |
onReceiveAudioDone
Invoked when the full audio stream has been received and finalized.
Declaration
public UnityEvent<float[]> onReceiveAudioDone
Field Value
Type | Description |
---|---|
UnityEvent<float[]> |
onReceiveInputTranscriptionFailed
Invoked when input audio transcription fails.
Declaration
public UnityEvent<ErrorResponse> onReceiveInputTranscriptionFailed
Field Value
Type | Description |
---|---|
UnityEvent<ErrorResponse> |
onReceiveInputTranscriptionSuccess
Invoked when input audio transcription completes successfully.
Declaration
public UnityEvent<string> onReceiveInputTranscriptionSuccess
Field Value
Type | Description |
---|---|
UnityEvent<string> |
onReceiveText
Invoked when a text delta (partial text) is received during streaming.
Declaration
public UnityEvent<string> onReceiveText
Field Value
Type | Description |
---|---|
UnityEvent<string> |
onReceiveTextDone
Invoked when the text response is complete.
Declaration
public UnityEvent<string> onReceiveTextDone
Field Value
Type | Description |
---|---|
UnityEvent<string> |
onReceiveTranscript
Invoked when a partial transcript is received during real-time transcription.
Declaration
public UnityEvent<string> onReceiveTranscript
Field Value
Type | Description |
---|---|
UnityEvent<string> |
onReceiveTranscriptDone
Invoked when the full transcript is finalized.
Declaration
public UnityEvent<string> onReceiveTranscriptDone
Field Value
Type | Description |
---|---|
UnityEvent<string> |
onSessionStateChanged
Invoked when the session state changes.
Declaration
public UnityEvent<string> onSessionStateChanged
Field Value
Type | Description |
---|---|
UnityEvent<string> |
onWebSocketStateChanged
Invoked when the WebSocket connection state changes.
Declaration
public UnityEvent<WebSocketState> onWebSocketStateChanged
Field Value
Type | Description |
---|---|
UnityEvent<WebSocketState> |