Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

Thank you so much for the assistance, I appreciate the thoughtful reply put into your response as both a developer and fellow coder.
I've had no issues running software before on Windows 10 so I'm thinking it could be a Python issue - My Python install is Python version 3.12 so I don't know if I need to update to the latest Python or not for this code to work as it was never specified

 I run a lot of legacy software that still uses older versions of Python, so I'd need to run them in venvs with older versions of Python. Doable? Yes. PITA? Yes.

Thank you for the alternatives, I'll look into those. I have a 40 minute Twitch video I need to transcribe the audio from and turn into .SRT subtitles with timestamps, and my time crunch is short, so trying this and seeing it failing was driving me crazy. I'll give these a try. Cheers.

(+1)

Ah, that must have been it, I didn't anticipate this at all. Since this Whisper Batch Transcriber was built while on Win7, I used Python 3.8, the last version that still worked on that OS, so its much older than even your python install - and now in hindsight of course most people aren't going to have that python version installed commonly, hence this conflict. Gah. I thought the program would work universally on all python versions 3.8 and above.

Well that sucks.

I asked Claude Code what the issue could be and it gave me this answer:

===

(I gave it the 'whisper_transcriber.py' file to analyze.)

Looking at your code, I can see a few potential issues on Python 3.12, though honestly it's pretty clean overall. Here's what to watch out for:

Actual Problems

1. AudioSegment.from_file() with certain formats (indirect issue) Not Python 3.12 specific, but pydub depends on ffmpeg being installed externally. This hasn't changed, but newer pydub versions have stricter error messages — worth noting in your docs if you haven't.

2. subprocess.check_output() in check_vram() — minor but real

result = subprocess.check_output(['nvidia-smi', ...]) result.decode('utf-8').strip() 

On Python 3.12, this still works, but the bare except: swallows everything including KeyboardInterrupt. Not a crash risk, but bad practice that bites harder in 3.12 since it's stricter about interrupt propagation in some contexts. Should be except Exception:.

The Real Culprit for User Issues

whisper itself and its dependencies are the likely problem, not your code. Specifically:

  • OpenAI's whisper package depends on torch, and PyTorch wheels for Python 3.8 vs 3.12 are completely different installs
  • Users on 3.12 running pip install openai-whisper will get a different (newer) torch version, which can behave differently
  • numba (a whisper dependency) had broken 3.12 support for a while and required >=0.59.0

What's Actually Fine

  • All f-strings, os.path, shutil, sys.frozen patterns — all fine in 3.12
  • time, file I/O, encoding='utf-8' — no issues
  • The getattr(sys, 'frozen', False) PyInstaller pattern — still works

Recommendation

Add a version check at the top and pin your dependencies in a requirements.txt:

import sys if sys.version_info < (3, 8) or sys.version_info >= (3, 13):     print("Warning: This script is tested on Python 3.8–3.12 only.") 
# requirements.txt openai-whisper>=20231117 pydub>=0.25.1 torch>=2.0.0 numba>=0.59.0 

The bare except: in check_vram() is the only real code-level fix needed. Everything else is dependency/environment friction, not your Python syntax.

===

I dunno if that's useful tbh.

I think you're ultimately right, I need to take down this project since its only going to work on a niche installation setup - because I didn't understand python properly at the time.

I'll make the much better Parakeet based version in the future to replace it, Whisper is already very dated anyways.

Huh, what a funk. I could have sworn this even worked a while back when I downloaded it ages ago.
Thanks for the investigation into this, I appreciate the fact you're looking into this! :)
Cheers