A MacBook trackpad has no speaker, only a small motor that taps the glass. nospeaker drives that motor so fast that it makes sound, and the result is a voice. It is useless and I love it. It’s really brilliant and cool!
nospeaker is a one-file Swift program by Cody Collier, under the MIT licence. It runs the trackpad’s haptic motor up to 4,000 times a second, which is fast enough to produce audible sound. macOS speaks a line into memory, the program picks out the voice’s two strongest resonances every 10 milliseconds and plays them as tones on the motor.

The README gives three routes. The one-liner is curl -fsSL a90.com/nospeaker | sh, which points to a script in the repository, so you can read it first. You can also download the signed and notarised nospeaker.zip from the releases page, or build it with ./build.sh if you have Xcode or the Command Line Tools. Then ./nospeaker "hello there" makes it say anything.
A Force Touch trackpad (MacBooks from 2015, or a Magic Trackpad 2 or newer) and macOS 12 or later on Apple Silicon, or macOS 13 on Intel. The README says it was tested on one machine, a MacBook Pro with an M5 Max. Intel Macs, the Magic Trackpad and older macOS versions are untested.
It sounds robotic, and it is quiet, because the motor is made for short taps, not for sound. It uses the private MultitouchSupport framework, so a macOS update could break it. The author says it never drives the motor past its normal maximum strength. I would still put the Mac on a table and keep my hand off the glass, as the README asks.
It is not something I need, but the idea that a laptop can talk through a part that was built to give a click is exactly the kind of small hack I like to read about.
Further reading: nospeaker on GitHub
