<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Bash on James Greenhalgh on digital strategy, marine conservation, and adventures.</title>
    <link>https://jamesgreenblue.com/tags/bash/</link>
    <description>Recent content in Bash on James Greenhalgh on digital strategy, marine conservation, and adventures.</description>
    <image>
      <title>James Greenhalgh on digital strategy, marine conservation, and adventures.</title>
      <url>https://jamesgreenblue.com/img/jgb-banner.png</url>
      <link>https://jamesgreenblue.com/img/jgb-banner.png</link>
    </image>
    <generator>Hugo -- 0.148.2</generator>
    <language>en-gb</language>
    <copyright>This work is licensed under a Creative Commons Attribution 4.0 International License.</copyright>
    <lastBuildDate>Sat, 10 Oct 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://jamesgreenblue.com/tags/bash/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Building a private, zero-cost AI audio transcriber with Whisper and Docker</title>
      <link>https://jamesgreenblue.com/blog/2026/local-audio-transcription/</link>
      <pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://jamesgreenblue.com/blog/2026/local-audio-transcription/</guid>
      <description>&lt;p&gt;I had ~60 hours of &lt;code&gt;.ogg&lt;/code&gt; and &lt;code&gt;.m4a&lt;/code&gt; audio recordings and was keen to see if AI could transcribe them without sending the files to a cloud-based service. I see huge potential in local AI models, both from an environmental and privacy perspective, but this was my first real-world test.&lt;/p&gt;
&lt;p&gt;My hardware was a modest ThinkPad T14 Gen 1 AMD (equipped with a Ryzen 5 PRO, 16GB RAM, and no dedicated GPU). Running local AI models without a discrete graphics card can be slow and painful, so the setup needed to be optimised to run entirely on CPU without bringing the machine to its knees.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I had ~60 hours of <code>.ogg</code> and <code>.m4a</code> audio recordings and was keen to see if AI could transcribe them without sending the files to a cloud-based service. I see huge potential in local AI models, both from an environmental and privacy perspective, but this was my first real-world test.</p>
<p>My hardware was a modest ThinkPad T14 Gen 1 AMD (equipped with a Ryzen 5 PRO, 16GB RAM, and no dedicated GPU). Running local AI models without a discrete graphics card can be slow and painful, so the setup needed to be optimised to run entirely on CPU without bringing the machine to its knees.</p>
<p>The underlying pipeline relies on <code>faster-whisper</code>, a re-implementation of OpenAI&rsquo;s Whisper model that uses CTranslate2 to perform fast inference on CPU using 8-bit quantisation. Wrapped safely inside a lightweight Docker container, the script mounts local directories, handles format conversions via <code>ffmpeg</code>, and outputs clean text files with timestamps.</p>
<p>To keep the pipeline efficient and dependable over time, a few key choices were made:</p>
<ul>
<li>Model selection: <code>large-v3-turbo</code> is the default as the optimal balance between high transcription accuracy and light memory usage on CPU. The model can be easily changed using environment variables.</li>
<li>Real-time logging: Python&rsquo;s console output was set to unbuffered mode (<code>-u</code>) to stream transcribed segments directly to the terminal as they are generated.</li>
<li>Silence handling: Voice Activity Detection (<code>vad_filter=True</code>) was enabled to strip dead air before processing, cutting down runtime significantly and preventing hallucinations.</li>
</ul>
<p>Building the script was a genuine collaborative effort between two AI assistants. Claude 4.6 Sonnet drafted the initial shell wrapper and structured the overall Docker orchestration; Gemini 3.6 Flash then reviewed the execution pipeline, unbuffered stdout flags, <code>.env</code> schema, and VAD filter settings to ensure output streamed properly without file buffer delays.</p>
<p>The project is ready to run. You can find the repository on GitHub at <a href=https://github.com/jamesgreenblue/local-audio-transcriber
    
    target=_blank rel="noopener"
>jamesgreenblue/local-audio-transcriber</a>. Changes are welcome so please don’t hesitate to <a href=https://github.com/jamesgreenblue/local-audio-transcriber/issues/new
    
    target=_blank rel="noopener"
>open an issue</a> if you spot a problem, or open a pull request for enhancements.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
