Skip to content

Commit

Permalink
feat: 🏴󠁧󠁢󠁥󠁮󠁧󠁿 add languages details to Gradio components
Browse files Browse the repository at this point in the history
  • Loading branch information
philippart-s authored and titimoby committed Nov 19, 2024
1 parent c74a1eb commit 2e57f71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions solutions/audio/speech-to-speech-grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,22 @@ def speechToSpeech(audio):


# Create a Gradio output component
input_audio = gr.Audio(sources=["upload", "microphone"], type="filepath")
input_audio = gr.Audio(label = "French 🇫🇷", sources=["upload", "microphone"], type="filepath")

# Create an output audio Gradio component
output_audio = gr.Audio(
label="Audio synthesis (.wav)", type="numpy", show_download_button=False
label="English version 🏴󠁧󠁢󠁥󠁮󠁧󠁿", type="numpy", show_download_button=False
)


# Create a Gradio interface named demo
# The function to call : reverse_audio
# The inputs : input_audio
# The outputs : "text", "text", output_audio
# The outputs : "gr.Textbox(...)", "gr.Textbox(...)", output_audio
demo = gr.Interface(
fn=speechToSpeech,
inputs=input_audio,
outputs=["text", "text", output_audio],
outputs=[gr.Textbox(label="🇫🇷"), gr.Textbox(label="🏴󠁧󠁢󠁥󠁮󠁧󠁿"), output_audio],
allow_flagging="never",
)

Expand Down
2 changes: 1 addition & 1 deletion workshop/audio/speech-to-speech-grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def speechToSpeech(audio):
# Create a Gradio interface named demo
# The function to call : reverse_audio
# The inputs : input_audio
# The outputs : "text", "text", output_audio
# The outputs : "gr.Textbox(...)", "gr.Textbox(...)", output_audio

# Main entry
if __name__ == "__main__":
Expand Down

0 comments on commit 2e57f71

Please sign in to comment.