Whisper Voice to Code

March 8, 2025 — Sergiu Nagailic (Nikro)
Whisper Voice to Code
Tags:#AI
Categories:#AI
ABOUT THE AUTHOR
Sergiu Nagailic (Nikro) — CTO & Co-founder at HumanFace Tech
Hands-on technical leader with 16+ years across CTO, tech-lead, and product architecture roles. Specializes in AI product delivery, RAG and agentic systems, and technical leadership.
Connect: Twitter | GitHub | LinkedIn | HumanFace Tech

Let’s talk about productivity šŸ“ˆ - I use AI pretty frequently (duh, shocker! 😊). In VSCode, Github Copilot works pretty well, but still from a case to case, after it does a bunch of suggestions and alterations - some things still aren’t as perfect as I’d expect. I find myself constantly explaining to AI simple things:

  • ā€œdon’t forget to use Drupal 10’s best practicesā€¦ā€
  • ā€œwhere are the dependencies? Hello! Dependency injections!ā€
  • ā€œIt seems you forgot to add that interface to the newly created serviceā€¦ā€

Or,Ā outsideĀ of the VSCode, when I’m just brainstorming some ideas with ChatGPT or Claude, I find myself typing and typing and typing, essays of pages, running prompts, back and forward.

Typing takes too much time - I tend to gravitate to AI Mic-input built-in the OpenAI Mobile App (because they use Whisper). So, I found myself starting a conversation on the šŸ“±phone app, and then continuing it via the šŸ–„ļøĀ webĀ (desktop) - and I really liked it. When it was about more nuanced things - I’d use typing, but when I want to dive into deep explanations and I want to output pages of content to AI, voice would be my go-to tool.

What’s the alternative?

  • UsingĀ Chrome’s Speech-to-textĀ - results areĀ very inaccurateĀ - especially when we’re talking about abbreviations, geeky terms, programming.
  • Using ChatGPT’s ā€œVoice Modeā€ on the web - I don’t want toĀ ā€œtalkā€ to the AI, I want someone just to transcribe my ideas, maybe afterwards edit them, polish a bit - and then send them out to AI.
  • Using ChatGPT’sĀ android’s App šŸ“±- sure, but then I can’t paste it in VSCode, Slack, Jira, Emails or other tools - also for some reason they only allow lengths of ~2-3 minutes to be transcribed (it used to be >5 minutes).Ā I want to have no limits.

Huh, this brings me here šŸ‘‡

The general idea

Idea was - take an existing self-hosted web-service, built aroundĀ Whisper, and extend it with a small UI / Interface that would do exactly what I needed.

My target was:Ā https://github.com/ahmetoner/whisper-asr-webservice
My fork šŸ”€ became:Ā https://github.com/HumanFace-Tech/whisper-asr-with-ui

Here’s the result, with an example:

Image

The goal? šŸŽÆ Say it once, paste it anywhere - VSCode, Slack, Jira, emails - without having to fiddle around.

Below I’ll get into details of how it works, and how you can install and customize it for your own needs.

How it works & what it is?

Let’s first analyze where we want to get:

Image
Whisper Recorder / UI Flow

So, our steps are:

  1. ClickĀ Record šŸ”“
  2. Speak stuffĀ into the MIC šŸŽ™ļø
  3. ClickĀ Stop āœ‹
  4. WaitĀ 2-3 seconds ā³
  5. Paste anywhereĀ pre-formatted and polished text. šŸŽÆ

I usedĀ https://github.com/ahmetoner/whisper-asr-webserviceĀ - this is a neat little web-service wrapper around whisper. It has various engines and models to choose from. I did use it ~1 year ago in theĀ OrangePi AI Assistant project.

So, I forked it, and adjusted a few bits here and there. Final project is -Ā https://github.com/HumanFace-Tech/whisper-asr-with-ui
Most of my adjustments are explained in theĀ READMEĀ file of the project - and also steps on how to run it, but here’sĀ TLDR: I createdĀ index.htmlĀ and modifiedĀ docker-compose.ymlĀ - in the end I use a smallĀ nginxĀ (I know, overkill! but hey, it’s fast to configure, saves time and works well šŸ˜‰) to feed my index.html on a specific port.

–

For the setup to work, I’m also usingĀ Ollama, but you can use anything you’re comfortable with. Ollama turns raw transcriptions into polished prose with one smart prompt - transforming your messy thoughts into professional-looking text in seconds (like in the demo above). It even auto-corrects stuff. If you don’t have a local GPU - I highly recommend usingĀ https://groq.com/Ā - as it’s blazing fast and powerful enough for the task.

Image
Whisper UI - on the inside.

If you want to alter the endpoint or pick a different model, just alter the HTML here:
https://github.com/HumanFace-Tech/whisper-asr-with-ui/blob/315ee7b325970f3240c49f3464aaa7f52b8f26f4/index.html#L332

Picking the right model for the job can be tricky - every time you’ll change the model (env. variable in the docker-compose) - you’ll need to down/up everything.

I know, it’s pretty simple, not sexy - but I’m just sharing a tool I’m personally using daily šŸ˜€ but check-out next steps šŸ‘‡

Next steps…

~1 year ago I started working on a project calledĀ Whisper-AllĀ - it’s a simple tray-based omni-present app, running on Windows / Linux / MacOS (because it’s an Electron App) - that is the same concept as this thing, but it’s configurable, will use keyboard shortcut combinations to capture audio anywhere and copy to clipboard.

It’s also open-source - I just need to find time to finish it. With that App - you can just paste your API keys fromĀ Groq, or run things locally (for privacy reasons) and increase your productivity.

Assuming agents will come along soon, would be a neat thing to have.

Let’s keep in touch šŸ˜‰

Related Articles:

  • Crafting Our AI Assistant — Unleashing the Magic of AI: Crafting a Custom, ChatGPT-powered Voice Assistant with MagicMirror², PicoVoice (Porcupine), Whisper, and Mimic3. This is a DIY experiment we did in ~1 week; we explain how it works and how you can make your own.