-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Cannot use xtts on CPU #2980
Comments
Observe the same error running tts from command line:
|
Did you find any fix? |
Did you find any fix? |
The same issue was seen with Ubuntu 22.04.3 LTS running on an 5th gen Intel i7 with no GPU (error: 'Attempting to deserialize object on a CUDA ') with the python file shown at https://github.com/coqui-ai/TTS/#running-a-multi-speaker-and-multi-lingual-model in a venv. python3 --version pip3 --version pip3 install TTS # this would not run with CPU only However, using https://github.com/coqui-ai/TTS/pkgs/container/tts-cpu with docker runs fine: sudo docker pull ghcr.io/coqui-ai/tts-cpu:da8b6bbce1040ce8a4a58b959faec14e969294a0 This page explains how to start tts-cpu: https://tts.readthedocs.io/en/latest/docker_images.html#id4 After starting the docker image and then the server.py app, the TTS server can be seen at: http://[::1]:5002/ |
So does XTTS run fine on Linux systems with docker installed and tts-cpu? Can you share the exact commands or script you used to run the model successfully using tts-cpu? |
You need a reference wav file. Please see the docs. |
Explain more |
read more |
Actually it loads the model now on cpu but it has the Voicebpetokenizer attribute error when trying to clone voices |
Yes, I the following code with Thanks. |
This behavior should not be encouraged. If you don't wanna answer, don't. Why sabotage the potential for others to answer? |
Describe the bug
I use the following script to generate speech with xtts, but find that xtts cannot load to cpu.
Then I set
map_location="cpu"
on/home/a/miniconda3/envs/llm/lib/python3.9/site-packages/TTS/utils/io.py
.After that I get:
Then I add
to
/home/a/miniconda3/envs/llm/lib/python3.9/site-packages/TTS/api.py
line 108.Run the original scripts, then
Can you help to fix this issue? Thanks a lot!!!
To Reproduce
from TTS.api import TTS
import time
text = "游客可以登上观光球,欣赏上海全景和周边美景;或者在空中庭院中欣赏美景,感受大自然的气息;或者在旋转餐厅中品尝美食,享受美味与旋转的乐趣"
tts_model = TTS(model_path="./xtts_v1/", config_path="./xtts_v1/config.json", progress_bar=True, gpu=False)
#tts_model = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v1", progress_bar=True, gpu=False)
#print("tts.is_multi_lingual", tts_model.is_multi_lingual)
print("tts_model: ", tts_model)
t1 = time.time()
tts_model.tts_to_file(text.replace("\n",",").replace(" ","")+"。", language="zh-cn", file_path="audio_out.wav")
print("cost time: ", time.time()-t1)
Expected behavior
No response
Logs
No response
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: