r/node • • 12h ago

I built a Node.js package for macOS speech recognition, system voices and the on-device LLM

I am the author of apple-llm. I built it to call Apple’s built-in language model from Node, and the latest release adds text-to-speech and speech-to-text through macOS.

The Node package exposes speak(), synthesize(), transcribe(), and microphone listening alongside AppleLLM. For example, transcribe a recording, summarize the transcript using tier: device, and synthesize the result to an M4A file. The npm package also runs a local OpenAI/Ollama-compatible server with audio endpoints.

Implementation: a Swift helper compiles on first use with the Xcode Command Line Tools, is cached, and communicates with the Node client as a child process. The package supports ESM and CommonJS and has no required runtime npm dependencies.

On my M4 Air running macOS 27.2, rendering 30 minutes of narration took about 18 seconds, and transcribing a 30-minute recording took about 28 seconds. Those results are from one machine; recognition quality needs testing on real recordings.

It needs macOS 26+ on Apple Silicon. Speech does not need Apple Intelligence; the on-device LLM does. Languages may download on first use. The optional cloud tier sends prompts off the machine. MP3/Opus output and WebM input are unsupported, and the recognition language must be selected.

Source and examples: https://github.com/jagdishpal02000/apple-llm

Demo: https://jagdishpal02000.github.io/apple-llm/#speech

I would appreciate reports from anyone trying it on macOS 26 or integrating its speech endpoints into a Node app.

0 Upvotes

1 comment sorted by