MacBook trackpad taught to speak without a speaker
XORit Editorial · Sources, AI assistance and corrections

The trackpad in a MacBook doesn't really click: the sensation of a click is created by a motor under the glass. The nospeaker utility, which разработчик os6 published on GitHub, makes that motor talk. It runs from the command line and voices text with the macOS voice.
The whole trick is speed. The motor swings up to 4,000 times per second, and the glass vibrates fast enough for the vibration to become audible sound. The app first synthesizes speech with the system's built-in voices, then every 10 milliseconds breaks the resulting sound down into two formants, loudness and pitch, and plays them through the motor as two tones. Sibilant sounds turn into short bursts of high tones, which is why the voice comes out robotic.
In a short test by Notebookcheck the sound turned out strong from roughly 100 Hz to 4 kHz, with individual dips, and it sounded cleanest around 1 kHz. On the laptop the volume was enough to use the trackpad as an improvised speaker. os6 himself advises turning the sound off on the Mac and putting the laptop on a table so there is less noise.
Music, YouTube videos and other audio files can't be listened to this way: only text and a rising tone are available. Apple's public API for haptics offers just three fixed responses, so автор used the private MultitouchSupport framework. Because of that, a macOS update may break the utility. At the same time, according to him, the app does not drive the motor beyond the usual maximum force.
Any Mac with a Force Touch trackpad will do, that is, laptops from 2015 onward and the Magic Trackpad 2 or newer. macOS 12 on Apple Silicon or macOS 13 on Intel is required. Автор tested it only on a MacBook Pro with an M5 Max. The project is free, and the code is open under the MIT license.
Translation editors: Соловьев В., Пеков А.
Source: www.notebookcheck.net ↗