Pendrokar commited on
Commit
191ddd5
โ€ข
1 Parent(s): 67c46c8

added Expresso voice models

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. gr_client.py +13 -6
app.py CHANGED
@@ -54,7 +54,7 @@ def load_model(voice_model_name):
54
  model_path = models_path + voice_model_name
55
  if voice_model_name == 'cnc_cabal':
56
  model_path = hf_cache_robotic_models_path + voice_model_name
57
- if voice_model_name == 'x_ex02':
58
  model_path = hf_cache_expresso_models_path + voice_model_name
59
  model_type = 'xVAPitch'
60
 
@@ -221,5 +221,5 @@ class LocalBlocksDemo(BlocksDemo):
221
 
222
  if __name__ == "__main__":
223
  print('running custom Gradio interface')
224
- demo = LocalBlocksDemo(models_path, hf_cache_lojban_models_path, hf_cache_robotic_models_path)
225
  demo.block.launch()
 
54
  model_path = models_path + voice_model_name
55
  if voice_model_name == 'cnc_cabal':
56
  model_path = hf_cache_robotic_models_path + voice_model_name
57
+ if voice_model_name[:5] == 'x_ex0':
58
  model_path = hf_cache_expresso_models_path + voice_model_name
59
  model_type = 'xVAPitch'
60
 
 
221
 
222
  if __name__ == "__main__":
223
  print('running custom Gradio interface')
224
+ demo = LocalBlocksDemo(models_path, hf_cache_lojban_models_path, hf_cache_robotic_models_path, hf_cache_expresso_models_path)
225
  demo.block.launch()
gr_client.py CHANGED
@@ -4,10 +4,14 @@ import gradio as gr
4
  from gradio_client import Client
5
 
6
  voice_models = [
7
- ("๐Ÿ‘จโ€๐Ÿฆณ #6671", "ccby_nvidia_hifi_6671_M"),
 
8
  ("๐Ÿ‘ฑโ€โ™€๏ธ ๐Ÿ‡ฌ๐Ÿ‡ง #92", "ccby_nvidia_hifi_92_F"),
 
9
  ]
