DEV Community

Cover image for Real-time call translation in a softphone: the interesting part is where the AI runs
john william
john william

Posted on

Real-time call translation in a softphone: the interesting part is where the AI runs

I went down a rabbit hole on real-time voice translation in softphones recently. The demo version is the flashy thing everyone shows off: two people, two languages, one call, each hearing the other in their own tongue, live. Looks like magic. But the more I poked at how it has to actually work, the more the interesting stuff turned out to be underneath, in the boring-sounding engineering nobody puts in the demo video.

So, some notes. Partly to get my own head straight, partly because I suspect a few people here have wrestled with the same problems.

It's not the translation, It's the latency.

Here's the thing that surprised me. The translation itself isn't really the hard part anymore. Machine translation is good. Speech-to-text is good. Both have been good for a while.

The hard part is doing the whole chain fast. Because the chain is long: grab the audio, turn speech into text, translate the text, turn that back into speech in the other language, play it to the other person. Now do that live, while both people are talking, in both directions at once.

Every one of those steps costs you time. And conversation is unforgiving about time in a way that, say, subtitling a video just isn't. A video doesn't care if the subtitle lands a second late. A conversation absolutely does. Get past a second or so of lag and people start stepping on each other, pausing, going "sorry, go ahead" over and over. Push it to two or three seconds and you don't have a conversation anymore, you've got two people leaving each other voicemails in real time.

So the whole game is squeezing that pipeline down until the delay stops being something you notice. On a good connection you can basically get there. On a weak or mobile one, the same pipeline blows out to a few seconds, which is why network quality matters way more here than it does for a plain call. Same feature, totally different experience depending on the pipe.

Where you run it changes everything

This is the part I actually found interesting, and it's a decision that sounds mundane until you sit with it. Where does the pipeline run?

If the setup somehow leans on both ends of the call, you're in trouble, because now your experience is only as good as whatever the other person happens to be calling from. You could have everything dialed in perfectly and still get a mess because they're on a five-year-old phone with two bars.

The saner move is to anchor the whole thing on one side. The side that starts the call. Keep it independent of the far end entirely. Then translation quality comes down to one environment you control instead of two you don't. And the person on the other end? They can be on a mobile app, a laptop, a plain old phone line, doesn't matter, because their device was never in the processing path to begin with.

There's a consequence that falls out of this, and it's worth being upfront about. To anchor the pipeline properly you need real compute and a stable environment on the originating side, which realistically means the person kicking off the call is on a desktop app, not a phone hopping between towers on the train. The person receiving it, though, can be on anything. That lopsidedness (caller on desktop, receiver on whatever) isn't really a limitation someone imposed. It just falls straight out of the decision to put the heavy lifting somewhere stable.

The transcript side is sneakier than it looks

Everybody fixates on the spoken translation. But honestly the transcript is the part I'd underestimated, and it's arguably the trickier build.

Plain live transcription, speech showing up as text on screen, that's everywhere now. Fine, The harder version is live translated transcription, where the text shows up in the reader's language, not the one being spoken. Which means you're now running the translation pipeline on the text channel too, keeping it roughly in step with the audio, and dealing with the annoying reality that translation reorders words and changes how long a sentence is. You can't just line up source word to translated word on a timeline and call it done. They don't map like that.

Getting a translated transcript to feel live and still read cleanly, while the audio translation is happening alongside it, is one of those synchronization problems that looks like nothing on a whiteboard and then eats a week once you're actually in it.

A few other things that come up

Once the core loop works, the edge cases show up fast.

Language detection and figuring out who said what gets genuinely messy when people code-switch mid-sentence. Someone speaking Hindi and just dropping English words in, which people do constantly. Or two people talking over each other. The model has to sort out what was said, who said it, and what language it was in, all at once, on the fly.

Also: if you can pre-set the language pair, do it. Auto-detect works, but it's spending effort just deciding what it's listening to before it can even start, and you feel that. Convenience versus accuracy, pick your poison.

And stitching everything to the call record afterward, the recording plus the transcript plus the translated transcript plus a summary, all hanging off one call, is less an AI problem and more a plain data-modeling one. But it's what makes the whole thing useful after the call's over instead of just during it. Easy to forget that part until someone asks "so where did that conversation go?"

Why I think it's a bigger deal than it looks

Softphones have competed on call quality for years, which is a rough place to stand out since everyone's more or less fine at it now. This AI layer is the first thing in a while that changes what the product can actually do, not just do the same job a hair better.

It doesn't replace the fundamentals, though. Reliable calling is still the floor. A softphone that translates gorgeously but drops calls is still broken. I ran into Tragofone while looking into this, which is one of the white label softphones shipping real-time translation now, and it's a decent example of the AI sitting on top of solid calling rather than replacing it.

Anyone here actually built real-time media pipelines like this? Most curious how people handled the latency budget, since that seems to be what decides whether the whole thing lives or dies.

Top comments (0)