Update app.py
Browse files
app.py
CHANGED
@@ -14,13 +14,13 @@ for model_id in model_ids:
|
|
14 |
model_name = model_id.split('/')[-1]
|
15 |
snapshot_download(model_id, local_dir=f'checkpoints/{model_name}')
|
16 |
|
17 |
-
from TTS.tts.configs.bark_config import BarkConfig
|
18 |
-
from TTS.tts.models.bark import Bark
|
19 |
|
20 |
#os.environ['CUDA_VISIBLE_DEVICES'] = '1'
|
21 |
-
config = BarkConfig()
|
22 |
-
model = Bark.init_from_config(config)
|
23 |
-
model.load_checkpoint(config, checkpoint_dir="checkpoints/bark", eval=True)
|
24 |
|
25 |
from TTS.api import TTS
|
26 |
tts = TTS("tts_models/multilingual/multi-dataset/bark", gpu=True)
|
@@ -107,6 +107,7 @@ def infer_with_npz(prompt, input_wav_file):
|
|
107 |
item_path = os.path.join(f"bark_voices/{file_name}", first_item)
|
108 |
os.remove(item_path)
|
109 |
|
|
|
110 |
print("BEGINNING GENERATION")
|
111 |
# cloning a speaker.
|
112 |
text = prompt
|
@@ -129,7 +130,7 @@ def infer_with_npz(prompt, input_wav_file):
|
|
129 |
sample_rate,
|
130 |
output_dict['wav']
|
131 |
)
|
132 |
-
|
133 |
# Print again the contents
|
134 |
contents = os.listdir(f"bark_voices/{file_name}")
|
135 |
for item in contents:
|
|
|
14 |
model_name = model_id.split('/')[-1]
|
15 |
snapshot_download(model_id, local_dir=f'checkpoints/{model_name}')
|
16 |
|
17 |
+
#from TTS.tts.configs.bark_config import BarkConfig
|
18 |
+
#from TTS.tts.models.bark import Bark
|
19 |
|
20 |
#os.environ['CUDA_VISIBLE_DEVICES'] = '1'
|
21 |
+
#config = BarkConfig()
|
22 |
+
#model = Bark.init_from_config(config)
|
23 |
+
#model.load_checkpoint(config, checkpoint_dir="checkpoints/bark", eval=True)
|
24 |
|
25 |
from TTS.api import TTS
|
26 |
tts = TTS("tts_models/multilingual/multi-dataset/bark", gpu=True)
|
|
|
107 |
item_path = os.path.join(f"bark_voices/{file_name}", first_item)
|
108 |
os.remove(item_path)
|
109 |
|
110 |
+
"""
|
111 |
print("BEGINNING GENERATION")
|
112 |
# cloning a speaker.
|
113 |
text = prompt
|
|
|
130 |
sample_rate,
|
131 |
output_dict['wav']
|
132 |
)
|
133 |
+
"""
|
134 |
# Print again the contents
|
135 |
contents = os.listdir(f"bark_voices/{file_name}")
|
136 |
for item in contents:
|