SevenhuijsenM commited on
Commit
932a9e1
1 Parent(s): b932632

Attempt for radio

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -51,7 +51,7 @@ iface_video_url = gr.Interface(
51
  fn=download_audio,
52
  inputs="text",
53
  outputs="text",
54
- title="Whisper Small Dutch",
55
  description="Demo for dutch speech recognition using a fine-tuned Whisper small model.",
56
  )
57
 
@@ -59,10 +59,19 @@ iface_audio = gr.Interface(
59
  fn=audio_to_text,
60
  inputs=gr.Audio(sources=["microphone"], type="filepath"),
61
  outputs="text",
62
- title="Whisper Small Dutch",
63
  description="Realtime demo for dutch speech recognition using a fine-tuned Whisper small model.",
64
  )
65
 
 
 
 
 
 
 
 
 
 
66
  app = gr.TabbedInterface([iface_audio, iface_video_url], ["Audio to text", "Video to text"])
67
 
68
  if __name__ == "__main__":
 
51
  fn=download_audio,
52
  inputs="text",
53
  outputs="text",
54
+ title="Whisper Small Dutch - Use a YouTube URL",
55
  description="Demo for dutch speech recognition using a fine-tuned Whisper small model.",
56
  )
57
 
 
59
  fn=audio_to_text,
60
  inputs=gr.Audio(sources=["microphone"], type="filepath"),
61
  outputs="text",
62
+ title="Whisper Small Dutch - Use your microphone",
63
  description="Realtime demo for dutch speech recognition using a fine-tuned Whisper small model.",
64
  )
65
 
66
+ iface_radio = gr.Interface(
67
+ fn=audio_to_text,
68
+ inputs=gr.inputs.Radio(["https://icecast.omroep.nl/radio1-bb-mp3", "https://icecast.omroep.nl/radio2-bb-mp3", "https://icecast.omroep.nl/radio3-bb-mp3", "https://icecast.omroep.nl/radio4-bb-mp3", "https://icecast.omroep.nl/radio5-bb-mp3", "https://icecast.omroep.nl/radio6-bb-mp3"]),
69
+ outputs="text",
70
+ title="Whisper Small Dutch - Use a radio URL" ,
71
+ description="Demo for dutch speech recognition using a fine-tuned Whisper small model. It uses a radio URL as input.",
72
+ )
73
+
74
+
75
  app = gr.TabbedInterface([iface_audio, iface_video_url], ["Audio to text", "Video to text"])
76
 
77
  if __name__ == "__main__":