RealtimeTTS
RealtimeTTS copied to clipboard
"Broken Pipe" eerror running the coqui_test.py
Hello. First of all, thank you so much for sharing this amazing library with all of us.
I've tried to run the Coqui Engine in my Macbook Pro M1 Max Chip, using the coqui_test.py file in the test directory, but received the following error: Do you know what could it be?
Thank you in advance.
/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
> Using model: xtts
Starting to play stream
Opening stream
XTTS Synthesizing: Hey guys! These here are realtime spoken sentences based on local text synthesis.
/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/TTS/tts/layers/xtts/stream_generator.py:138: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)
warnings.warn(
CoquiEngine: General synthesis error: isin() received an invalid combination of arguments - got (test_elements=int, elements=Tensor, ), but expected one of:
* (Tensor elements, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Number element, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Tensor elements, Number test_element, *, bool assume_unique, bool invert, Tensor out)
occured in synthesize worker thread of coqui engine.
ERROR:root:Error synthesizing text: Hey guys! These here are realtime spoken sentences based on local text synthesis.
Traceback: Traceback (most recent call last):
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/engines/coqui_engine.py", line 591, in _synthesize_worker
for i, chunk in enumerate(chunks):
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/torch/utils/_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/TTS/tts/models/xtts.py", line 652, in inference_stream
gpt_generator = self.gpt.get_generator(
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/TTS/tts/layers/xtts/gpt.py", line 603, in get_generator
return self.gpt_inference.generate_stream(
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/TTS/tts/layers/xtts/stream_generator.py", line 186, in generate
model_kwargs["attention_mask"] = self._prepare_attention_mask_for_generation(
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/transformers/generation/utils.py", line 473, in _prepare_attention_mask_for_generation
torch.isin(elements=inputs, test_elements=pad_token_id).any()
TypeError: isin() received an invalid combination of arguments - got (test_elements=int, elements=Tensor, ), but expected one of:
* (Tensor elements, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Number element, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Tensor elements, Number test_element, *, bool assume_unique, bool invert, Tensor out)
ERROR:root:Error: isin() received an invalid combination of arguments - got (test_elements=int, elements=Tensor, ), but expected one of:
* (Tensor elements, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Number element, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Tensor elements, Number test_element, *, bool assume_unique, bool invert, Tensor out)
WARNING:root:engine coqui failed to synthesize sentence "Hey guys! These here are realtime spoken sentences based on local text synthesis.", unknown error
Error: isin() received an invalid combination of arguments - got (test_elements=int, elements=Tensor, ), but expected one of:
* (Tensor elements, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Number element, Tensor test_elements, *, bool assume_unique, bool invert, Tensor out)
* (Tensor elements, Number test_element, *, bool assume_unique, bool invert, Tensor out)
WARNING:root:engine coqui is the only engine available, can't switch to another engine
WARNING:root:engine coqui failed to synthesize sentence "With a local, neuronal, cloned voice." with error:
Traceback: Traceback (most recent call last):
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/text_to_stream.py", line 343, in synthesize_worker
success = self.engine.synthesize(sentence)
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/engines/coqui_engine.py", line 793, in synthesize
status, result = self.parent_synthesize_pipe.recv()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 255, in recv
buf = self._recv_bytes()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 419, in _recv_bytes
buf = self._recv(4)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 388, in _recv
raise EOFError
EOFError
Error:
WARNING:root:engine coqui is the only engine available, can't switch to another engine
WARNING:root:engine coqui failed to synthesize sentence "So every spoken sentence sounds unique." with error: [Errno 32] Broken pipe
Traceback: Traceback (most recent call last):
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/text_to_stream.py", line 343, in synthesize_worker
success = self.engine.synthesize(sentence)
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/engines/coqui_engine.py", line 791, in synthesize
self.send_command('synthesize', data)
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/engines/coqui_engine.py", line 662, in send_command
self.parent_synthesize_pipe.send(message)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 211, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 416, in _send_bytes
self._send(header + buf)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 373, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe
Error: [Errno 32] Broken pipe
WARNING:root:engine coqui is the only engine available, can't switch to another engine
Traceback (most recent call last):
File "/Users/rtadewald/Library/Mobile Documents/com~apple~CloudDocs/Projetos/LangChain/Isaac Obsidian/fast_tts.py", line 45, in <module>
engine.shutdown()
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/engines/coqui_engine.py", line 912, in shutdown
self.send_command('shutdown', {})
File "/Users/rtadewald/Library/Python/3.9/lib/python/site-packages/RealtimeTTS/engines/coqui_engine.py", line 662, in send_command
self.parent_synthesize_pipe.send(message)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 211, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 416, in _send_bytes
self._send(header + buf)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 373, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe