Open chenzuozhou opened 1 year ago
try to find text.pt on your hard drive and delete it. It may be a corrupt download.
try to find text.pt on your hard drive and delete it. It may be a corrupt download. I have confirmed the text.pt is correct, and it can run success on transformers usage, but report this err on suno usage
Reports keyerror when generate audio
Traceback (most recent call last): File "/data/mfsshare/thirdpart_tools/bark-with-voice-clone/test/basic.py", line 6, in
preload_models(path="/data/mfsshare/models/bark/text.pt")
File "/root/miniconda3/envs/bark-with-voice-clone/lib/python3.9/site-packages/bark/generation.py", line 369, in preloadmodels
= load_model(
File "/root/miniconda3/envs/bark-with-voice-clone/lib/python3.9/site-packages/bark/generation.py", line 322, in load_model
model = _load_model_f(ckpt_path, device)
File "/root/miniconda3/envs/bark-with-voice-clone/lib/python3.9/site-packages/bark/generation.py", line 228, in _load_model
model_args["input_vocab_size"] = model_args["vocab_size"]
KeyError: 'vocab_size'
test python script from bark import SAMPLE_RATE, generate_audio, preload_models from scipy.io.wavfile import write as write_wav
from IPython.display import Audio
download and load all models
preload_models(path="/data/mfsshare/models/bark")
generate audio from text
text_prompt = """ Hello, my name is Suno. And, uh - I like pizza. [laughs] But I also have other interests such as playing tic tac toe. """ audio_array = generate_audio(text_prompt)
save audio to disk
write_wav("bark_generation.wav", SAMPLE_RATE, audio_array)