Skip to content
HN On Hacker News ↗

GitHub - os6/nospeaker: make your macbook's trackpad talk using its haptic motor

▲ 97 points • 38 comments • by yakkomajuri • 4h ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this text is a mix of AI and human-written content.

58 %

AI likelihood · overall

Mixed
42% human-written 58% AI-generated
SEGMENTS · HUMAN 11 of 24
SEGMENTS · AI 13 of 24
WORD COUNT 917
PEAK AI % 100% · §3
Analyzed
Nov 23
backend: pangram/v3.3
Segments scanned
24 windows
avg 38 words each
Distribution
42 / 58%
human / AI fraction
Verdict
Mixed
Pangram v3.3

Article text · 917 words · 24 segments analyzed

Human AI-generated
§1 Human · 0%

──────────────────────── a90.com presents ───────────────────────── _ __ ____ _____ ____ ______ ___ __ __ ______ ____ / | / // __ \ / ___/ / __ \ / ____// | / //_/ / ____// __ \ / |/ // / / / \__ \ / /_/ // __/ / /| | / ,< / __/ / /_/ / / /| // /_/ / ___/ // ____// /___ / ___ | / /| | / /___ / _, _/ /_/ |_/ \____/ /____//_/ /_____//_/ |_|/_/ |_|/_____//_/ |_| ─ haptic voice synthesis ───────────────────────────── trackpad ─ Mute your Mac.

§2 AI · 100%

Your trackpad will still talk.

§3 AI · 100%

There's no speaker in a MacBook trackpad, just a small haptic motor that taps the glass so you feel a click. NO SPEAKER drives that motor up to 4,000 times a second, fast enough to make sound you can hear, and turns it into a voice. It talks, sings, raps, and becomes an instrument under your finger.

§4 AI · 100%

One command. About a minute and a half. No speakers used.

§5 AI · 100%

01 / before you start [ mute your mac ] it still talks; that's the point [ put it on a table ] on your lap it's much quieter [ hands off the glass ] until it asks you to touch it Space skips a part. q or Ctrl-C goes to the end. 02 / run it [ one line ] curl -fsSL a90.com/nospeaker | sh Downloads the latest release to ~/.local/bin/nospeaker and starts the show. a90.com/nospeaker points to play.sh in this repo, so you can read what it runs first. [ download ] Grab nospeaker.zip from the latest release, unzip it and run ./nospeaker in Terminal.

§6 AI · 100%

Signed with a Developer ID and notarized by Apple.

§7 AI · 100%

[ from source ] Needs Xcode or the Command Line Tools (xcode-select --install). Builds one program for Apple Silicon and Intel Macs. git clone https://github.com/os6/nospeaker cd nospeaker ./build.sh ./nospeaker 03 / play with it ./nospeaker "hello there" say anything ./nospeaker --voice Daniel "hello" in another macOS voice ./nospeaker --sweep a rising tone, 100 Hz to 4 kHz --dark white on black --plain no visuals, plain text 04 / needs A Force Touch trackpad (built into MacBooks from 2015 on, or a Magic Trackpad 2 or newer), and macOS 12 or later on Apple Silicon, or macOS 13 or later on Intel. Without a Force Touch trackpad, it says so and exits. tested on MacBook Pro (Mac17,10) M5 Max macOS 27.2.1 everything works Not tested yet: Intel Macs, a Magic Trackpad, and older versions of macOS. MultitouchSupport is private, so older systems may lack the functions it uses, and loudness differs between trackpads. If you try it on another Mac, open an issue with your model, your macOS version and how it sounded. 05 / how it works say ──▶ formants ──▶ two tones ──▶ motor ──▶ glass per 10 ms F1 + F2 haptics sound Why you can hear it. The trackpad has no speaker, but the motor moves the glass. Driven back and forth hundreds or thousands of times a second, the glass vibrates fast enough to make sound you can hear. It's quiet because the motor is built for short taps, not for sound.

§8 AI · 100%

The motor. MultitouchSupport is the private framework macOS uses for the trackpad.

§9 AI · 100%

Its function MTActuationCreateFromDictionary takes a description of a vibration, a list of sine tones with a frequency, a strength and a length each, and MTActuationActuate plays it on the motor. Apple's public haptics API only offers three fixed taps.

§10 AI · 100%

The range.

§11 AI · 100%

Measured with the MacBook's own microphone, every semitone from 98 Hz to 3,951 Hz: how loud it is over a quiet room, and how much of the sound is the note itself.

§12 Human · 0%

│ ### │ #+# +++##### # │ +#+#+ .+++##### .# │ . ++++#+#+ .+++##### # #.# # │ ++ +.

§13 Human · 0%

.

§14 Human · 0%

#..+++++#+#++++.+++#####+ #####.### .# │ +++#. +...+#..+++++#+#++++.+++#####+ #####.####+ .# │ ++++#... +...+#..+++++#+#++++.+++#####+.#####.####+ .# │ .++++#...++++...+#..+++++#+#++++.+++#####+.#####.####+ +# .# │..++++#...++++...+#..+++++#+#++++.+++#####+.#####.####+#.+# .#.# │..++++#...++++...+#..+++++#+#++++.+++#####+.#####.####+#.+#+..#.# └───────────────────────────────────────────────────────────────── 131 262 523 1047 2093 3951 public notes stop at 600 Hz ─┘ across: every semitone, in Hz · up: loudness, +16 to +34 dB # clean note + fair . mostly buzz It's loud from about 100 Hz to 4 kHz, with a few dead spots where the glass resonates. Its loudest, cleanest notes are around 1 kHz, which covers the most important part of a voice.

§15 Human · 0%

The voice. macOS's own voice speaks the line into memory. Every 10 ms, linear prediction finds the voice's two strongest resonances (formants), its loudness and its pitch.

§16 AI · 100%

The motor plays those two resonances as tones, restarted on every beat of the pitch, so they buzz like a voice instead of whistling.

§17 AI · 100%

Hiss sounds (s, f, t) become quick bursts of high tones.

§18 AI · 100%

Two resonances beat three: in a blind test they were clearer, and louder, because the motor's strength is split fewer ways.

§19 Human · 0%

It sounds robotic, and it's much easier to follow when you can read along, which is why the show types every line as it speaks. The code.

§20 Human · 0%

One Swift file, nospeaker.swift, with no dependencies.

§21 Human · 0%

06 / caveats Is it safe?

§22 Human · 0%

It never drives the motor past its normal maximum strength.

§23 Human · 0%

Going past it is possible and louder, but the driver starts to stall, so nospeaker doesn't. MultitouchSupport is private and undocumented, so a macOS update could break this. The MultitouchSupport function names were learned from the open-source Tactile project.

§24 Human · 0%

Everything else was measured on a MacBook. ────────────────────── thanks for listening ─────────────────────── Made by Cody Collier · a90.com · MIT license