Spaces:
Runtime error
Runtime error
Commit
·
c38911e
1
Parent(s):
3e4a732
feat: add audio samples
Browse files- app.py +14 -2
- audio_sample/Dheweke tandatangan .m4a +0 -0
app.py
CHANGED
@@ -41,12 +41,24 @@ def transcribe(audio):
|
|
41 |
return transcription[0]
|
42 |
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
iface = gr.Interface(
|
45 |
fn=transcribe,
|
46 |
-
inputs=
|
47 |
outputs="text",
|
48 |
title="Speech-to-text on Javanese Language Demo",
|
49 |
-
description="Ini adalah platform untuk pengujian model speech-to-text pada bahasa Jawa oleh Avalon AI. Silahkan coba dengan mengucapkan kalimat",
|
50 |
)
|
51 |
|
52 |
iface.launch()
|
|
|
41 |
return transcription[0]
|
42 |
|
43 |
|
44 |
+
audio_samples = [
|
45 |
+
os.path.join("audio_sample", f)
|
46 |
+
for f in os.listdir("audio_sample")
|
47 |
+
if f.endswith((".wav", ".mp3"))
|
48 |
+
]
|
49 |
+
audio_input = gr.Audio(
|
50 |
+
sources="microphone",
|
51 |
+
type="filepath",
|
52 |
+
label="Upload Audio or Select a Sample",
|
53 |
+
choices=audio_samples,
|
54 |
+
)
|
55 |
+
|
56 |
iface = gr.Interface(
|
57 |
fn=transcribe,
|
58 |
+
inputs=audio_input,
|
59 |
outputs="text",
|
60 |
title="Speech-to-text on Javanese Language Demo",
|
61 |
+
description="Ini adalah platform untuk pengujian model speech-to-text pada bahasa Jawa oleh Avalon AI. Silahkan coba dengan mengucapkan kalimat atau memilih salah satu sample audio.",
|
62 |
)
|
63 |
|
64 |
iface.launch()
|
audio_sample/Dheweke tandatangan .m4a
ADDED
Binary file (85.9 kB). View file
|
|