question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] typo in \TTS\tts\utils\text\punctuation.py, lines 140 and 151 reference attribute "punc" incorrectly as "mark"

See original GitHub issue

Describe the bug

\TTS\tts\utils\text\punctuation.py, line 140, this only gets called when the synthesizer is told to speak a string that only consists of punctuation marks, you get the error
File “F:\TTS Adventures\coqui\coqui39\lib\site-packages\TTS\tts\utils\text\punctuation.py”, line 140, in <genexpr> return [“”.join(m.mark for m in puncs)] AttributeError: ‘_punc_index’ object has no attribute ‘mark’

I also notice the same typo is in line 150. Poked around, looks like line 9 says _PUNC_IDX = collections.namedtuple(“_punc_index”, [“punc”, “position”]) and neither of those words are “mark”.

I’d do the fix myself but I’ve literally never requested to change a respository on github before in my life and it’s 1am local as I type this. Well, I mean, I did the fix myself on my machine, and it worked.

To Reproduce

image I ran specifically the following model, where “words” was the string “!?!?!?!?!?!” or something like that to reproduce the error just now for the screenshot.

model_path, config_path, model_item = manager.download_model(“tts_models/en/vctk/vits”) synthesizer = Synthesizer( tts_checkpoint=model_path, tts_config_path=config_path, #tts_speakers_file=speakers_file_path, tts_languages_file=None, #vocoder_checkpoint=vocoder_path, #vocoder_config=vocoder_config_path, encoder_checkpoint=“”, encoder_config=“”, use_cuda=True, ) wavs = synthesizer.tts(words, speaker_name=“p311”, style_wav=None) out = Path(file).parent/out_path synthesizer.save_wav(wavs, out)

Expected behavior

No response

Logs

No response

Environment

{
    "CUDA": {
        "GPU": [
            "NVIDIA GeForce RTX 3090"
        ],
        "available": true,
        "version": "11.6"
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "1.12.0+cu116",
        "TTS": "0.6.2",
        "numpy": "1.19.5"
    },
    "System": {
        "OS": "Windows",
        "architecture": [
            "64bit",
            "WindowsPE"
        ],
        "processor": "Intel64 Family 6 Model 158 Stepping 9, GenuineIntel",
        "python": "3.9.13",
        "version": "10.0.19044"
    }
}

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ShayBoxcommented, Aug 23, 2022

Yep that fixed it 👍

1reaction
erogolcommented, Aug 22, 2022

@WeberJulian Can you check this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] typo in \TTS\tts\utils\text\punctuation.py, lines 140 and ...
[Bug] typo in \TTS\tts\utils\text\punctuation.py, lines 140 and 151 reference attribute "punc" incorrectly as "mark"
Read more >
1492120 – InvalidTemplateAttribute: The Referenced Attribute ...
Bug 1492120 - InvalidTemplateAttribute: The Referenced Attribute (Compute attributes) is incorrect while scaling out the overcloud.
Read more >
Why am I getting AttributeError: Object has no attribute? [closed]
Your indentation is goofed, and you've mixed tabs and spaces. Run the script with python -tt to verify.
Read more >
Python: AttributeError - GeeksforGeeks
AttributeError can be defined as an error that is raised when an attribute reference or assignment fails. For example, if we take a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found