Silemo commited on
Commit
42a00dc
·
1 Parent(s): 0e4f3c2

Removed few comments and added videos

Browse files
Files changed (1) hide show
  1. app.py +9 -6
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: #"audio/" +
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() #output_path = "audio/"
34
 
35
  text = transcribe(audio)
36
 
@@ -52,12 +52,12 @@ io1 = gr.Interface(
52
  outputs = "text",
53
 
54
  examples=[
55
- [ audio1_filename], #"audio/" +
56
- [ audio2_filename], #"audio/" +
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=G9Sgn1AsXSkxfCxV"],
 
 
 
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",