Will's AI Lab
Blog
AI LearningAI PerspectivesCasesTimelineAbout
中文日本語EN
中文日本語EN

© 2026 Will AI Lab. All rights reserved.

Powered by Next.js & AI

Sites

Aboutfuluckai.comFuluck Cattery

Social Links

Instagram@fuluck_catteryGitHub@konayuki56XiaohongshuOsaka Cattery Diary
HomeBlogAI PerspectivesTimeline
Blog
Sent 10 Voice Messages in the Morning, AI Went Silent | A Real Apple Silicon Optimization Journey
🎙
播客导读

Listen to this article

AI LearningOriginal

Sent 10 Voice Messages in the Morning, AI Went Silent | A Real Apple Silicon Optimization Journey

WillMarch 26, 2026About 1 min read

故事背景

那是一个普通的早晨。早上7点,我一边喝咖啡一边对 AI 连续发出任务语音:

"今天上午先把 Instagram 内容发出去……对了还有那个预约单……顺便帮我查一下……"

然后:AI 沉默了 🤫

症状:AI 助手突然"失联"

  • Telegram 不回复消息
  • API 超时 10 分钟
  • 重启后恢复
  • 随机发生,难以复现

排查过程

检查进程:进程存活,排除崩溃可能。

检查日志:发现 embedded run timeout: timeoutMs=600000——Claude API 挂起了整整 10 分钟!

关键发现:每次卡死都在收到语音消息之后。

内存监控:原版 Whisper CLI 每次吃掉 6.4GB 内存。就像同时开了 20 个 Chrome,每个都在播放 4K 视频。

真相大白:ユキ (6.4GB) + ナツ (6.4GB) = 12.8GB 内存峰值。24GB 内存压力爆炸 → 连锁崩溃 💥

解决方案:mlx_whisper

MLX 是什么? Apple 专为 M 系列芯片打造的机器学习框架,充分利用 Neural Engine,让性能成倍增长。

bash
# 安装
pip install mlx-whisper

# 使用
mlx_whisper --model mlx-community/whisper-large-v3-turbo audio.mp3

性能对比

指标 原版 Whisper mlx_whisper
内存占用 6.4 GB 1.8 GB
转录速度 14 秒 5.3 秒
双实例内存 12.8 GB ❌ 3.6 GB ✅

内存降低 72%,速度提升 2.6 倍。

8 轮实测全通过

日语:117秒音频 → 8.9秒转录 (13.2× 实时) · 内存 1.8GB ✅

中文:89秒音频 → 8.0秒转录 (11.1× 实时) · 内存 1.8GB ✅

英文:109秒音频 → 7.9秒转录 (13.8× 实时) · 内存 1.8GB ✅

并发双路:ユキ + ナツ 同时转录 · 总内存 3.6GB · 无崩溃 ✅

核心结论

Apple Silicon 不是不能用本地模型,而是要用 MLX 优化版本。

原版 PyTorch 通过 Rosetta 转译,内存爆炸;MLX 原生调用 Neural Engine,性能成倍增长。

下次早上发语音,AI 会很快回复你 ⚡️


PreviousDeerFlow Complete Guide: What Can ByteDance's Open-Source Super Agent Actually Do?NextFixing AI Long-Term Memory Is More Than Fixing an Error — A Deep Dive into memory-lancedb-pro
Blog

评论

加载中...

发表评论

0/1000

Table of Contents

  • 故事背景
  • 症状:AI 助手突然"失联"
  • 排查过程
  • 解决方案:mlx_whisper
  • 性能对比
  • 8 轮实测全通过
  • 核心结论