add playgrounds
This commit is contained in:
12
testing.py
Normal file
12
testing.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import whisper
|
||||
import os
|
||||
from pydub import AudioSegment
|
||||
|
||||
model = whisper.load_model("base")
|
||||
file_path = "audio-samples/mynameisjeff.wav"
|
||||
audio_file = AudioSegment.from_file(file_path)
|
||||
if os.path.exists(file_path):
|
||||
result = model.transcribe(file_path, fp16=False, language='English', verbose=True)
|
||||
print(result["text"])
|
||||
else:
|
||||
print("File not found:", file_path)
|
||||
Reference in New Issue
Block a user