Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fastpitch base speaker embeds
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import json
|
|
5 |
from huggingface_hub import HfApi
|
6 |
|
7 |
# start xVASynth service (no HTTP)
|
8 |
-
import resources.app.no_server as xvaserver
|
9 |
|
10 |
from gr_client import BlocksDemo
|
11 |
|
@@ -55,7 +55,11 @@ def load_model(voice_model_name):
|
|
55 |
|
56 |
with open(model_path + '.json', 'r', encoding='utf-8') as f:
|
57 |
voice_model_json = json.load(f)
|
58 |
-
|
|
|
|
|
|
|
|
|
59 |
except requests.exceptions.RequestException as err:
|
60 |
print(f'FAILED to load voice model: {err}')
|
61 |
|
@@ -171,5 +175,5 @@ class LocalBlocksDemo(BlocksDemo):
|
|
171 |
|
172 |
if __name__ == "__main__":
|
173 |
print('running custom Gradio interface')
|
174 |
-
demo = LocalBlocksDemo(models_path,
|
175 |
demo.block.launch()
|
|
|
5 |
from huggingface_hub import HfApi
|
6 |
|
7 |
# start xVASynth service (no HTTP)
|
8 |
+
# import resources.app.no_server as xvaserver
|
9 |
|
10 |
from gr_client import BlocksDemo
|
11 |
|
|
|
55 |
|
56 |
with open(model_path + '.json', 'r', encoding='utf-8') as f:
|
57 |
voice_model_json = json.load(f)
|
58 |
+
|
59 |
+
if model_type == 'xVAPitch':
|
60 |
+
embs = voice_model_json['games'][0]['base_speaker_emb']
|
61 |
+
else if model_type == 'FastPitch1.1':
|
62 |
+
embs = voice_model_json['games'][0]['resemblyzer']
|
63 |
except requests.exceptions.RequestException as err:
|
64 |
print(f'FAILED to load voice model: {err}')
|
65 |
|
|
|
175 |
|
176 |
if __name__ == "__main__":
|
177 |
print('running custom Gradio interface')
|
178 |
+
demo = LocalBlocksDemo(models_path, hf_cache_lojban_models_path)
|
179 |
demo.block.launch()
|