whisper-kz-stt / app.py
evilid's picture
Update app.py
622408f verified
Raw
History Blame Contribute Delete
683 Bytes
import gradio as gr
from transformers import pipeline
pipe = pipeline(
"automatic-speech-recognition",
model="Drahokma/whisper-large-v3-kz",
device="cpu"
)
def transcribe(audio_path):
if audio_path is None:
return "Загрузите аудио"
try:
result = pipe(audio_path, return_timestamps=True)
return result["text"]
except Exception as e:
return f"Ошибка: {str(e)}"
demo = gr.Interface(
fn=transcribe,
inputs=gr.Audio(type="filepath"),
outputs="text",
title="Whisper Large V3 - Kazakh STT",
description="Транскрибация казахской речи"
)
demo.launch(show_error=True)