Spaces:
Sleeping
Sleeping
Lee Xin Yang
commited on
Commit
·
5a5d614
1
Parent(s):
3249b5f
First Commit
Browse files
.gitattributes
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title: Whisper Audio Transcription
|
3 |
emoji: 🏢
|
4 |
colorFrom: yellow
|
5 |
colorTo: green
|
|
|
1 |
---
|
2 |
+
title: Whisper Audio Transcription (zayuki)
|
3 |
emoji: 🏢
|
4 |
colorFrom: yellow
|
5 |
colorTo: green
|
app.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from model import audio_transcribe
|
3 |
+
|
4 |
+
iface = gr.Interface(
|
5 |
+
fn=audio_transcribe,
|
6 |
+
inputs=[gr.Audio(sources="upload", type="filepath", label="Upload Your Audio File")],
|
7 |
+
outputs=gr.Textbox(label="Audio Transcription"),
|
8 |
+
title="Audio Transcription - Whisper Large V3 Turbo",
|
9 |
+
description="Upload an audio file and get the transcribed text."
|
10 |
+
)
|
11 |
+
|
12 |
+
iface.launch(server_name="0.0.0.0", server_port=7860)
|
model.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from faster_whisper import WhisperModel
|
2 |
+
|
3 |
+
model_size = "turbo"
|
4 |
+
|
5 |
+
model = WhisperModel(model_size, device="cpu", compute_type="int8")
|
6 |
+
|
7 |
+
def audio_transcribe(audio_path) -> str:
|
8 |
+
segments, info = model.transcribe(audio_path, beam_size=5)
|
9 |
+
full_transcript = " ".join([segment.text for segment in segments])
|
10 |
+
|
11 |
+
return full_transcript
|
12 |
+
|
13 |
+
if __name__ == "__main__":
|
14 |
+
audio_path = "T0055G0007S0001.wav"
|
15 |
+
transcript = audio_transcribe(audio_path)
|
16 |
+
print(transcript)
|