Skip to content
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

CoquiEngine throws Exception #227

Open
SickMain opened this issue Dec 7, 2024 · 2 comments
Open

CoquiEngine throws Exception #227

SickMain opened this issue Dec 7, 2024 · 2 comments

Comments

@SickMain
Copy link

SickMain commented Dec 7, 2024

While im trying using CoquiEngine i get next Exception:

CoquiEngine: General synthesis error: 'Tensor' object has no attribute '_pad_token_tensor' occured in synthesize worker thread of coqui engine.

ERROR:root:Error synthesizing text: Hello world!
ERROR:root:Error: 'Tensor' object has no attribute '_pad_token_tensor'
Traceback: Traceback (most recent call last):
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\RealtimeTTS\engines\coqui_engine.py", line 718, in _synthesize_worker
for i, chunk in enumerate(chunks):
^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\torch\utils_contextlib.py", line 36, in generator_context
response = gen.send(None)
^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\TTS\tts\models\xtts.py", line 659, in inference_stream
gpt_generator = self.gpt.get_generator(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\TTS\tts\layers\xtts\gpt.py", line 606, in get_generator
return self.gpt_inference.generate_stream(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\TTS\tts\layers\xtts\stream_generator.py", line 208, in generate
model_kwargs["attention_mask"] = self._prepare_attention_mask_for_generation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\transformers\generation\utils.py", line 585, in _prepare_attention_mask_for_generation
pad_token_id = generation_config._pad_token_tensor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Tensor' object has no attribute '_pad_token_tensor'
WARNING:root:engine coqui failed to synthesize sentence "Hello world!", unknown error

Error: 'Tensor' object has no attribute '_pad_token_tensor'
WARNING:root:engine coqui is the only engine available, can't switch to another engine
WARNING:root:engine coqui failed to synthesize sentence "How are you today?" with error:
Traceback: Traceback (most recent call last):
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\multiprocessing\connection.py", line 328, in _recv_bytes
nread, err = ov.GetOverlappedResult(True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [WinError 109] Канал был закрыт

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\RealtimeTTS\text_to_stream.py", line 407, in synthesize_worker
success = self.engine.synthesize(sentence)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\site-packages\RealtimeTTS\engines\coqui_engine.py", line 941, in synthesize
status, result = self.parent_synthesize_pipe.recv()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\multiprocessing\connection.py", line 250, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "C:\Users\user\anaconda3\envs\Qoukie\Lib\multiprocessing\connection.py", line 337, in _recv_bytes
raise EOFError
EOFError

Error:
WARNING:root:engine coqui is the only engine available, can't switch to another engine

@KoljaB
Copy link
Owner

KoljaB commented Dec 7, 2024

I can confirm this issue. It looks like the Coqui TTS installation is broken (this isn’t the first time we’ve seen similar problems). Fortunately, Idiap has already provided a fix. I’ll update the repository to the latest version soon to resolve this.

@KoljaB
Copy link
Owner

KoljaB commented Dec 7, 2024

Fixed now in v0.4.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants