Search Results for

    Show / Hide Table of Contents

    Class SpeechToTextRecorder

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    SpeechToTextRecorder
    Implements
    ISpeechToTextRecorder
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.transformHandle
    Component.gameObject
    Component.tag
    Object.GetEntityId()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit.Generators
    Assembly: Glitch9.AIDevKit.Agent.dll
    Syntax
    [AddComponentMenu("AI DevKit/AI Generators/Speech-to-Text Recorder", 4)]
    public class SpeechToTextRecorder : MonoBehaviour, ISpeechToTextRecorder

    Fields

    | Edit this page View Source

    onIsRecordingChanged

    Raised whenever the recording state changes. true = recording started, false = recording stopped.

    Declaration
    public UnityEvent<bool> onIsRecordingChanged
    Field Value
    Type Description
    UnityEvent<bool>
    | Edit this page View Source

    onMicrophoneLevelChanged

    Raised each frame with the current microphone input level (0??).

    Declaration
    public UnityEvent<float> onMicrophoneLevelChanged
    Field Value
    Type Description
    UnityEvent<float>
    | Edit this page View Source

    onMicrophonePermissionGranted

    Raised when microphone permission is granted or denied.

    Declaration
    public UnityEvent<bool> onMicrophonePermissionGranted
    Field Value
    Type Description
    UnityEvent<bool>

    Properties

    | Edit this page View Source

    IsRecording

    Returns true while the recorder is actively capturing audio from the microphone.

    Declaration
    public bool IsRecording { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    KeyCodeTrigger

    Settings for keyboard-based recording trigger. Only used when RecordingTrigger is KeyCode.

    Declaration
    public KeyCodeTrigger KeyCodeTrigger { get; }
    Property Value
    Type Description
    KeyCodeTrigger
    | Edit this page View Source

    Microphone

    The device name of the microphone to record from. When set while recording is active, restarts the recording on the new device. If left empty, the platform default microphone will be used.

    Declaration
    public string Microphone { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Recorder

    Core audio recorder that handles microphone input and recording logic.

    Declaration
    public StreamingAudioRecorder Recorder { get; }
    Property Value
    Type Description
    StreamingAudioRecorder
    | Edit this page View Source

    RecordingDuration

    The maximum duration of a single recording session in seconds. Increase this value if users need to speak for longer than the default. Default: Glitch9.AIDevKit.AIDevKitConfig.DefaultRecordingLengthSec.

    Declaration
    public int RecordingDuration { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    RecordingTrigger

    Determines how recording is triggered: Manual, KeyCode, or VoiceDetection. Changing this at runtime reconfigures the underlying recorder.

    Declaration
    public RecordingTriggerType RecordingTrigger { get; set; }
    Property Value
    Type Description
    RecordingTriggerType
    | Edit this page View Source

    VoiceDetectionSettings

    Settings for voice-activity-detection (VAD) based recording trigger. Only used when RecordingTrigger is VoiceDetection.

    Declaration
    public VoiceDetectionTrigger VoiceDetectionSettings { get; }
    Property Value
    Type Description
    VoiceDetectionTrigger

    Methods

    | Edit this page View Source

    Configure(AudioRecorderSettings)

    Applies new AudioRecorderSettings (sample rate, length, device, etc.) to the underlying recorder at runtime.

    Declaration
    public void Configure(AudioRecorderSettings settings)
    Parameters
    Type Name Description
    AudioRecorderSettings settings
    | Edit this page View Source

    RegisterInputAudioBufferListener(Action<float[]>)

    Registers a callback that receives raw PCM float samples as they arrive from the microphone. Useful for real-time visualization or custom processing.

    Declaration
    public void RegisterInputAudioBufferListener(Action<float[]> listener)
    Parameters
    Type Name Description
    Action<float[]> listener
    | Edit this page View Source

    RegisterRecordingStoppedListener(Action<AudioClip>)

    Registers a callback that fires when a recording session ends and the final UnityEngine.AudioClip is available.

    Declaration
    public void RegisterRecordingStoppedListener(Action<AudioClip> listener)
    Parameters
    Type Name Description
    Action<AudioClip> listener
    | Edit this page View Source

    StartRecording()

    Begins capturing audio from the configured microphone.

    Declaration
    public void StartRecording()
    Exceptions
    Type Condition
    MissingComponentException

    Thrown if the underlying StreamingAudioRecorder could not be created, or if no microphone device is assigned.

    | Edit this page View Source

    StopRecordingAsync()

    Stops the active recording and returns the captured UnityEngine.AudioClip after post-processing. Returns null if the recording is too short, contains no audio data, or the component is being destroyed.

    Declaration
    public UniTask<AudioClip> StopRecordingAsync()
    Returns
    Type Description
    UniTask<AudioClip>
    | Edit this page View Source

    UnregisterInputAudioBufferListener(Action<float[]>)

    Unregisters a previously registered PCM sample callback. Safe to call even if the recorder has not been initialized.

    Declaration
    public void UnregisterInputAudioBufferListener(Action<float[]> listener)
    Parameters
    Type Name Description
    Action<float[]> listener
    | Edit this page View Source

    UnregisterRecordingStoppedListener(Action<AudioClip>)

    Unregisters a previously registered recording-stopped callback. Safe to call even if the recorder has not been initialized.

    Declaration
    public void UnregisterRecordingStoppedListener(Action<AudioClip> listener)
    Parameters
    Type Name Description
    Action<AudioClip> listener

    Implements

    ISpeechToTextRecorder

    Extension Methods

    LocalizationExtensions.SetLocalizedAsset<TComponent, TObject>(TComponent, string, Action<TComponent, TObject>, string, LocalizationOptions<TObject>)
    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    FileExtensions.ToFile<T>(T, string)
    ResponseCastingExtensions.GetResult<T>(T)
    UnityObjectExtensions.Find<T>(T, string)
    UnityObjectExtensions.Find<T, TTarget>(TTarget, T, string)
    UnityObjectExtensions.Find<T, TTarget>(TTarget, T, string, string)
    UnityObjectExtensions.GetChildIndex<T>(T)
    UnityObjectExtensions.GetOrAddComponentInChildren<T, TV>(TV, string)
    SystemExtensions.GetName(object)
    UnityObjectExtensions.EncodeToBase64(Object)
    UnityObjectExtensions.ToBytes(Object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation