<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jack</title>
    <description>The latest articles on DEV Community by Jack (@jack_44ab4ddb1fde126f936f).</description>
    <link>https://dev.to/jack_44ab4ddb1fde126f936f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4260185%2Fb27b8055-82c8-46b9-8679-47b0c7e7f6a6.webp</url>
      <title>DEV Community: Jack</title>
      <link>https://dev.to/jack_44ab4ddb1fde126f936f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jack_44ab4ddb1fde126f936f"/>
    <language>en</language>
    <item>
      <title>Title: Building a Simple Audio-to-Text Workflow with Python</title>
      <dc:creator>Jack</dc:creator>
      <pubDate>Mon, 23 Nov 2026 09:45:39 +0000</pubDate>
      <link>https://dev.to/jack_44ab4ddb1fde126f936f/title-building-a-simple-audio-to-text-workflow-with-python-3l85</link>
      <guid>https://dev.to/jack_44ab4ddb1fde126f936f/title-building-a-simple-audio-to-text-workflow-with-python-3l85</guid>
      <description>&lt;p&gt;Turning speech into text is only one part of a transcription tool. The harder question is what happens after the model returns its answer.&lt;/p&gt;

&lt;p&gt;While building TransToText, I wanted users to be able to listen back, correct mistakes, translate the transcript and download subtitles—all in one workflow.&lt;/p&gt;

&lt;p&gt;Here is the basic approach.&lt;br&gt;
Start with a consistent audio input&lt;br&gt;
Users upload different kinds of files: MP3 recordings, MP4 videos, voice memos and more.&lt;/p&gt;

&lt;p&gt;Instead of handling each format inside the speech model, I use FFmpeg to extract and decode the audio first. This gives the transcription step a consistent input.&lt;/p&gt;

&lt;p&gt;The workflow becomes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Audio or video
    → Decode audio
    → Transcribe
    → Review and edit
    → Export
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeping decoding separate also makes failures easier to understand. A file with an unreadable audio track is a different problem from a model that cannot finish inference.&lt;br&gt;
Keep timestamps with the text&lt;br&gt;
For transcription, the project uses faster-whisper on an NVIDIA GPU.&lt;/p&gt;

&lt;p&gt;The useful output is not just a block of text. Each segment needs an ID, a start time, an end time and its words:&lt;br&gt;
&lt;code&gt;{&lt;br&gt;
  "id": 1,&lt;br&gt;
  "start": 0.5,&lt;br&gt;
  "end": 3.2,&lt;br&gt;
  "text": "Let's review the next step."&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
This small structure supports several features: jumping to a passage, editing subtitle timing and exporting SRT or VTT files.&lt;/p&gt;

&lt;p&gt;One implementation detail is easy to miss: faster-whisper returns segments lazily. To measure transcription time correctly, the timer must include iterating through every segment.&lt;br&gt;
Translate the transcript separately&lt;br&gt;
Translation runs after transcription.&lt;/p&gt;

&lt;p&gt;Each translated segment keeps the original ID and timestamps. This lets the editor display the original and translated text together without creating a second timeline.&lt;/p&gt;

&lt;p&gt;It also means translation can run again without repeating speech recognition.&lt;/p&gt;

&lt;p&gt;There is a trade-off: correcting the original text does not automatically correct an existing translation. The interface needs to make that clear.&lt;br&gt;
Make correction part of the product&lt;br&gt;
Automatic transcription gets names, numbers and unfamiliar terms wrong. Speaker labels can also need correction.&lt;/p&gt;

&lt;p&gt;Rather than treating the first result as finished, I built the result page around reviewing it. Users can replay passages, edit text, adjust timing and save their changes before downloading.&lt;/p&gt;

&lt;p&gt;The export step reads the saved transcript, so the corrected text carries through to the output files.&lt;br&gt;
Separate the website from inference&lt;br&gt;
The website and task coordination run on Cloudflare Workers, while a separate GPU node handles model inference. R2 stores uploaded files and results.&lt;/p&gt;

&lt;p&gt;This keeps the web interface responsive while longer processing jobs run elsewhere. It also creates operational work: the system must track progress, handle failed jobs and clean up expired files.&lt;/p&gt;

&lt;p&gt;The main lesson from this project is straightforward: a useful transcription tool needs more than a speech model. A clear path from upload to correction to download matters just as much as the initial transcript.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
