Menu

Flask Speech to Text With faster-whisper (Hold to Talk)
📰

Flask Speech to Text With faster-whisper (Hold to Talk)

DEV Community: flask·Yunus Emre Güzel·1 day ago
#MDKrrf6m
#devtoflask#devto#dev#browser#clip
Long article (2610 words) — no AI summary yet.
Reading 0:00
15s threshold

You hold a button, you talk, and your words show up on the page. That's the whole project. The browser records the microphone. A Flask server transcribes the clip with faster-whisper on the CPU. There's no browser speech API and no outside speech service anywhere. I wrote and ran every part on Python 3.12, with Flask 3.1.3 and faster-whisper 1.2.1.

Why Not Use the Browser’s Speech Recognition?

The easy route is the browser's built-in speech recognition, the Web Speech API. It's a few lines of JavaScript. In my voice chat app IboChat, it kept failing. The comments in the IboChat code say why: the free Google service behind the browser feature was throttled or unavailable again and again. The failures stayed the same on a different network and in a different browser, and with the antivirus out of the picture. The comments say each of those was ruled out one at a time. So the voice call feature needed a path that didn't touch that service at all.

The replacement works like a walkie-talkie.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.