Home » Anticodeguy’s Articles » ANTIghostwriter #12: Set Up Free Local Transcription with OpenAI Whisper

ANTIghostwriter #12: Set Up Free Local Transcription with OpenAI Whisper

Free, offline, multi-language transcription with near-perfect accuracy.


This is Lesson #12 of the ANTIghostwriter course — a free, complete system for creating authentic content with AI assistance.

New here? Start from the full course overview.

Previous lesson: #11: My Morning Walk Method for Creating Raw Content


What You’ll Learn

Set up free, offline voice transcription using OpenAI’s Whisper model. This bonus lesson includes step-by-step installation instructions and a Python script that batch-processes your audio notes into text files automatically. Whisper works in 20+ languages with near-perfect accuracy — and it runs entirely on your computer, no internet required.

Time to complete: ~45 minutes for initial setup (technical)


As a bonus feature, I recommend using note transcription. Since I mentioned that I record text in audio format and then transcribe it, I suggest using the same system that I use.

For note transcription, you need AI and the Whisper model from OpenAI, which you can download locally for free and use on your own computer. It works offline, meaning it doesn’t require an internet connection, and it recognizes multiple languages and even accents.

Below I provide you with two resources:

  1. A prompt that helped me set up an AI model on my computer. It will guide you step by step, and you’ll end up with a model that transcribes audio files into text.
  2. A file containing a Python program that performs note transcription using the model installed with the help of the previous prompt.

For this system to work, you need to export your audio notes to a specific folder specified in the script and then run the script. I do this every morning: I record audio notes on my computer, export them to a folder, run the script, and it transcribes the audio and places text files in txt format next to the original audio files.

Prompt for Installing the Whisper Recognition Model from OpenAI

Help me install the OpenAI Whisper model on my computer. First,
guide me through gathering all the information we need to know as
a prerequisite to installation, then do the installation itself.

Do it step by step, one step at a time, so I can send you the
result after each step.

Transcription Script

This is a small program that performs transcription of notes located in a specific folder.

Important! This script is designed to work on the Windows operating system. If you have macOS, ask the AI to adapt the program to your operating system within the same chat.

import os

# Set personal cache directory (inside the user's home folder)
os.environ['XDG_CACHE_HOME'] = os.path.expanduser(r"~\.whisper_cache")

import whisper
from pathlib import Path

# Path to the folder containing your audio files
# Replace this with the actual path to your own audio files directory.
# This can be a local path (e.g., "C:/Users/yourname/audio") or a
# network share like the example below.
ROOT_DIR = Path(r"\\192.168.1.115\media\audio\notes")

# Supported audio file extensions
AUDIO_EXTENSIONS = {'.mp3', '.wav', '.m4a', '.ogg', '.webm', '.flac'}

# Load the Whisper "medium" model on GPU (if available)
# You can change "medium" to another model name like "tiny",
# "base", "small", or "large"
# depending on your desired balance between speed and accuracy.
model = whisper.load_model("medium", device="cuda")

# Recursively scan the folder for audio files that do not yet
# have transcripts
for audio_path in ROOT_DIR.rglob("*"):
    if audio_path.suffix.lower() not in AUDIO_EXTENSIONS:
        continue

    txt_path = audio_path.with_suffix(".txt")

    if txt_path.exists():
        print(f"✓ Already exists: {txt_path.name} – skipping")
        continue

    print(f"⏳ Transcribing: {audio_path.name}")

    try:
        # ✓ Automatically detects the language of the audio
        # ✓ If you know all files are in a specific language, you
        # can uncomment the next line and set the language manually
        # result = model.transcribe(str(audio_path), language="ru")
        result = model.transcribe(str(audio_path))  # automatic language detection

        text = result["text"]

        with open(txt_path, "w", encoding="utf-8") as f:
            f.write(text)

        print(f"✓ Saved: {txt_path.name}")

    except Exception as e:
        print(f"✗ Error with {audio_path.name}: {e}")

input("Press Enter to exit…")

I welcome you as a like-minded person with high values and ambitious goals, let’s get after it — together