hn.today

Nospeaker: Make your MacBook's trackpad talk using its haptic motor

github.com8 points0 comments
Screenshot of Nospeaker: Make your MacBook's trackpad talk using its haptic motor

Nospeaker is a small, open-source Swift program that makes a MacBook’s Force Touch trackpad produce audible speech and other sounds through its haptic motor, without using speakers. The project argues that the motor can vibrate the glass quickly enough to create audible tones: it operates across roughly 100 Hz to 4 kHz, though loudness and clarity vary by frequency, with the strongest, cleanest notes around 1 kHz. Nospeaker turns macOS speech into a robotic voice by analyzing it every 10 milliseconds, identifying two vocal resonances, pitch, and loudness, then playing corresponding tones through the motor. Brief high-frequency bursts represent hiss sounds. The demonstration displays text as it speaks, since the synthesized voice is easier to understand when read along with.

The program can also speak supplied text, use another macOS voice, play a frequency sweep, or run in text-only or alternate visual modes. It requires a Force Touch trackpad - on a MacBook from 2015 onward or a Magic Trackpad 2 or newer - and macOS 12 or later on Apple Silicon, or macOS 13 or later on Intel. Installation is available through a shell command, a notarized release, or a source build. The code is a single Swift file with no dependencies. It stays within the motor’s normal maximum strength, but relies on Apple’s private, undocumented MultitouchSupport framework, so macOS updates could break it. Testing is reported on an M5 Max MacBook Pro; Intel Macs, Magic Trackpads, and older macOS versions remain untested.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Hardware

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.