AudioInput class

Audio handed to stt, vad, and diarization.

Constructors

AudioInput.float32(Float32List samples, {int sampleRate = RADefaultsAudioCapture.micSampleRateHz, int channels = 1})
Wrap 32-bit float samples in [-1.0, 1.0].
factory
AudioInput.pcm16(Uint8List bytes, {int sampleRate = RADefaultsAudioCapture.micSampleRateHz, int channels = 1})
Wrap signed 16-bit little-endian PCM samples.
factory
AudioInput.wav(Uint8List bytes)
Wrap a complete WAV file, header included.
factory

Properties

bytes Uint8List
Raw audio bytes.
final
format AudioFormatSpec
Layout of bytes.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toSttSource() STTAudioSource
Build the generated STT audio source for this input.
toVadSource() VADAudioSource
Build the generated VAD audio source for this input.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

file(String path) Future<AudioInput>
Read a container-framed audio file from disk.