I Built a One-Curl Audio Translator with Telnyx AI Inference Telnyx released a one-curl audio translator built with its AI Inference API, combining speech-to-text, chat completions, and text-to-speech into a single Flask app. The tool translates audio files by transcribing, translating, and re-synthesizing speech, with error handling that preserves partial results. The open-source code example is available on GitHub. Localizing a podcast, translating a recorded meeting, or dubbing a lecture used to require three different services stitched together. The Telnyx AI Inference API exposes STT, chat completions, and TTS on the same private backbone, which means a single Flask app can run the whole pipeline. The Telnyx code example is: https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-content-translator-python https://github.com/team-telnyx/telnyx-code-examples/tree/main/ai-content-translator-python It is a Python Flask app you can clone and run in a few minutes. No phone number, no webhook tunnel, no background job runner. You POST an audio file plus a target language. The app calls Telnyx STT to transcribe the audio in the source language, calls AI Inference to translate the transcript with a TTS-friendly system prompt, and calls Telnyx TTS to render the translated text into audio. Long transcripts are chunked at sentence boundaries so the TTS model never gets an input larger than it supports, and the chunks are concatenated into one mp3. The response includes the job id, both transcripts, and a URL you can curl to download the dubbed audio. It is small enough to demo live, but it covers the parts that often get cut from an audio translation demo: The design choice I care most about is per-stage error handling. If the TTS call fails on chunk 3 of 8, the app returns 200 partial with the transcripts still intact, rather than throwing away the STT and translation work. git clone https://github.com/team-telnyx/telnyx-code-examples.git cd telnyx-code-examples/ai-content-translator-python cp .env.example .env pip install -r requirements.txt python app.py Translate a Spanish clip into English: curl -X POST http://localhost:5000/translate \ -F audio=@spanish-sample.mp3 \ -F source=es \ -F target=en Download the dubbed audio: curl -OJ http://localhost:5000/translate/