Skip to content

AudioEncoder

Bases: Enum

The AudioEncoder enum represents the different audio encoders supported by the audio recorder.

The available encoders are:

  • AACLC: Advanced Audio Codec Low Complexity. A commonly used encoder for streaming and general audio recording.
  • AACELD: Advanced Audio Codec Enhanced Low Delay. Suitable for low-latency applications like VoIP.
  • AACHE: Advanced Audio Codec High Efficiency. Optimized for high-quality audio at lower bit rates.
  • AMRNB: Adaptive Multi-Rate Narrow Band. Used for speech audio in mobile communication.
  • AMRWB: Adaptive Multi-Rate Wide Band. Used for higher-quality speech audio.
  • OPUS: A codec designed for both speech and audio applications, known for its versatility.
  • FLAC: Free Lossless Audio Codec. Provides high-quality lossless audio compression.
  • WAV: Standard audio format used for raw, uncompressed audio data.
  • PCM16BITS: Pulse Code Modulation with 16-bit depth, used for high-fidelity audio.
Source code in src/flet_audio_recorder/audio_recorder.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
class AudioEncoder(Enum):
    """
    The `AudioEncoder` enum represents the different audio encoders supported by the audio recorder.

    The available encoders are:

    - `AACLC`: Advanced Audio Codec Low Complexity. A commonly used encoder for streaming and general audio recording.
    - `AACELD`: Advanced Audio Codec Enhanced Low Delay. Suitable for low-latency applications like VoIP.
    - `AACHE`: Advanced Audio Codec High Efficiency. Optimized for high-quality audio at lower bit rates.
    - `AMRNB`: Adaptive Multi-Rate Narrow Band. Used for speech audio in mobile communication.
    - `AMRWB`: Adaptive Multi-Rate Wide Band. Used for higher-quality speech audio.
    - `OPUS`: A codec designed for both speech and audio applications, known for its versatility.
    - `FLAC`: Free Lossless Audio Codec. Provides high-quality lossless audio compression.
    - `WAV`: Standard audio format used for raw, uncompressed audio data.
    - `PCM16BITS`: Pulse Code Modulation with 16-bit depth, used for high-fidelity audio.
    """
    AACLC = "aacLc"
    AACELD = "aacEld"
    AACHE = "aacHe"
    AMRNB = "amrNb"
    AMRWB = "amrWb"
    OPUS = "opus"
    FLAC = "flac"
    WAV = "wav"
    PCM16BITS = "pcm16bits"