10
  voice_models_more = [
 
 
11
  ("๐Ÿง” #6670", "ccby_nvidia_hifi_6670_M"),
12
  ("๐Ÿ‘จโ€๐Ÿฆฒ #9017", "ccby_nvidia_hifi_9017_M"),
13
  ("๐Ÿง‘ #6097", "ccby_nvidia_hifi_6097_M"),
@@ -16,7 +20,7 @@ voice_models_more = [
16
  ("๐Ÿ‘ฉโ€๐Ÿฆฐ #8051", "ccby_nvidia_hifi_8051_F"),
17
  ("๐Ÿ‘ฉโ€๐Ÿฆณ #11697", "ccby_nvidia_hifi_11697_F"),
18
  ("๐Ÿ‘ฉโ€๐Ÿฆฒ #9136", "ccby_nvidia_hifi_9136_F"),
19
- ("โ™Ÿ Lojban", "x_selpahi"), # v2 model for Lojban, pre-multilingual capabilities of xVASynth
20
  ]
21
 
22
  # order ranked by similarity to English due to the xVASynth's use of ARPAbet instead of IPA
@@ -153,7 +157,7 @@ surprise_slider_init = {
153
  'value': 0,
154
  'step': 0.05,
155
  'label': "๐Ÿ˜ฎ Surprise",
156
- 'info': "Can oversaturate Happiness with either being beyond 0.3",
157
  }
158
  voice_radio_init = {
159
  'choices': [*voice_models, (f'+{len(voice_models_more)}', 'more')],
@@ -306,7 +310,7 @@ def set_lojban_language(voice, lang):
306
  _DESCRIPTION = '''
307
  <div>
308
  <a style="display:inline-block;" href="https://github.com/DanRuta/xVA-Synth"><img src='https://img.shields.io/github/stars/DanRuta/xVA-Synth?style=social'/></a>
309
- <a style="display:inline-block;" href="https://www.nexusmods.com/skyrimspecialedition/mods/44184"><img src='https://img.shields.io/badge/Endorsements-3.4k-blue?logo=nexusmods'/></a>
310
  <a style="display:inline-block; margin-left: .5em" href="https://discord.gg/nv7c6E2TzV"><img src='https://img.shields.io/discord/794590496202293278.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2'/></a>
311
  <span style="display: inline-block;margin-left: .5em;vertical-align: top;"><a href="https://huggingface.co/spaces/Pendrokar/xVASynth?duplicate=true" style="" target="_blank"><img style="margin-bottom: 0em;display: inline;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> for a personal CPU-run one</span>
312
  </div>
@@ -314,10 +318,11 @@ _DESCRIPTION = '''
314
 
315
 
316
  class BlocksDemo:
317
- def __init__(self, models_path, lojban_models_path, robotic_models_path):
318
  self.models_path = models_path
319
  self.lojban_models_path = lojban_models_path
320
  self.robotic_models_path = robotic_models_path
 
321
 
322
  if robotic_models_path != '':
323
  # insert robotic voice as the third option
@@ -612,6 +617,8 @@ class BlocksDemo:
612
  sample_path = self.lojban_models_path
613
  elif voice_id == 'cnc_cabal':
614
  sample_path = self.robotic_models_path
 
 
615
  else:
616
  sample_path = self.models_path
617
 
@@ -627,5 +634,5 @@ if __name__ == "__main__":
627
  print('running Gradio interface')
628
  client = Client("Pendrokar/xVASynth")
629
 
630
- demo = BlocksDemo('', '', '')
631
  demo.block.launch()
 
4
  from gradio_client import Client
5
 
6
  voice_models = [
7
+ ("๐Ÿ‘ฉ #ex04", "x_ex04"),
8
+ ("๐Ÿง‘ #ex01", "x_ex01"),
9
  ("๐Ÿ‘ฑโ€โ™€๏ธ ๐Ÿ‡ฌ๐Ÿ‡ง #92", "ccby_nvidia_hifi_92_F"),
10
+ ("๐Ÿ‘จโ€๐Ÿฆณ #6671", "ccby_nvidia_hifi_6671_M"),
11
  ]
12
  voice_models_more = [
13
+ ("๐Ÿ‘ธ #ex02", "x_ex02"),
14
+ ("๐Ÿ‘จโ€๐Ÿฆฑ #ex03", "x_ex03"),
15
  ("๐Ÿง” #6670", "ccby_nvidia_hifi_6670_M"),
16
  ("๐Ÿ‘จโ€๐Ÿฆฒ #9017", "ccby_nvidia_hifi_9017_M"),
17
  ("๐Ÿง‘ #6097", "ccby_nvidia_hifi_6097_M"),
 
20
  ("๐Ÿ‘ฉโ€๐Ÿฆฐ #8051", "ccby_nvidia_hifi_8051_F"),
21
  ("๐Ÿ‘ฉโ€๐Ÿฆณ #11697", "ccby_nvidia_hifi_11697_F"),
22
  ("๐Ÿ‘ฉโ€๐Ÿฆฒ #9136", "ccby_nvidia_hifi_9136_F"),
23
+ ("โ™Ÿ Lojban", "x_selpahi"), # v2 model for Lojban, pre- the multilingual capabilities of xVASynth v3
24
  ]
25
 
26
  # order ranked by similarity to English due to the xVASynth's use of ARPAbet instead of IPA
 
157
  'value': 0,
158
  'step': 0.05,
159
  'label': "๐Ÿ˜ฎ Surprise",
160
+ 'info': "Oversaturates Happiness when beyond 0.3",
161
  }
162
  voice_radio_init = {
163
  'choices': [*voice_models, (f'+{len(voice_models_more)}', 'more')],
 
310
  _DESCRIPTION = '''
311
  <div>
312
  <a style="display:inline-block;" href="https://github.com/DanRuta/xVA-Synth"><img src='https://img.shields.io/github/stars/DanRuta/xVA-Synth?style=social'/></a>
313
+ <a style="display:inline-block;" href="https://www.nexusmods.com/skyrimspecialedition/mods/44184"><img src='https://img.shields.io/badge/Endorsements-3.9k-blue?logo=nexusmods'/></a>
314
  <a style="display:inline-block; margin-left: .5em" href="https://discord.gg/nv7c6E2TzV"><img src='https://img.shields.io/discord/794590496202293278.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2'/></a>
315
  <span style="display: inline-block;margin-left: .5em;vertical-align: top;"><a href="https://huggingface.co/spaces/Pendrokar/xVASynth?duplicate=true" style="" target="_blank"><img style="margin-bottom: 0em;display: inline;" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a> for a personal CPU-run one</span>
316
  </div>
 
318
 
319
 
320
  class BlocksDemo:
321
+ def __init__(self, models_path, lojban_models_path, robotic_models_path, expresso_models_path):
322
  self.models_path = models_path
323
  self.lojban_models_path = lojban_models_path
324
  self.robotic_models_path = robotic_models_path
325
+ self.expresso_models_path = expresso_models_path
326
 
327
  if robotic_models_path != '':
328
  # insert robotic voice as the third option
 
617
  sample_path = self.lojban_models_path
618
  elif voice_id == 'cnc_cabal':
619
  sample_path = self.robotic_models_path
620
+ elif voice_id[:5] == 'x_ex0':
621
+ model_path = self.expresso_models_path
622
  else:
623
  sample_path = self.models_path
624
 
 
634
  print('running Gradio interface')
635
  client = Client("Pendrokar/xVASynth")
636
 
637
+ demo = BlocksDemo('', '', '', '')
638
  demo.block.launch()