alan commited on
Commit
fbee46a
·
1 Parent(s): 64ba020

naming refactor

Browse files
Files changed (3) hide show
  1. .gitignore +7 -0
  2. LICENSE +1 -1
  3. app.py +16 -16
.gitignore ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # testing files
2
+ *.sh
3
+ *.db
4
+ test.py
5
+
6
+ # cache
7
+ /__pycache__
LICENSE CHANGED
@@ -1,6 +1,6 @@
1
  ZLIB/LIBPNG LICENSE
2
 
3
- Copyright (c) 2024 TTS-AGI Contributors
4
 
5
  This software is provided ‘as-is’, without any express or implied
6
  warranty. In no event will the authors be held liable for any damages
 
1
  ZLIB/LIBPNG LICENSE
2
 
3
+ Copyright (c) 2024 Kotoba Technologies Contributors
4
 
5
  This software is provided ‘as-is’, without any express or implied
6
  warranty. In no event will the authors be held liable for any damages
app.py CHANGED
@@ -388,16 +388,16 @@ model_names = {
388
  # 'pheme': 'PolyAI Pheme',
389
  # 'speecht5': 'SpeechT5',
390
  # 'metavoice': 'MetaVoice-1B',
391
- 'bark': 'BARK',
392
- 'moe-vits': 'MOE-VITS',
393
- 'kotoba-speech-ava': 'KOTOBA-SPEECH-v0.1-AVA',
394
- 'kotoba-speech-bria': 'KOTOBA-SPEECH-v0.1-BRIA',
395
- 'kotoba-speech-alex': 'KOTOBA-SPEECH-v0.1-ALEX',
396
- 'kotoba-speech-jacob': 'KOTOBA-SPEECH-v0.1-JACOB',
397
- 'blane-tts': 'BLANE-TTS',
398
- 'amitaro-vits': 'AMITARO-VITS',
399
- 'google-tts': 'google-tts',
400
- 'openai-tts': 'openai-tts'
401
  # 'styletts2': 'StyleTTS 2',
402
  }
403
  model_licenses = {
@@ -620,11 +620,11 @@ def reload(chosenmodel1=None, chosenmodel2=None, userid=None, chose_a=False, cho
620
  gr.update(interactive=False, visible=False)
621
  ]
622
  if chose_a == True:
623
- out.append(gr.update(value=f'Your vote: {chosenmodel1}', interactive=False, visible=True))
624
- out.append(gr.update(value=f'{chosenmodel2}', interactive=False, visible=True))
625
  else:
626
- out.append(gr.update(value=f'{chosenmodel1}', interactive=False, visible=True))
627
- out.append(gr.update(value=f'Your vote: {chosenmodel2}', interactive=False, visible=True))
628
  out.append(gr.update(visible=True))
629
  return out
630
 
@@ -726,7 +726,7 @@ def synthandreturn(text):
726
  def predict_and_update_result(text, model, result_storage):
727
  try:
728
  # if model in AVAILABLE_MODELS:
729
- if model in model_names:
730
  model_args = {
731
  'moe-vits': (
732
  text,
@@ -819,7 +819,7 @@ def synthandreturn(text):
819
  if mdl1 in AVAILABLE_MODELS.keys(): mdl1k=AVAILABLE_MODELS[mdl1]
820
  if mdl2 in AVAILABLE_MODELS.keys(): mdl2k=AVAILABLE_MODELS[mdl2]
821
  results = {}
822
- print(f"Sending models {mdl1k} and {mdl2k} to API")
823
  thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1k, results))
824
  thread2 = threading.Thread(target=predict_and_update_result, args=(text, mdl2k, results))
825
 
 
388
  # 'pheme': 'PolyAI Pheme',
389
  # 'speecht5': 'SpeechT5',
390
  # 'metavoice': 'MetaVoice-1B',
391
+ 'BARK': 'BARK',
392
+ 'MOE-VITS': 'MOE-VITS',
393
+ 'KOTOBA-SPEECH-AVA': 'KOTOBA-SPEECH-v0.1-SPK1',
394
+ 'KOTOBA-SPEECH-BRIA': 'KOTOBA-SPEECH-v0.1-SPK2',
395
+ 'KOTOBA-SPEECH-ALEX': 'KOTOBA-SPEECH-v0.1-SPK3',
396
+ 'KOTOBA-SPEECH-JACOB': 'KOTOBA-SPEECH-v0.1-SPK4',
397
+ 'BLANE-TTS': 'BLANE-TTS',
398
+ 'AMITARO-VITS': 'AMITARO-VITS',
399
+ 'GOOGLE-TTS': 'GOOGLE-TTS',
400
+ 'OPENAI-TTS': 'OPENAI-TTS'
401
  # 'styletts2': 'StyleTTS 2',
402
  }
403
  model_licenses = {
 
620
  gr.update(interactive=False, visible=False)
621
  ]
622
  if chose_a == True:
623
+ out.append(gr.update(value=f'Your vote: {model_names[chosenmodel1]}', interactive=False, visible=True))
624
+ out.append(gr.update(value=f'{model_names[chosenmodel2]}', interactive=False, visible=True))
625
  else:
626
+ out.append(gr.update(value=f'{model_names[chosenmodel1]}', interactive=False, visible=True))
627
+ out.append(gr.update(value=f'Your vote: {model_names[chosenmodel2]}', interactive=False, visible=True))
628
  out.append(gr.update(visible=True))
629
  return out
630
 
 
726
  def predict_and_update_result(text, model, result_storage):
727
  try:
728
  # if model in AVAILABLE_MODELS:
729
+ if model in AVAILABLE_MODELS.values():
730
  model_args = {
731
  'moe-vits': (
732
  text,
 
819
  if mdl1 in AVAILABLE_MODELS.keys(): mdl1k=AVAILABLE_MODELS[mdl1]
820
  if mdl2 in AVAILABLE_MODELS.keys(): mdl2k=AVAILABLE_MODELS[mdl2]
821
  results = {}
822
+ print(f"[debug] Sending models {mdl1k} and {mdl2k} to API")
823
  thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1k, results))
824
  thread2 = threading.Thread(target=predict_and_update_result, args=(text, mdl2k, results))
825