Trying to use Coqui tts-server on docker...

#5
by wpiman - opened

So I am using Coqui TTS to make announcements in our house via Chromecast mini around the house. Car in coming up the driveway, mailbox opened, etc....

I am currently using these voices from BAJ-TTS. The David Attenborough is a family favorite. Divided on Trump.

https://huggingface.co/enlyth/baj-tts/tree/main/models

I'd love to pull this one in.. but I am having issues. I run on Docker. I expanded the finished Models, and basically ran the tts-server pointing to the expanded directory.

I will say I am not using CUDA as I am just using inference and the text is small. I am wondering if that is my issue.

root@2250fad1bc86:/models/Saul# tts-server --model_path /models/Saul/model.pth --config_path /models/Saul/config.json

Using model: xtts
Traceback (most recent call last):
File "/usr/local/bin/tts-server", line 5, in
from TTS.server.server import main
File "/root/TTS/server/server.py", line 104, in
synthesizer = Synthesizer(
File "/root/TTS/utils/synthesizer.py", line 93, in init
self._load_tts(tts_checkpoint, tts_config_path, use_cuda)
File "/root/TTS/utils/synthesizer.py", line 192, in _load_tts
self.tts_model.load_checkpoint(self.tts_config, tts_checkpoint, eval=True)
File "/root/TTS/tts/models/xtts.py", line 771, in load_checkpoint
checkpoint = self.get_compatible_checkpoint_state_dict(model_path)
File "/root/TTS/tts/models/xtts.py", line 714, in get_compatible_checkpoint_state_dict
checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"))["model"]
File "/root/TTS/utils/io.py", line 46, in load_fsspec
with fsspec.open(
File "/usr/local/lib/python3.10/site-packages/fsspec/core.py", line 103, in enter
f = self.fs.open(self.path, mode=mode)
File "/usr/local/lib/python3.10/site-packages/fsspec/implementations/cached.py", line 436, in
return lambda *args, **kw: getattr(type(self), item).get(self)(
File "/usr/local/lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open
f = self._open(
File "/usr/local/lib/python3.10/site-packages/fsspec/implementations/cached.py", line 436, in
return lambda *args, **kw: getattr(type(self), item).get(self)(
File "/usr/local/lib/python3.10/site-packages/fsspec/implementations/cached.py", line 675, in _open
fn = self._make_local_details(path)
File "/usr/local/lib/python3.10/site-packages/fsspec/implementations/cached.py", line 436, in
return lambda *args, **kw: getattr(type(self), item).get(self)(
File "/usr/local/lib/python3.10/site-packages/fsspec/implementations/cached.py", line 598, in _make_local_details
"uid": self.fs.ukey(path),
File "/usr/local/lib/python3.10/site-packages/fsspec/spec.py", line 1334, in ukey
return sha256(str(self.info(path)).encode()).hexdigest()
File "/usr/local/lib/python3.10/site-packages/fsspec/implementations/local.py", line 83, in info
out = os.stat(path, follow_symlinks=False)
NotADirectoryError: [Errno 20] Not a directory: '/models/Saul/model.pth/model.pth'

no idea,

But it doesn't look like your passing the correct path,

instead of being pointed at /models/Saul/model.pth it seems to be pointed at /models/Saul/model.pth/model.pth

make sure your providing a ref wav too

details on loading custom xtts models from coqui here

https://docs.coqui.ai/en/latest/models/xtts.html#id5

Sign up or log in to comment