Created
May 18, 2023 20:18
-
-
Save ehzawad/3a6236237cd23b84d9eaadf44c602680 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from transformers import pipeline | |
| import gradio as gr | |
| pipe = pipeline(model="ehzawad/whisper-tiny-bn") | |
| def transcribe(audio): | |
| text = pipe(audio)["text"] | |
| return text | |
| iface = gr.Interface( | |
| fn=transcribe, | |
| inputs=gr.Audio(source="microphone", type="filepath"), | |
| outputs="text", | |
| title="Whisper Tiny Bengali Model Inference", | |
| description="Realtime demo for Bengali speech recognition using a fine-tuned Whisper tiny model.", | |
| ) | |
| iface.launch(share=True) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pip install --user transformers
pip install --user gradio