mrfakename commited on
Commit
32b94cc
1 Parent(s): 4478ce8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -15,13 +15,13 @@ with open('harvard_sentences.txt') as f:
15
  # Constants
16
  ####################################
17
  AVAILABLE_MODELS = {
18
- 'XTTS': 'xtts',
19
  'WhisperSpeech': 'whisperspeech',
20
  'ElevenLabs': 'eleven',
21
  'OpenVoice': 'openvoice',
22
  'Pheme': 'pheme',
23
  'MetaVoice': 'metavoice',
24
- 'OpenAI TTS': 'openai',
25
  }
26
 
27
  SPACE_ID = os.getenv('HF_ID')
@@ -497,10 +497,7 @@ def synthandreturn(text):
497
  print("[debug] Using", mdl1, mdl2)
498
  def predict_and_update_result(text, model, result_storage):
499
  result = router.predict(text, AVAILABLE_MODELS[model], api_name="/synthesize")
500
- try:
501
- doloudnorm(result)
502
- except:
503
- pass
504
  result_storage[model] = result
505
  results = {}
506
  thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1, results))
 
15
  # Constants
16
  ####################################
17
  AVAILABLE_MODELS = {
18
+ 'XTTS': 'xttsv2',
19
  'WhisperSpeech': 'whisperspeech',
20
  'ElevenLabs': 'eleven',
21
  'OpenVoice': 'openvoice',
22
  'Pheme': 'pheme',
23
  'MetaVoice': 'metavoice',
24
+ 'OpenAI': 'openai',
25
  }
26
 
27
  SPACE_ID = os.getenv('HF_ID')
 
497
  print("[debug] Using", mdl1, mdl2)
498
  def predict_and_update_result(text, model, result_storage):
499
  result = router.predict(text, AVAILABLE_MODELS[model], api_name="/synthesize")
500
+ doloudnorm(result)
 
 
 
501
  result_storage[model] = result
502
  results = {}
503
  thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1, results))