by mguhlin

Adding Audio/Video Transcription to #ZorinOS

EdTech

Since I’m spending a LOT more time on Zorin Core Linux OS these days, I’ve taken some time to install all my favorite apps on it.

Here’s the rundown of my apps:

  • Opera browser (it came with Brave, which I also use)
  • Zoom
  • MuCommander
  • Mullvad VPN and browser
  • Flameshot for screencaptures
  • Signal for texting family and friends securely
  • XnView MP
  • Draw.io (the desktop version of Diagrams.net, which is free)
  • Peek for creating animated GIFs
  • OBS Studio
  • FreeFileSync

Overall, I’ve been happier with Zorin than Manjaro Linux or Linux Mint. I’m considering buying their Pro version simply to contribute. I just don’t want to have to reinstall (sigh). This would be a better donation.

Ah, it appears I’m wrong. You CAN u**pgrade Zorin Core to Pro** without losing your settings:

Can I upgrade directly from Zorin OS Core to Pro without re-installing the operating system?
Yes, you can upgrade your existing installation of Zorin OS Core to Pro in-place while keeping your files, apps, and settings. You can learn how to use the built-in “Upgrade Zorin OS” app to do this in our upgrade guide.

Wait, You Forgot Something

But one thing I hadn’t yet added was audio/video file transcription. On the Windows side, I rely on Whisper Desktop, but I didn’t want to flip back and forth for one thing. So, unsure of how to install Whisper on Zorin, I asked ChatGPT.

Here’s what ChatGPT came up with and it worked (i actually tried two of the three suggested solutions it offered but I’m only sharing the approach that worked below). Come up with this working solution involved giving ChatGPT the errors I encountered when running commands.

Whisper file transcription on Zorin (working setup)

Install Whisper (pipx)

sudo apt update sudo apt install -y ffmpeg pipx pipx ensurepath export PATH=“$HOME/.local/bin:$PATH” pipx install openai-whisper

Create the right-click script

mkdir -p ~/.local/share/nautilus/scripts nano ~/.local/share/nautilus/scripts/Transcribe\ with\ Whisper

Paste the script below, save, then:

chmod +x ~/.local/share/nautilus/scripts/Transcribe\ with\ Whisper nautilus -q

Use it

Right-click one or more audio/video files → ScriptsTranscribe with Whisper.
A .txt appears next to each original.


Script: “Transcribe with Whisper”

#!/usr/bin/env bash set -euo pipefail

Ensure Nautilus sees user-local bins

export PATH=“$HOME/.local/bin:$HOME/.local/pipx/venvs/openai-whisper/bin:$PATH”

Resolve whisper location (PATH, pipx venv, custom venvs, hard path)

if command -v whisper >/dev/null 2>&1; then WHISPER_BIN=”$(command -v whisper)” elif [ -x “$HOME/.local/bin/whisper” ]; then WHISPER_BIN=“$HOME/.local/bin/whisper” elif [ -x “$HOME/.local/pipx/venvs/openai-whisper/bin/whisper” ]; then WHISPER_BIN=“$HOME/.local/pipx/venvs/openai-whisper/bin/whisper” elif [ -x “$HOME/venvs/whisper/bin/whisper” ]; then WHISPER_BIN=“$HOME/venvs/whisper/bin/whisper” else zenity —error —text=“Couldn’t find ‘whisper’.\nInstall with: pipx install openai-whisper” exit 1 fi

Collect selected files

files=() if [ -n ”${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS-}” ]; then while IFS= read -r line; do [ -f “$line” ] && files+=(“$line”); done <<<“$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS” fi for arg in ”$@”; do [ -f “$arg” ] && files+=(“$arg”); done

if [ ”${#files[@]}” -eq 0 ]; then zenity —error —text=“No files selected.” exit 1 fi

Transcribe each to .txt only (CPU-safe); change model for accuracy/speed tradeoff

for f in ”${files[@]}”; do “$WHISPER_BIN” “$f” —output_format txt —model base —fp16 False done

zenity —info —text=“Done.\nSaved .txt next to each original.\nUsing: $WHISPER_BIN”