用 Gemini API CLI 给编码智能体测试语音功能的工作流
写语音功能的开发者看这个:用 Gemini API CLI 生成音频,再借 Chrome 参数和 Playwright 自动测麦克风,全流程不用真人说话。
Phil Schmid 分享一套用 Gemini API CLI 测试多模态语音功能的流程。先用 Gemini API CLI 生成一段 voice.wav 语音文件。再启动 Chrome 时加上 --use-file-for-fake-audio-capture=voice.wav%noloop 参数,把 WAV 文件伪装成麦克风输入。最后用 Playwright 或 browser-use 点击麦克风按钮,让 getUserMedia 从 0 秒开始读取音频流,并在 DOM 中验证转写文本和界面状态。
Did you know you can use the Gemini API CLI together with your coding agent to test multimodal features like voice and audio? Here is how it works: 1. Use Gemini API CLI to generate speak 2. Use Chrome with --use-file-for-fake-audio-capture=voice.wav%noloop 3. Click the mic button via Playwright or browser-use so getUserMedia streams the WAV from 0.0s 4. Verify the transcript and UI state in the DOM Prompt below 👇 Your browser does not support the video tag. 🔗 View on Twitter 💬 7 🔄 3 ❤️ 17 👀 1250 📊 9 ⚡