OneCompiler

whisper

526

import whisper

Load the Whisper model

model = whisper.load_model("base")

Path to your audio file

audio_file = "harvard.wav" # Replace with your file

Transcribe the audio file

result = model.transcribe(audio_file)

Print the transcription

print("Transcription:")
print(result["text"])