Files
datenbanken-llm/test_mp3parser.py
T
Ali f470aab9b8 push
push push
2024-12-10 22:37:46 +01:00

12 lines
298 B
Python

import whisper
import json
model = whisper.load_model('tiny')
result = model.transcribe(str("C:\\Users\\afist\\Downloads\\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)