--- id: lameenc version: "1.8.4" license: LGPL-3.0-or-later license_treatment: copyleft maintenance: active --- # lameenc — LAME encoding bindings License: copyleft · Maintenance: active · Downloads: 830.6K/mo ## What it is and what it does lameenc is a Python wrapper around the LAME MP3 encoder, providing direct access to LAME's encoding functionality through a simple object-oriented interface. It accepts raw PCM audio data in 16-bit interleaved format and outputs MP3-encoded bytes, with control over bitrate, sample rate, channel count, and encoding quality. The library ships with prebuilt wheels for Linux, macOS, and Windows, eliminating the need to compile LAME yourself. The package is designed for applications that need to encode audio programmatically—such as real-time transcoding, batch audio processing, or streaming audio services. It requires Python 3.10 or later and has no runtime dependencies beyond the compiled LAME bindings. The encoder is stateful: you configure it once, call encode() repeatedly with audio chunks, then call flush() at the end to finalize the stream. Use it for: - Encode raw audio streams to MP3 in real-time applications like voice recording or VoIP systems - Batch convert PCM audio files to MP3 format with configurable quality and bitrate - Build audio processing pipelines that need to compress audio before transmission or storage - Integrate MP3 encoding into media server or transcoding service backends ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Wraps LAME MP3 encoder for Python, providing bindings to encode raw PCM audio data into MP3 format with configurable bitrate, sample rate, channels, and quality settings. Yes, if you need to encode PCM audio to MP3 in Python and can accept LGPL-3.0-or-later licensing. The package is actively maintained, has no known vulnerabilities, and provides prebuilt wheels for common platforms. The medium install friction is acceptable for a compiled binding. Verify that prebuilt wheels cover your target Python version and architecture before committing. ## Install pip install lameenc uv add lameenc poetry add lameenc ## Installing lameenc Before you install: Medium install friction due to compiled bindings, but prebuilt wheels are available for current Python versions (3.10+) across Linux, macOS, and Windows architectures. Package is actively maintained with recent releases. License in practice: Licensed under LGPL-3.0-or-later (copyleft). Derivative works and distributions must comply with copyleft obligations; proprietary applications linking this library may require license review. Quickstart: import lameenc encoder = lameenc.Encoder() encoder.set_bit_rate(128) encoder.set_in_sample_rate(16000) encoder.set_channels(2) encoder.set_quality(2) mp3_data = encoder.encode(interleaved_pcm_data) mp3_data += encoder.flush() Requires Python 3.10 or later; input audio must be raw PCM data in 16-bit interleaved format. Verify before relying: - Whether prebuilt wheels cover all target platforms and Python patch versions you need - Performance characteristics and memory overhead for large audio streams - Compatibility with alternative LAME versions or system-installed LAME libraries ## Package facts - License: LGPL-3.0-or-later (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 830.6K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mp3 encoder python, lame bindings, pcm to mp3 conversion, audio encoding library, mp3 encoding, lame wrapper, audio compression python, audio-encoding, mp3, lame-wrapper [View on SkillFed](https://skillfed.io/packages/lameenc) · [View on PyPI](https://pypi.org/project/lameenc/)