Update app.py
Browse files
app.py
CHANGED
@@ -161,12 +161,23 @@ ov_en_tts, ov_voice_conversion = ov_models[:2]
|
|
161 |
if enable_chinese_lang:
|
162 |
ov_zh_tts = ov_models[-1]
|
163 |
|
|
|
164 |
REFERENCE_VOICES_PATH = f"{repo_dir}/resources/"
|
165 |
reference_speakers = [
|
166 |
*[path for path in os.listdir(REFERENCE_VOICES_PATH) if os.path.splitext(path)[-1] == ".mp3"],
|
167 |
"record_manually",
|
168 |
"load_manually",
|
169 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
ref_speaker_path = f"{REFERENCE_VOICES_PATH}/{ref_speaker.value}"
|
171 |
allowed_audio_types = ".mp4,.mp3,.wav,.wma,.aac,.m4a,.m4b,.webm"
|
172 |
|
|
|
161 |
if enable_chinese_lang:
|
162 |
ov_zh_tts = ov_models[-1]
|
163 |
|
164 |
+
|
165 |
REFERENCE_VOICES_PATH = f"{repo_dir}/resources/"
|
166 |
reference_speakers = [
|
167 |
*[path for path in os.listdir(REFERENCE_VOICES_PATH) if os.path.splitext(path)[-1] == ".mp3"],
|
168 |
"record_manually",
|
169 |
"load_manually",
|
170 |
]
|
171 |
+
|
172 |
+
ref_speaker = widgets.Dropdown(
|
173 |
+
options=reference_speakers,
|
174 |
+
value=reference_speakers[0],
|
175 |
+
description="reference voice from which tone color will be copied",
|
176 |
+
disabled=False,
|
177 |
+
)
|
178 |
+
|
179 |
+
ref_speaker
|
180 |
+
|
181 |
ref_speaker_path = f"{REFERENCE_VOICES_PATH}/{ref_speaker.value}"
|
182 |
allowed_audio_types = ".mp4,.mp3,.wav,.wma,.aac,.m4a,.m4b,.webm"
|
183 |
|