TTS icon indicating copy to clipboard operation
TTS copied to clipboard

[Bug] 'dict_keys' object has no attribute 'keys'

Open KilmerGuazi opened this issue 1 year ago β€’ 1 comments

Describe the bug

exception happen in SpeakerManager().speaker_names()

error info: 'dict_keys' object has no attribute 'keys'

To Reproduce

tts = TTS(model_name="tts_models/multilingual/multi-dataset/xtts_v2").to(device) allSpeakers = tts.synthesizer.tts_model.speaker_manager.speaker_names()

Expected behavior

No response

Logs

AttributeError: 'dict_keys' object has no attribute 'keys'

Environment

{
    "CUDA": {
        "GPU": [],
        "available": false,
        "version": null
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.1.2",
        "TTS": "0.22.0",
        "numpy": "1.26.3"
    },
    "System": {
        "OS": "Darwin",
        "architecture": [
            "64bit",
            ""
        ],
        "processor": "i386",
        "python": "3.11.1",
        "version": "Darwin Kernel Version 22.6.0: Wed Oct  4 21:25:26 PDT 2023; root:xnu-8796.141.3.701.17~4/RELEASE_X86_64"
    }
}

Additional context

No response

KilmerGuazi avatar Jan 18 '24 06:01 KilmerGuazi

Hi, I've had this problem before and mentioned it in https://github.com/coqui-ai/TTS/issues/3434#issuecomment-1871181181.

You can temporarily get the return value with the following code list(tts.synthesizer.tts_model.speaker_manager.name_to_id).

And I've submitted a merge request #3487, but no one seems to be maintaining the program now.

imkasen avatar Jan 28 '24 09:01 imkasen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

stale[bot] avatar Mar 01 '24 05:03 stale[bot]

I've fixed this in our fork: https://github.com/idiap/coqui-ai-TTS

eginhard avatar Apr 08 '24 14:04 eginhard