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
StreamingAudioRecorder
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
Properties
|
Edit this page
View Source
AutoStopRecordingOnSilence
Declaration
public bool AutoStopRecordingOnSilence { get; set; }
Property Value
|
Edit this page
View Source
DetectionIntervalMs
Declaration
public int DetectionIntervalMs { get; set; }
Property Value
|
Edit this page
View Source
SilenceDurationMs
Declaration
public int SilenceDurationMs { get; set; }
Property Value
|
Edit this page
View Source
SilenceThreshold
Declaration
public float SilenceThreshold { get; set; }
Property Value
|
Edit this page
View Source
TriggerType
Declaration
public RecordingTriggerType TriggerType { get; set; }
Property Value
|
Edit this page
View Source
state
Declaration
public StreamingAudioRecorder.State state { get; }
Property Value
Methods
|
Edit this page
View Source
CanStartRecording()
Declaration
protected override bool CanStartRecording()
Returns
Overrides
|
Edit this page
View Source
Dispose()
Declaration
|
Edit this page
View Source
OnRecordingStarted(AudioClip)
Declaration
protected override bool OnRecordingStarted(AudioClip clip)
Parameters
| Type |
Name |
Description |
| AudioClip |
clip |
|
Returns
Overrides
|
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
Events
|
Edit this page
View Source
canRecordPredicate
Declaration
public event Func<bool> canRecordPredicate
Event Type
|
Edit this page
View Source
Declaration
public event Action<float[]> onInputAudioBuffer
Event Type
|
Edit this page
View Source
onMicrophoneLevelChanged
Declaration
public event Action<float> onMicrophoneLevelChanged
Event Type
|
Edit this page
View Source
onRecordingStarted
Declaration
public event Action onRecordingStarted
Event Type
|
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
Implements
Extension Methods