Spaces:
Runtime error
Runtime error
File size: 720 Bytes
c325342 0109e76 c325342 0109e76 c325342 0109e76 c325342 0109e76 c325342 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import gradio as gr
from transformers import pipeline
asr = pipeline("automatic-speech-recognition", model="your-hf-username/asr-minds14-model")
def transcribe(audio):
result = asr(audio)["text"]
return result
iface = gr.Interface(
fn=transcribe,
inputs=gr.Audio(source="microphone", type="filepath", label="🎙️ พูดหรืออัปโหลดเสียง"),
outputs="text",
title="🗣️ ASR: Speech to Text",
description="พูดใส่ไมโครโฟนหรืออัปโหลดไฟล์เสียงเพื่อให้โมเดลถอดข้อความให้คุณ (ใช้ Wav2Vec2 บน MInDS-14)"
)
iface.launch()
|