PhysHunter commited on
Commit
b584d69
·
1 Parent(s): 748ad62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -33,11 +33,11 @@ def speech_to_speech_translation(audio):
33
 
34
 
35
  title = "Cascaded STST"
36
- # description = """
37
- # Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in French. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation, and Facebook's
38
- # [MMS TTS](https://huggingface.co/facebook/mms-tts) model for text-to-speech:
39
- # ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
40
- # """
41
 
42
  demo = gr.Blocks()
43
 
@@ -45,8 +45,9 @@ mic_translate = gr.Interface(
45
  fn=speech_to_speech_translation,
46
  inputs=gr.Audio(source="microphone", type="filepath"),
47
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
 
48
  title=title,
49
- #description=description,
50
  )
51
 
52
  file_translate = gr.Interface(
@@ -55,7 +56,7 @@ file_translate = gr.Interface(
55
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
56
  examples=[["./example.wav"]],
57
  title=title,
58
- #description=description,
59
  )
60
 
61
  with demo:
 
33
 
34
 
35
  title = "Cascaded STST"
36
+ description = """
37
+ Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in French. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation, and Facebook's
38
+ [MMS TTS](https://huggingface.co/facebook/mms-tts) model for text-to-speech:
39
+ ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
40
+ """
41
 
42
  demo = gr.Blocks()
43
 
 
45
  fn=speech_to_speech_translation,
46
  inputs=gr.Audio(source="microphone", type="filepath"),
47
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
48
+ examples=[["./example.wav"]],
49
  title=title,
50
+ description=description,
51
  )
52
 
53
  file_translate = gr.Interface(
 
56
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
57
  examples=[["./example.wav"]],
58
  title=title,
59
+ description=description,
60
  )
61
 
62
  with demo: