firzaelbuho
commited on
Commit
•
f3e787d
1
Parent(s):
64ef07b
Update app2.py
Browse files
app2.py
CHANGED
@@ -102,7 +102,7 @@ def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
|
|
102 |
else:
|
103 |
inc_rate = (f"+{tts_rate - s100}%")
|
104 |
|
105 |
-
asyncio.run(edge_tts.Communicate(text=tts_text, voice= "-".join(tts_voice.split('-')[:-1]), rate=
|
106 |
audio, sr = librosa.load("tts.mp3", sr=16000, mono=True)
|
107 |
vc_input = "tts.mp3"
|
108 |
times = [0, 0, 0]
|
@@ -426,7 +426,7 @@ def change_audio_mode(vc_audio_mode):
|
|
426 |
# TTS
|
427 |
gr.Textbox.update(visible=True),
|
428 |
gr.Dropdown.update(visible=True),
|
429 |
-
gr.
|
430 |
)
|
431 |
|
432 |
def use_microphone(microphone):
|
@@ -639,9 +639,9 @@ if __name__ == '__main__':
|
|
639 |
vc_download_button = gr.Button("Download Audio", variant="primary", visible=False)
|
640 |
vc_audio_preview = gr.Audio(label="Audio Preview", visible=False)
|
641 |
# TTS
|
642 |
-
tts_text = gr.Textbox(label="TTS text", info="Text to speech input", visible=False)
|
643 |
tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
644 |
-
tts_rate = gr.
|
645 |
with gr.Column():
|
646 |
vc_split_model = gr.Dropdown(label="Splitter Model", choices=["hdemucs_mmi", "htdemucs", "htdemucs_ft", "mdx", "mdx_q", "mdx_extra_q"], allow_custom_value=False, visible=False, value="htdemucs", info="Select the splitter model (Default: htdemucs)")
|
647 |
vc_split_log = gr.Textbox(label="Output Information", visible=False, interactive=False)
|
@@ -837,6 +837,7 @@ if __name__ == '__main__':
|
|
837 |
vc_upload,
|
838 |
tts_text,
|
839 |
tts_voice,
|
|
|
840 |
vc_transform0,
|
841 |
f0method0,
|
842 |
index_rate1,
|
|
|
102 |
else:
|
103 |
inc_rate = (f"+{tts_rate - s100}%")
|
104 |
|
105 |
+
asyncio.run(edge_tts.Communicate(text=tts_text, voice= "-".join(tts_voice.split('-')[:-1]), rate= inc_rate).save("tts.mp3"))
|
106 |
audio, sr = librosa.load("tts.mp3", sr=16000, mono=True)
|
107 |
vc_input = "tts.mp3"
|
108 |
times = [0, 0, 0]
|
|
|
426 |
# TTS
|
427 |
gr.Textbox.update(visible=True),
|
428 |
gr.Dropdown.update(visible=True),
|
429 |
+
gr.Number.update(visible=True)
|
430 |
)
|
431 |
|
432 |
def use_microphone(microphone):
|
|
|
639 |
vc_download_button = gr.Button("Download Audio", variant="primary", visible=False)
|
640 |
vc_audio_preview = gr.Audio(label="Audio Preview", visible=False)
|
641 |
# TTS
|
642 |
+
tts_text = gr.Textbox(label="TTS text", value="hello world", info="Text to speech input", visible=False)
|
643 |
tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
644 |
+
tts_rate = gr.Number(label="TTS Rate", value = 0 ,info='Change tts output speed (100 = normal)', visible=False)
|
645 |
with gr.Column():
|
646 |
vc_split_model = gr.Dropdown(label="Splitter Model", choices=["hdemucs_mmi", "htdemucs", "htdemucs_ft", "mdx", "mdx_q", "mdx_extra_q"], allow_custom_value=False, visible=False, value="htdemucs", info="Select the splitter model (Default: htdemucs)")
|
647 |
vc_split_log = gr.Textbox(label="Output Information", visible=False, interactive=False)
|
|
|
837 |
vc_upload,
|
838 |
tts_text,
|
839 |
tts_voice,
|
840 |
+
tts_rate,
|
841 |
vc_transform0,
|
842 |
f0method0,
|
843 |
index_rate1,
|