A Tool Makes a MacBook's Trackpad Speak Through Its Haptic Motor
有人让 MacBook 的触控板开口说话
Driving the motor at up to 4,000 times a second makes the glass audible. It sounds robotic, and it can only manage speech and tones.
A MacBook's trackpad clicks because a haptic motor under the glass vibrates to imitate the feel of a button being pressed. A new open-source tool called nospeaker uses that same motor to make the trackpad produce sound.
The developer, Cody Collier, publishes it on GitHub as os6. It runs from the command line and can read out macOS system speech, turning text into voice, and play a rising tone. It cannot play music, YouTube or audio files.
The trick is speed. The tool drives the motor up to 4,000 times a second, which makes the glass panel vibrate fast enough for the human ear to hear it.
The pipeline is more careful than it sounds. The tool first has macOS generate the speech, then analyses the audio every 10 milliseconds. From each slice it pulls out two formants — the resonant frequencies that make vowels sound like vowels — along with loudness and pitch, and maps them onto two tones played by the motor. Sibilant sounds, the hissy ones, become short bursts of high frequency.
The result sounds robotic and, unexpectedly, is loud. Collier measured strong output from about 100 Hz to 4 kHz, with gaps in some bands; around 1 kHz it is clearest. He suggests muting the Mac and resting it on a desk to keep other noise down.
There is a catch. Apple's public haptics API offers only three fixed effects, so nospeaker goes around it and uses a private framework called MultitouchSupport. That means a macOS update could break the tool at any time.
Collier says it never drives the motor harder than normal use does. Any Mac with a Force Touch trackpad should work — MacBooks from 2015 on, and the Magic Trackpad 2 and later. Apple silicon machines need macOS 12 or newer, Intel machines macOS 13. So far it has only been tested on one M5 Max MacBook Pro, and it is released under the MIT licence.
中文翻译(全文)
MacBook 的触控板之所以能「咔哒」一下,是因为玻璃下方有个触觉马达在振动,模拟手指按下去的感觉。一个叫 nospeaker 的新开源工具,用同一个马达让触控板发出声音。
开发者 Cody Collier 在 GitHub 上以 os6 的账号发布。它通过命令行运行,可以朗读 macOS 的系统语音,把文字转成声音,也能播放一段上扬的音调。它没法播放音乐、YouTube 或音频文件。
诀窍是速度。这个工具以每秒最高 4000 次的频率驱动马达,让玻璃面板振动得足够快,快到人耳能听见。
具体流程比听起来讲究。工具先让 macOS 生成语音,然后每 10 毫秒分析一次音频。从每个片段里它提取两个共振峰——让元音听起来像元音的那些共振频率——连同响度与音高,映射成由马达播放的两个音调。带嘶嘶声的发音,则变成短促的高频音。
结果听起来有机器人腔调,而且出乎意料地响。Collier 测得在约 100 赫兹到 4 千赫兹范围内输出较强,部分频段有缺口;1 千赫兹附近最清楚。他建议把 Mac 静音、放在桌面上,以减少其他噪声。
有个代价。苹果公开的触觉 API 只提供三种固定效果,所以 nospeaker 绕开它,改用一套叫 MultitouchSupport 的私有框架。这意味着一次 macOS 更新就可能让工具失效。
Collier 说,它从不会以超过正常使用的强度驱动马达。任何配 Force Touch 触控板的 Mac 应该都能用——2015 年起的 MacBook,以及 Magic Trackpad 2 及更新型号。苹果芯片机器需要 macOS 12 或更新,英特尔机器需要 macOS 13。目前它只在一台 M5 Max 的 MacBook Pro 上测过,以 MIT 许可证发布。
重点词汇
- trackpad/ˈtrækpæd/n.— the flat surface used to move a pointer触控板The trackpad can make sound.
- haptic/ˈhæptɪk/adj.— relating to the sense of touch触觉的It uses the haptic motor.
- vibrate/vaɪˈbreɪt/v.— to shake very fast振动The glass vibrates.
- formant/ˈfɔːmənt/n.— a resonance that shapes speech sounds共振峰It extracts two formants.
- pitch/pɪtʃ/n.— how high or low a sound is音高It maps loudness and pitch.
- hissy/ˈhɪsi/adj.— full of s and sh sounds带嘶声的Hissy sounds become bursts.
- robotic/rəʊˈbɒtɪk/adj.— sounding like a machine机器人般的The voice sounds robotic.
- framework/ˈfreɪmwɜːk/n.— a set of software tools to build on框架It uses a private framework.
- open-source/ˌəʊpən ˈsɔːs/adj.— with code anyone can read and reuse开源的It is an open-source tool.
- command line/kəˈmɑːnd laɪn/n.— a text interface for giving instructions命令行It runs from the command line.
阅读测验
共 5 道题目
How does the tool make the trackpad produce sound?
Why could a system update stop the tool working?
The tool can play music and audio files through the trackpad.
Which things does the tool do? (Select all that apply)
From each slice of audio it extracts loudness, pitch and two ______.

评论
0 条讨论
登录后发表评论
立即登录暂无评论
成为第一个分享想法的人吧!