Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -361,8 +361,13 @@ def audio_float_to_int16(
|
|
| 361 |
|
| 362 |
def inferencing(model, config, sid, line, length_scale, noise_scale, noise_scale_w, auto_play=True):
|
| 363 |
audios = []
|
| 364 |
-
if
|
| 365 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 366 |
text = phonemize(config, line)
|
| 367 |
for phonemes in text:
|
| 368 |
phoneme_ids = phonemes_to_ids(config, phonemes)
|
|
|
|
| 361 |
|
| 362 |
def inferencing(model, config, sid, line, length_scale, noise_scale, noise_scale_w, auto_play=True):
|
| 363 |
audios = []
|
| 364 |
+
# Check if 'phoneme_type' exists in the config dictionary
|
| 365 |
+
phoneme_type = config.get("phoneme_type", PhonemeType.ESPEAK.value)
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
# Fix applied here
|
| 369 |
+
if phoneme_type == PhonemeType.ESPEAK.value:
|
| 370 |
+
config["phoneme_type"] = "espeak"
|
| 371 |
text = phonemize(config, line)
|
| 372 |
for phonemes in text:
|
| 373 |
phoneme_ids = phonemes_to_ids(config, phonemes)
|