Spaces:
Configuration error
Configuration error
| import gradio as gr | |
| import torch | |
| import torchaudio | |
| from transformers import pipeline | |
| # Cargar modelo de transcripci贸n (Whisper) | |
| pipe = pipeline("automatic-speech-recognition", model="openai/whisper-small") | |
| def transcribir(audio): | |
| text = pipe(audio)["text"] | |
| return text | |
| # Crear interfaz con Gradio | |
| demo = gr.Interface( | |
| fn=transcribir, | |
| inputs=gr.Audio(type="filepath", label="Sube tu audio"), | |
| outputs="text", | |
| title="Transcripci贸n de Voz", | |
| description="Este Space usa Whisper (openai/whisper-small) para convertir audio en texto.", | |
| ) | |
| demo.launch() | |