Spaces:
Sleeping
Sleeping
Erkhembayar Gantulga
commited on
Commit
Β·
4db9758
1
Parent(s):
02daf78
Initial demo
Browse files- README.md +2 -2
- app.py +19 -0
- example.flac +0 -0
- packages.txt +1 -0
- requirements.txt +3 -0
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
title: Whisper Medium Mn
|
3 |
-
emoji:
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
@@ -9,4 +9,4 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
title: Whisper Medium Mn
|
3 |
+
emoji: π
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
# Specify the task explicitly
|
5 |
+
pipe = pipeline(task="automatic-speech-recognition", model="erkhem-gantulga/whisper-medium-mn")
|
6 |
+
|
7 |
+
def transcribe(audio):
|
8 |
+
text = pipe(audio)["text"]
|
9 |
+
return text
|
10 |
+
|
11 |
+
iface = gr.Interface(
|
12 |
+
fn=transcribe,
|
13 |
+
inputs=gr.Audio(sources=["upload", "microphone"], type="filepath"),
|
14 |
+
outputs="text",
|
15 |
+
title="Whisper Medium Mongolian",
|
16 |
+
description="Realtime demo for Mongolian speech recognition using a fine-tuned Whisper medium model.",
|
17 |
+
)
|
18 |
+
|
19 |
+
iface.launch()
|
example.flac
ADDED
Binary file (195 kB). View file
|
|
packages.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
ffmpeg
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
--extra-index-url https://download.pytorch.org/whl/cu113
|
2 |
+
torch
|
3 |
+
transformers
|