Update app.py
Browse files
app.py
CHANGED
@@ -99,26 +99,6 @@ def generate_audio(text, audio_ref, temperature, top_P, top_K, audio_seed_input,
|
|
99 |
output_path=save_path,
|
100 |
message=encode_message)
|
101 |
|
102 |
-
else:
|
103 |
-
source_se = torch.load(f'{ckpt_base_en}/en_style_se.pth').to(device)
|
104 |
-
reference_speaker = audio_ref
|
105 |
-
target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, target_dir='processed', vad=True)
|
106 |
-
|
107 |
-
save_path = "output.wav"
|
108 |
-
|
109 |
-
# Run the base speaker tts
|
110 |
-
src_path = "tmp.wav"
|
111 |
-
base_speaker_tts.tts(text, src_path, speaker=style_mode, language='English', speed=0.9)
|
112 |
-
|
113 |
-
# Run the tone color converter
|
114 |
-
encode_message = "@MyShell"
|
115 |
-
tone_color_converter.convert(
|
116 |
-
audio_src_path=src_path,
|
117 |
-
src_se=source_se,
|
118 |
-
tgt_se=target_se,
|
119 |
-
output_path=save_path,
|
120 |
-
message=encode_message)
|
121 |
-
|
122 |
return "output.wav"
|
123 |
|
124 |
|
|
|
99 |
output_path=save_path,
|
100 |
message=encode_message)
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
return "output.wav"
|
103 |
|
104 |
|