Sitemap
Press enter or click to view image in full size

Mah GPT Now Speaks Your Language — Literally. Introducing Voice-to-Text

--

Send a voice message in Persian, English, Turkish, or Arabic. Get back a clean text file. No subscription gymnastics, no third-party tools, no copy-pasting between five apps.

We’ve been quietly building Mah GPT into one of the most capable multilingual AI assistants on Telegram. Image generation, video creation, image editing, music composition, video continuation up to 12 seconds, two-image blending — it’s been a busy few months.

This week we shipped something that might sound small but changes how a lot of people will use the bot: Voice-to-Text.

You tap a button. You send a voice message or audio file. You get back a clean .txt file with the transcript. That's the entire experience.

But the engineering choices behind that simplicity are what I want to talk about.

Why bother building this from scratch?

Speech-to-text isn’t new. OpenAI has Whisper. Google has Speech-to-Text. AssemblyAI, Deepgram, Rev — there’s no shortage of paid APIs.

We considered all of them. The math kept not working out.

Most cloud transcription APIs charge per-minute pricing that becomes painful at scale. Anyone running a free-tier-friendly product on Telegram knows that “$0.006 per minute” sounds cheap until your users discover the feature and start sending two-hour lectures.

There’s a second issue, more important than money: multilingual quality varies wildly across providers. Persian transcription in particular tends to be an afterthought in commercial APIs. Turkish is hit-or-miss. Arabic dialect handling is inconsistent.

So we went a different direction: host the model ourselves.

The setup, in one paragraph

We run faster-whisper — a C++ reimplementation of OpenAI’s Whisper model that’s roughly 4x faster than the original and uses less memory. We’re running the medium model on an RTX 4090, which gives excellent quality for all four of our target languages while using only about 5GB of VRAM. The whole thing sits behind a FastAPI server with one endpoint, accessible to our bot through a Cloudflare Tunnel.

That’s it. That’s the architecture.

Why medium and not large?

This was the most interesting tradeoff to make.

The large-v3 Whisper model gets you the absolute best transcription quality — but it needs ~10GB of VRAM and takes noticeably longer per request. The medium model lands in a sweet spot: it transcribes a 5-minute Persian voice note in roughly 15-20 seconds, with quality that's genuinely indistinguishable from large for conversational speech, which is what 95% of our users send.

We’re not transcribing legal depositions. We’re transcribing voice notes, lectures, podcasts, meeting recordings. medium is the right tool for that job.

Get Mah GPT’s stories in your inbox

Join Medium for free to get updates from this writer.

If we ever see consistent demand for the highest possible quality on long-form professional audio, swapping models is a single environment variable change. The architecture doesn’t care.

The boring problems are the hard ones

The model selection took about an hour to think through. The rest of the work was the kind of unglamorous engineering that nobody writes blog posts about, but is what actually determines whether a feature feels good to use.

Limits. Telegram caps file downloads at 20MB for bots. We set a 15-minute duration cap to prevent both abuse and absurd wait times. If you send a 16-minute file, the bot tells you the exact length of your file and the exact limit, in your language, before doing any processing.

Quota. Every voice-to-text job consumes two quota types: voice-seconds (proportional to audio length) and one text credit. The cost is only deducted after a successful transcription — if our server fails, the user isn’t charged.

Storage. This is where I’m most proud of the design. We don’t store the resulting text file on our server at all. After transcribing, the bot uploads the .txt as a Telegram document, captures the file_id Telegram assigns, and stores only that ID in the user's archive. When the user wants to retrieve an old transcript, we just call sendDocument(file_id) and Telegram serves it from their CDN. Our storage cost is essentially zero, files are always available, and we never have to think about cleanup, backups, or quotas. This is the same pattern we use for images, videos, and music — and it scales for free.

Failure modes. What happens when the upload fails? When the model crashes? When the network blips between our bot server and our GPU server? Each of these has a specific, tested path. Loading messages are deleted. Quotas are refunded (or never charged in the first place). The user gets a clear message in their language, never a stack trace.

Concurrency. We protect against a single user submitting multiple requests simultaneously by holding a per-user lock during processing. But we deliberately exempt navigation actions — back buttons, menu switches — from that lock, because no user should ever see “please wait” for pressing back. Small detail. Huge UX difference.

What this enables

A voice-to-text button doesn’t sound revolutionary. But think about who it’s for:

  • The student who recorded a 30-minute lecture in Persian and wants searchable notes.
  • The journalist transcribing interviews in Arabic.
  • The freelancer pulling quotes from a long client call.
  • The person who just thinks faster out loud than they type.

For Persian and Turkish speakers especially, getting high-quality transcription has historically meant either paying premium prices to a Western provider with inconsistent results, or accepting whatever lower-quality free tool was available that week. Now it’s a button.

What’s next

A few things we’re considering, in rough order of likelihood:

  • Vertical video output for Reels, TikTok, and YouTube Shorts. Our infrastructure already supports it; we just need to expose the option.
  • Music-over-video combining our existing music generation with our video output.
  • Style presets for image editing — one-tap conversion of any photo to anime, oil painting, 3D, or cartoon style, using the editing pipeline we already have.

But we’re being deliberate. Every new feature is another surface to maintain, another way the bot can break, another thing that has to work in four languages without confusing anyone. We’d rather ship five features that feel polished than fifteen that feel beta.

Voice-to-text is live now in Mah GPT. Find the bot on Telegram, open the AI Assistant menu, and the new button is there. Send a voice note. See what comes back.

If you build something interesting with it, I’d love to hear about it.

--

--

Mah GPT
Mah GPT

Written by Mah GPT

0 followers

MahGPT is a Telegram-based AI platform offering affordable chat, image, and video tools for students and young users.