开源项目Nospeaker由开发者Cody Collier发布,该项目利用MacBook Force Touch触控板的触觉马达实现语音合成 1。其核心原理是通过驱动马达以每秒最高4,000次的频率振动,使玻璃表面产生可听见的声波,从而在无需扬声器的情况下播放声音、唱歌或说话 1。技术层面,软件将macOS的语音转换为两个共振峰(formants),并调用私有框架MultitouchSupport中的MTActuationCreateFromDictionary函数在马达上复现这一振动模式 1。实测数据显示,该装置的有效发声频率范围约为100 Hz至4 kHz,其中在1 kHz左右能发出最清晰的音符 1。
该工具对硬件和系统版本有特定要求,需配备Force Touch触控板(适用于2015年及以后款MacBook或Magic Trackpad 2及以上版本) 1。在操作系统兼容性方面,Apple Silicon设备需运行macOS 12或更高版本,而Intel架构设备则需macOS 13或更高版本 1。尽管Nospeaker不会超过马达的正常最大强度以确保安全,但由于其依赖未公开的私有API,存在因macOS系统更新而导致功能失效的风险 1。代码结构简洁,仅包含一个名为nospeaker.swift的文件,无外部依赖,并采用MIT许可证开源 1。
Developer Cody Collier has released Nospeaker, an open-source project that enables a MacBook’s Force Touch trackpad to generate audible speech, music, and sounds without using the laptop’s built-in speakers 1. The software achieves this by driving the trackpad’s haptic motor to vibrate at frequencies up to 4,000 times per second, creating sound waves through the glass surface 1. By converting macOS voice data into two resonant formants and reproducing them on the motor via the private MultitouchSupport framework function MTActuationCreateFromDictionary, the tool effectively turns the input device into a speaker 1.
The project requires a MacBook equipped with a Force Touch trackpad (models from 2015 onwards) or a Magic Trackpad 2 or later, running macOS 12+ on Apple Silicon or macOS 13+ on Intel-based machines 1. Measurements indicate that clear and sufficiently loud audio can be produced across a frequency range of approximately 100 Hz to 4 kHz, with the cleanest notes occurring around 1 kHz 1. Although the vibration intensity does not exceed the motor’s normal maximum strength, the reliance on undocumented private APIs poses a risk that future macOS updates could render the functionality obsolete 1. Nospeaker is distributed under the MIT license and consists of a single Swift file (nospeaker.swift) with no external dependencies 1.
评论
还没有评论,欢迎留下第一条。