Spaces:
Running
Running
| import gradio as gr | |
| from transformers import pipeline | |
| # Use whisper-base for better Swedish transcription on CPU | |
| asr = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=-1) | |
| def transcribe(audio): | |
| result = asr(audio) | |
| return result["text"] | |
| gr.Interface( | |
| fn=transcribe, | |
| inputs=gr.Audio(source="upload", type="filepath", label="Upload Swedish Audio"), | |
| outputs=gr.Textbox(label="Transcribed Text (Swedish)"), | |
| title="Swedish Whisper Transcriber", | |
| description="This app uses OpenAI Whisper (base) to transcribe spoken Swedish into text for free." | |
| ).launch() |