Search Results for

    Show / Hide Table of Contents

    Class StreamingAudioRecorder

    Robust implementation of the audio recorder that supports real-time audio recording. This class allows for real-time audio recording with various triggers and callbacks. You can start and stop recording, handle audio input in real-time, and manage state transitions. You must call 'OnUpdateLoop()' method from the MonoBehaviour's Update() loop to process triggers.

    Inheritance
    object
    AudioRecorderBase
    StreamingAudioRecorder
    Implements
    IDisposable
    Inherited Members
    AudioRecorderBase.RecordingFileNameFormat
    AudioRecorderBase.MicrophoneDeviceName
    AudioRecorderBase.SampleRate
    AudioRecorderBase.RecordingLengthSec
    AudioRecorderBase.MinRecordingLengthSec
    AudioRecorderBase.IsRecording
    AudioRecorderBase.RecordingClip
    AudioRecorderBase.Configure(AudioRecorderSettings)
    AudioRecorderBase.RequestMicrophonePermission(Action<bool>)
    AudioRecorderBase.StartRecording(string)
    AudioRecorderBase.StopRecordingWithoutNotify()
    AudioRecorderBase.GetRecording()
    AudioRecorderBase.PlayRecording()
    AudioRecorderBase.FormatRecordingFileName()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.IO.Audio
    Assembly: Glitch9.IO.dll
    Syntax
    public sealed class StreamingAudioRecorder : AudioRecorderBase, IDisposable

    Constructors

    | Edit this page View Source

    StreamingAudioRecorder(AudioRecorderSettings, RecordingTriggerType, bool, KeyCodeTrigger, VoiceDetectionTrigger, ILogger)

    Declaration
    public StreamingAudioRecorder(AudioRecorderSettings settings = null, RecordingTriggerType triggerType = RecordingTriggerType.Manual, bool autoStopRecordingOnSilence = false, KeyCodeTrigger keyCodeTrigger = null, VoiceDetectionTrigger voiceDetectionTrigger = null, ILogger logger = null)
    Parameters
    Type Name Description
    AudioRecorderSettings settings
    RecordingTriggerType triggerType
    bool autoStopRecordingOnSilence
    KeyCodeTrigger keyCodeTrigger
    VoiceDetectionTrigger voiceDetectionTrigger
    ILogger logger

    Properties

    | Edit this page View Source

    AutoStopRecordingOnSilence

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

    DetectionIntervalMs

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

    SilenceDurationMs

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

    SilenceThreshold

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

    TriggerType

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

    state

    Declaration
    public StreamingAudioRecorder.State state { get; }
    Property Value
    Type Description
    StreamingAudioRecorder.State

    Methods

    | Edit this page View Source

    CanStartRecording()

    Declaration
    protected override bool CanStartRecording()
    Returns
    Type Description
    bool
    Overrides
    AudioRecorderBase.CanStartRecording()
    | Edit this page View Source

    Dispose()

    Declaration
    public void Dispose()
    | Edit this page View Source

    OnRecordingStarted(AudioClip)

    Declaration
    protected override bool OnRecordingStarted(AudioClip clip)
    Parameters
    Type Name Description
    AudioClip clip
    Returns
    Type Description
    bool
    Overrides
    AudioRecorderBase.OnRecordingStarted(AudioClip)
    | Edit this page View Source

    OnUpdateLoop()

    Declaration
    public void OnUpdateLoop()
    | Edit this page View Source

    StopRecording()

    Declaration
    public override AudioClip StopRecording()
    Returns
    Type Description
    AudioClip
    Overrides
    AudioRecorderBase.StopRecording()

    Events

    | Edit this page View Source

    canRecordPredicate

    Declaration
    public event Func<bool> canRecordPredicate
    Event Type
    Type Description
    Func<bool>
    | Edit this page View Source

    onInputAudioBuffer

    Declaration
    public event Action<float[]> onInputAudioBuffer
    Event Type
    Type Description
    Action<float[]>
    | Edit this page View Source

    onMicrophoneLevelChanged

    Declaration
    public event Action<float> onMicrophoneLevelChanged
    Event Type
    Type Description
    Action<float>
    | Edit this page View Source

    onRecordingStarted

    Declaration
    public event Action onRecordingStarted
    Event Type
    Type Description
    Action
    | Edit this page View Source

    onRecordingStopped

    Declaration
    public event Action<AudioClip> onRecordingStopped
    Event Type
    Type Description
    Action<AudioClip>
    | Edit this page View Source

    onStateChanged

    Declaration
    public event Action<StreamingAudioRecorder.State> onStateChanged
    Event Type
    Type Description
    Action<StreamingAudioRecorder.State>

    Implements

    IDisposable

    Extension Methods

    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)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.TryDispose(IDisposable)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation