Microphone class

Constructors

Microphone(Frame frame)

Properties

bitDepth int
Gets the bit depth (number of bits per audio sample), either 8 or 16.
getter/setter pair
frame Frame
final
hashCode int
The hash code for this object.
no setterinherited
logger → Logger
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRate int
Gets the sample rate (number of audio samples per second), either 8000 or 16000.
getter/setter pair
silenceThreshold double
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
playAudio(Uint8List audioData, {int? sampleRate, int? bitDepth}) Future<void>
Plays audio data.
recordAudio({Duration? silenceCutoffLength = const Duration(seconds: 3), Duration maxLength = const Duration(seconds: 30)}) Future<Uint8List>
Records audio from the microphone.
saveAudioFile(String filename, {Duration? silenceCutoffLength = const Duration(seconds: 3), Duration maxLength = const Duration(seconds: 30)}) Future<double>
Saves the recorded audio to a file.
toString() String
A string representation of this object.
inherited

Operators

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