# SwiftLAME **Repository Path**: izdan369/SwiftLAME ## Basic Information - **Project Name**: SwiftLAME - **Description**: No description available - **Primary Language**: Unknown - **License**: LGPL-2.1 - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-12 - **Last Updated**: 2025-05-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![SwiftLAME GH Banner](https://github.com/hidden-spectrum/SwiftLAME/assets/469799/a65a5d73-61fb-4ef8-9b7a-7e8a29446d73) SwiftLAME is a lightweight Swift wrapper around the [open-source LAME project](https://lame.sourceforge.io) for encoding audio files to MP3 format. This project was created to support the MP3 conversion feature of our [Producer Toolkit macOS App](https://hiddenspectrum.io/producer-toolkit). ## Requirements SwiftLAME has been tested on macOS 12+, and iOS 15+, although older versions are likely supported. Consider contributing a change to Package.swift if you find this to be the case. ## Installation Add the dependency to your `Package.swift` file: ```swift dependencies: [ .package(url: "https://github.com/hidden-spectrum/swiftlame", .upToNextMajor(from: "0.1.0")), ] ``` ## Usage ```swift import SwiftLAME let progress = Progress() let lameEncoder = try SwiftLameEncoder( sourceUrl: URL("file:///path/to/source/file.wav"), configuration: .init( sampleRate: .constant(44100) bitrateMode: .constant(320) quality: .mp3Best ), destinationUrl: URL("file:///path/to/destination/file.wav"), progress: progress // optional ) try await lameEncoder.encode(priority: .userInitiated) ``` ## Source Codec Support SwiftLAME supports converting from the following codecs: - WAV - AIFF - Raw PCM ## Notes - SwiftLAME is still in early alpha. There may be bugs or missing features. ## License SwiftLAME, like the [LAME project](https://lame.sourceforge.io/license.txt), is distributed under the LGPL License.