Gregniuki commited on
Commit
c62c988
·
1 Parent(s): 3045a48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
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 "phoneme_type" in config and config["phoneme_type"] == "PhonemeType.ESPEAK":
365
- config["phoneme_type"] = "espeak"
 
 
 
 
 
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)