Spaces:
Runtime error
Runtime error
Removed few comments and added videos
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def download_audio(audio_url, filename):
|
|
12 |
|
13 |
# send a HTTP request to the server and save
|
14 |
# the HTTP response in a response object called r
|
15 |
-
with open(filename,'wb') as f:
|
16 |
|
17 |
# Saving received content as a mp3 file in
|
18 |
# binary format
|
@@ -30,7 +30,7 @@ def transcribe_video(url):
|
|
30 |
stream = yt.streams.get_audio_only()
|
31 |
|
32 |
# Saves the audio in the /audio folder
|
33 |
-
audio = stream.download()
|
34 |
|
35 |
text = transcribe(audio)
|
36 |
|
@@ -52,12 +52,12 @@ io1 = gr.Interface(
|
|
52 |
outputs = "text",
|
53 |
|
54 |
examples=[
|
55 |
-
[
|
56 |
-
[
|
57 |
],
|
58 |
|
59 |
title = "Whisper Small - Italian - Microphone or Audio file",
|
60 |
-
description = "Realtime demo for Italian speech recognition using a fine-tuned Whisper small model. It uses the computer microphone as audio input",
|
61 |
)
|
62 |
|
63 |
io2 = gr.Interface(
|
@@ -70,7 +70,10 @@ io2 = gr.Interface(
|
|
70 |
["https://youtu.be/QbwZlURClSA?si=DKMtIiKE-nO2mfcV"],
|
71 |
|
72 |
# Breaking Italy - Lollobrigida ferma il treno
|
73 |
-
["https://youtu.be/9MPBN0tnA_E?si=
|
|
|
|
|
|
|
74 |
],
|
75 |
|
76 |
title = "Whisper Small - Italian - YouTube link",
|
|
|
12 |
|
13 |
# send a HTTP request to the server and save
|
14 |
# the HTTP response in a response object called r
|
15 |
+
with open(filename,'wb') as f:
|
16 |
|
17 |
# Saving received content as a mp3 file in
|
18 |
# binary format
|
|
|
30 |
stream = yt.streams.get_audio_only()
|
31 |
|
32 |
# Saves the audio in the /audio folder
|
33 |
+
audio = stream.download()
|
34 |
|
35 |
text = transcribe(audio)
|
36 |
|
|
|
52 |
outputs = "text",
|
53 |
|
54 |
examples=[
|
55 |
+
[audio1_filename],
|
56 |
+
[audio2_filename],
|
57 |
],
|
58 |
|
59 |
title = "Whisper Small - Italian - Microphone or Audio file",
|
60 |
+
description = "Realtime demo for Italian speech recognition using a fine-tuned Whisper small model. It uses the computer microphone or an audio file as audio input",
|
61 |
)
|
62 |
|
63 |
io2 = gr.Interface(
|
|
|
70 |
["https://youtu.be/QbwZlURClSA?si=DKMtIiKE-nO2mfcV"],
|
71 |
|
72 |
# Breaking Italy - Lollobrigida ferma il treno
|
73 |
+
["https://youtu.be/9MPBN0tnA_E?si=8-hqkJS05LNkWprX&t=2"],
|
74 |
+
|
75 |
+
# Mussolini discorso
|
76 |
+
["https://youtu.be/UmnxcjRk37Q?si=uxt8oqnMDJ3vFzIB&t=77"],
|
77 |
],
|
78 |
|
79 |
title = "Whisper Small - Italian - YouTube link",
|