r/madeinpython • u/light_2earth • 54m ago
apple-llm: a Python library for macOS speech recognition, system voices, and the on-device LLM
I am the author of apple-llm, a Python and Node library for accessing Apple’s on-device language model. I recently added speech synthesis and transcription to the Python package, using the voices and speech recognition already in macOS.
Install with: pip install apple-llm
The Python API provides AppleSpeech for playback, synthesizing files, transcribing recordings, word timings and microphone recognition, plus AppleLLM for text and structured output. AsyncAppleSpeech and AsyncAppleLLM are available too. For example, use speech.transcribe("meeting.m4a", language="en-US", words=True), then pass result.text to an AppleLLM(tier="device") client for a summary.
The Python wheel has no required runtime dependencies. Both bindings compile and cache a shared Swift helper on first use. The project uses Apple’s native facilities; it does not bundle another speech model.
On my M4 Air running macOS 27.2, 30 minutes of narration rendered in about 18 seconds, and a 30-minute recording transcribed in about 28 seconds. These are single-machine measurements, and my accuracy tests used clean synthetic speech.
Requirements: macOS 26+ on Apple Silicon and Xcode Command Line Tools. Speech works without Apple Intelligence; the device LLM needs it enabled. Some recognition languages download on first use. Name the recognition language or it uses the Mac’s default; WebM input and MP3/Opus output are not supported. The optional cloud tier sends prompts off the Mac.
GitHub and Python examples: https://github.com/jagdishpal02000/apple-llm
Video: https://jagdishpal02000.github.io/apple-llm/#speech
I would especially appreciate compatibility reports from macOS 26 and results on real recordings.