From 60e78e2057e2197bb2b13d162c7cab26b0374dcb Mon Sep 17 00:00:00 2001 From: Gus Power Date: Sun, 25 May 2025 09:15:54 +0100 Subject: a few snippets --- 0001_whisper_transcribe.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 0001_whisper_transcribe.py (limited to '0001_whisper_transcribe.py') diff --git a/0001_whisper_transcribe.py b/0001_whisper_transcribe.py new file mode 100644 index 0000000..44e8b3f --- /dev/null +++ b/0001_whisper_transcribe.py @@ -0,0 +1,9 @@ +import whisper +import sys + +input_file = sys.argv[1] +model = whisper.load_model("small") # You can also try "base", "small", "medium" +result = model.transcribe(input_file, verbose=True) +print(input_file) +print(result["text"]) + -- cgit v1.2.3