Interface ISpeechToTextRecorder
Interface for recording audio input and converting it to text via speech recognition.
Namespace: Glitch9.AIDevKit.Agents
Assembly: Glitch9.AIDevKit.dll
Syntax
public interface ISpeechToTextRecorder
Methods
| Edit this page View SourceConfigure(AudioRecorderSettings)
Configures the recorder with the specified settings.
Declaration
void Configure(AudioRecorderSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| AudioRecorderSettings | settings |
RegisterInputAudioBufferListener(Action<float[]>)
Registers a listener for raw audio buffer data during recording.
Declaration
void RegisterInputAudioBufferListener(Action<float[]> listener)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<float[]> | listener |
RegisterRecordingStoppedListener(Action<AudioClip>)
Registers a listener that will be called when recording stops.
Declaration
void RegisterRecordingStoppedListener(Action<AudioClip> listener)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<AudioClip> | listener |
StartRecording()
Starts recording audio from the microphone.
Declaration
void StartRecording()
StopRecordingAsync()
Stops recording and returns the recorded audio as an AudioClip.
Declaration
UniTask<AudioClip> StopRecordingAsync()
Returns
| Type | Description |
|---|---|
| UniTask<AudioClip> |
UnregisterInputAudioBufferListener(Action<float[]>)
Unregisters a previously registered audio buffer listener.
Declaration
void UnregisterInputAudioBufferListener(Action<float[]> listener)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<float[]> | listener |
UnregisterRecordingStoppedListener(Action<AudioClip>)
Unregisters a previously registered recording stopped listener.
Declaration
void UnregisterRecordingStoppedListener(Action<AudioClip> listener)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<AudioClip> | listener |