coqui-ai / TTS

🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production
http://coqui.ai
Mozilla Public License 2.0
31.64k stars 3.78k forks source link

[Bug] xtts_v2, AttributeError: 'TTS' object has no attribute 'speakers' #3742

Closed chigkim closed 1 month ago

chigkim commented 1 month ago

Describe the bug

If I run tts.speakers after loading xtts_v2, it throws an error: 'TTS' object has no attribute 'speakers'.

To Reproduce

import torch from TTS.api import TTS device = "cuda" if torch.cuda.is_available() else "cpu" model = "tts_models/multilingual/multi-dataset/xtts_v2" tts = TTS(model).to(device) tts.speakers

Expected behavior

It should list all the speaker names.

Logs

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>.venv\Lib\site-packages\torch\nn\modules\module.py", line 1709, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'TTS' object has no attribute 'speakers'

Environment

{
    "CUDA": {
        "GPU": [],
        "available": false,
        "version": null
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.3.0+cpu",
        "TTS": "0.22.0",
        "numpy": "1.26.4"
    },
    "System": {
        "OS": "Windows",
        "architecture": [
            "64bit",
            "WindowsPE"
        ],
        "processor": "Intel64 Family 6 Model 94 Stepping 3, GenuineIntel",
        "python": "3.11.9",
        "version": "10.0.19045"
    }
}

Additional context

Other multi speaker models like vctk/vits work fine using the same method.

eginhard commented 1 month ago

This is fixed by https://github.com/eginhard/coqui-tts/pull/8 in our fork, available via pip install coqui-tts

chigkim commented 1 month ago

Thanks@eginhard! Had no idea this repo was abandoned.

jamesob commented 3 weeks ago

Thanks @eginhard. This repo should probably be marked as read-only/archive by its owners.