drewThomasson commited on
Commit
e185191
·
verified ·
1 Parent(s): 6d72e83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -49,9 +49,16 @@ with gr.Blocks() as demo:
49
 
50
  with gr.Row():
51
  input_audio = gr.Audio(label="Record or Upload Your Voice", type="filepath")
52
- target_voice = gr.Dropdown(choices=example_files, label="Select Target Voice from Examples",
53
- value=example_files[0], info="Located in Examples/ folder")
54
- uploaded_target_voice = gr.Audio(label="Or Upload Your Own Target Voice (Overrides Examples)", type="filepath", optional=True)
 
 
 
 
 
 
 
55
 
56
  with gr.Row():
57
  play_button = gr.Button("Preview Selected Target Voice")
@@ -68,7 +75,11 @@ with gr.Blocks() as demo:
68
  play_button.click(preview_target_voice, inputs=[target_voice], outputs=preview_audio)
69
 
70
  # Conversion process
71
- convert_button.click(voice_conversion, inputs=[input_audio, target_voice, uploaded_target_voice], outputs=output_audio)
 
 
 
 
72
 
73
  # Launch with public=True for public URL access and share link
74
  demo.launch(share=True)
 
49
 
50
  with gr.Row():
51
  input_audio = gr.Audio(label="Record or Upload Your Voice", type="filepath")
52
+ target_voice = gr.Dropdown(
53
+ choices=example_files,
54
+ label="Select Target Voice from Examples",
55
+ value=example_files[0],
56
+ info="Located in Examples/ folder"
57
+ )
58
+ uploaded_target_voice = gr.Audio(
59
+ label="Or Upload Your Own Target Voice",
60
+ type="filepath"
61
+ )
62
 
63
  with gr.Row():
64
  play_button = gr.Button("Preview Selected Target Voice")
 
75
  play_button.click(preview_target_voice, inputs=[target_voice], outputs=preview_audio)
76
 
77
  # Conversion process
78
+ convert_button.click(
79
+ voice_conversion,
80
+ inputs=[input_audio, target_voice, uploaded_target_voice],
81
+ outputs=output_audio
82
+ )
83
 
84
  # Launch with public=True for public URL access and share link
85
  demo.launch(share=True)