Files
datenbanken-llm/test_mp3parser.py
T

12 lines
269 B
Python

import whisper
import json
model = whisper.load_model('tiny')
result = model.transcribe(str("Aufzeichnung.mp3"), language='de', verbose=True)
# Dump the results to a JSON file
with open('transcript.json', "w") as file:
json.dump(result['text'], file, indent=4)