Gregniuki commited on
Commit
0666b0b
·
1 Parent(s): eea8629

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -361,7 +361,7 @@ def inferencing(model, config, sid, line, length_scale, noise_scale, noise_scale
361
  phoneme_ids = phonemes_to_ids(config, phonemes)
362
  num_speakers = config["num_speakers"]
363
  if num_speakers == 1:
364
- speaker_id = None # for now
365
  else:
366
  speaker_id = sid
367
  text = np.expand_dims(np.array(phoneme_ids, dtype=np.int64), 0)
@@ -372,7 +372,7 @@ def inferencing(model, config, sid, line, length_scale, noise_scale, noise_scale
372
  )
373
  sid = None
374
  if speaker_id is not None:
375
- sid = np.array([speaker_id], dtype=np.int64)
376
  audio = model.run(
377
  None,
378
  {
 
361
  phoneme_ids = phonemes_to_ids(config, phonemes)
362
  num_speakers = config["num_speakers"]
363
  if num_speakers == 1:
364
+ speaker_id = None # for now
365
  else:
366
  speaker_id = sid
367
  text = np.expand_dims(np.array(phoneme_ids, dtype=np.int64), 0)
 
372
  )
373
  sid = None
374
  if speaker_id is not None:
375
+ sid = np.array([speaker_id], dtype=np.int64) # Ensure sid is a 1D array
376
  audio = model.run(
377
  None,
378
  {