How-toSelected

Gemini API CLI Workflow for Testing Multimodal Voice Features

Why we picked it

The trick turns microphone-dependent voice features into fully automated end-to-end tests, since the fake audio capture flag removes the need for a human to speak. Teams building voice agents or speech UIs can wire this into CI so coding agents verify transcripts and DOM state after each change. It pairs naturally with Playwright or browser-use agents already in many testing stacks.

Philipp Schmid shared a four-step workflow for testing voice and audio features in web apps using the Gemini API CLI with a coding agent. Step one generates speech via the Gemini API CLI, saving it as a WAV file. Chrome is then launched with the --use-file-for-fake-audio-capture=voice.wav%noloop flag to feed that WAV as fake microphone input. A coding agent clicks the mic button via Playwright or browser-use so getUserMedia streams the WAV from 0.0s, and the agent verifies the transcript and UI state in the DOM.

Image · Philipp Schmid
Original · Philipp Schmid

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 ⚡