Skip to content

Instantly share code, notes, and snippets.

View christianbaumann's full-sized avatar

christianbaumann

View GitHub Profile
@christianbaumann
christianbaumann / transcribe.py
Created December 19, 2024 11:14
A Python script that transcribes audio from a video file using OpenAI's Whisper model and saves the transcription as a text file.
import whisper
import ffmpeg
import os
def main(video_file, language="en"):
# Load the Whisper model
print("Loading Whisper model...")
model = whisper.load_model("base")
# Paths for the audio and output text filese
@christianbaumann
christianbaumann / postman_executed_3rd_test_if_two_previous_tests_passed.js
Created September 30, 2020 08:08
Execute a 3rd postman test only if two previous tests have passed
let test1Passed, test2Passed;
pm.test("Test 1", function() {
try {
pm.expect(true).to.equal(true)
test1Passed = true;
} catch (err) {
test1Passed = false;
}
});