Real-time Spanish to English speech translation with an API (Python)
Blog post from AssemblyAI
An API-based Spanish-to-English speech translation system can bring live translation into products such as call-routing tools, radio monitors, help desks, and events, while consumer apps are better suited to one-off translations. The described real-time approach streams Spanish audio to AssemblyAI’s streaming speech model and uses an LLM Gateway prompt to return an English translation for each completed turn over the same WebSocket; translations are paired with Spanish transcripts by turn order, with a fallback for missing responses. Developers can specify Spanish or Spanish-and-English language codes, tailor prompts for regional vocabulary, number and date formats, and conversation context, and optionally send translated lines to a long-lived text-to-speech session. For recorded audio, a separate transcription request can return both the Spanish transcript and English translation, with optional speaker labels. The guide also recommends testing across dialects, code-switching, names, and numerical details, and notes that real-time transcription costs $0.30 per session hour plus translation-model tokens, while recorded translation adds $0.06 per audio hour and text-to-speech is billed by input characters.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Real-time | 35 | 2,990 | 636 | 190 | -28% |
| LLM | 4 | 3,355 | 742 | 191 | -49% |
| Voice AI | 2 | 1,587 | 186 | 43 | -43% |
| Serverless | 1 | 691 | 209 | 83 | -50% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.