API reference
API reference
Select your platform
No SDKs available
No versions available

IAudioInputSource Interface

This interface defines the methods and properties required for an audio input source. It is used to start and stop recording, check if recording is in progress, and handle events related to recording.

Overview

Events

Action
Invoked when the instance starts Recording.
Action
Invoked when an AudioClip couldn't be created to start recording.
Action< int, float[], float >
Invoked everytime an audio frame is collected. Includes the frame.
Action
Invoked when the instance stop Recording.

Properties

bool
Returns true if the audio input source is currently recording.
Settings determining how audio is encoded by the source.

Public Member Functions

void
StartRecording
( int sampleLen )
Starts recording audio with the specified sample length.
void
Stops recording audio.

Details

Events

Action Meta.WitAi.Interfaces.IAudioInputSource.OnStartRecording ( )
Invoked when the instance starts Recording.
Action Meta.WitAi.Interfaces.IAudioInputSource.OnStartRecordingFailed ( )
Invoked when an AudioClip couldn't be created to start recording.
Action<int, float[], float> Meta.WitAi.Interfaces.IAudioInputSource.OnSampleReady ( )
Invoked everytime an audio frame is collected. Includes the frame.
Action Meta.WitAi.Interfaces.IAudioInputSource.OnStopRecording ( )
Invoked when the instance stop Recording.

Properties

bool Meta.WitAi.Interfaces.IAudioInputSource.IsRecording
Returns true if the audio input source is currently recording.
AudioEncoding Meta.WitAi.Interfaces.IAudioInputSource.AudioEncoding
Settings determining how audio is encoded by the source.
NOTE: Default values for AudioEncoding are server optimized to reduce latency.

Member Functions

void Meta.WitAi.Interfaces.IAudioInputSource.StartRecording
( int sampleLen )
Starts recording audio with the specified sample length.
Parameters
sampleLen
The length of the audio sample to record.
void Meta.WitAi.Interfaces.IAudioInputSource.StopRecording ( )
Stops recording audio.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon