OpenVoiceOS / ovos-tts-plugin-polly

Apache License 2.0
0 stars 2 forks source link

Invalid SSML request #2

Open goldyfruit opened 9 months ago

goldyfruit commented 9 months ago

I guess the error is due to mɔ̃ʁeal.

Feb 06 22:07:01 rpi4b03 ovos-audio[850]: 2024-02-06 22:07:01.966 - audio - ovos_audio.service:execute_tts:344 - INFO - Speak: Montreal (CA:   MUN-tree-AWL; French: Montréal [mɔ̃ʁeal] ) is the second most populous city in Canada, the tenth most populous city in North America, and the most populous city in the province of Quebec.
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: 2024-02-06 22:07:02.004 - audio - ovos_audio.service:execute_tts:350 - ERROR - TTS synth failed! An error occurred (InvalidSsmlException) when calling the SynthesizeSpeech operation: Invalid SSML request
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: Traceback (most recent call last):
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_audio/service.py", line 347, in execute_tts
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     self.tts.execute(utterance, ident, listen,
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_plugin_manager/templates/tts.py", line 490, in execute
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     self._execute(sentence, ident, listen, **kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_plugin_manager/templates/tts.py", line 516, in _execute
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     audio_file, phonemes = self.synth(sentence, **kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_plugin_manager/templates/tts.py", line 576, in synth
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     audio.path, phonemes = self.get_tts(sentence, str(audio), **kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_tts_plugin_polly/__init__.py", line 46, in get_tts
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     response = self.polly.synthesize_speech(
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/botocore/client.py", line 553, in _api_call
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     return self._make_api_call(operation_name, kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/botocore/client.py", line 1009, in _make_api_call
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     raise error_class(parsed_response, operation_name)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: botocore.errorfactory.InvalidSsmlException: An error occurred (InvalidSsmlException) when calling the SynthesizeSpeech operation: Invalid SSML request
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: 2024-02-06 22:07:02.012 - audio - ovos_audio.service:execute_fallback_tts:384 - ERROR - 'NoneType' object has no attribute 'execute'
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: 2024-02-06 22:07:02.014 - audio - ovos_audio.service:execute_fallback_tts:385 - ERROR - TTS FAILURE! utterance : Montreal (CA:   MUN-tree-AWL; French: Montréal [mɔ̃ʁeal] ) is the second most populous city in Canada, the tenth most populous city in North America, and the most populous city in the province of Quebec.
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: Traceback (most recent call last):
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_audio/service.py", line 347, in execute_tts
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     self.tts.execute(utterance, ident, listen,
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_plugin_manager/templates/tts.py", line 490, in execute
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     self._execute(sentence, ident, listen, **kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_plugin_manager/templates/tts.py", line 516, in _execute
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     audio_file, phonemes = self.synth(sentence, **kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_plugin_manager/templates/tts.py", line 576, in synth
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     audio.path, phonemes = self.get_tts(sentence, str(audio), **kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_tts_plugin_polly/__init__.py", line 46, in get_tts
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     response = self.polly.synthesize_speech(
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/botocore/client.py", line 553, in _api_call
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     return self._make_api_call(operation_name, kwargs)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/botocore/client.py", line 1009, in _make_api_call
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     raise error_class(parsed_response, operation_name)
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: botocore.errorfactory.InvalidSsmlException: An error occurred (InvalidSsmlException) when calling the SynthesizeSpeech operation: Invalid SSML request
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: During handling of the above exception, another exception occurred:
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: Traceback (most recent call last):
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_audio/service.py", line 380, in execute_fallback_tts
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     tts.execute(utterance, ident, listen,
Feb 06 22:07:02 rpi4b03 ovos-audio[850]:     ^^^^^^^^^^^
Feb 06 22:07:02 rpi4b03 ovos-audio[850]: AttributeError: 'NoneType' object has no attribute 'execute'
goldyfruit commented 1 month ago

Got something similar when \n was in the sentence with wikihow skill when asking "how to build a space rocket".

Oct 21 19:16:27 x270.home.lan ovos-audio[607446]: 2024-10-21 19:16:27.975 - audio - ovos_audio.service:execute_tts:384 - INFO - Speak: You’re never too young to be an astronaut! You might not be making a trip to the moon for a few more years, but you can launch your very own rocket right in your backyard. We’ll show you how to build and launch a simple bottle rocket out of supplies you have at home. Then, we’ll show you how to make a slightly more advanced rocket that’ll fly even higher. Put on your safety goggles and prepare for liftoff!
Oct 21 19:16:27 x270.home.lan ovos-audio[607446]: {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/e\/e6\/Build-a-Bottle-Rocket-Step-11-Version-5.jpg\/v4-460px-Build-a-Bottle-Rocket-Step-11-Version-5.jpg","bigUrl":"\/images\/thumb\/e\/e6\/Build-a-Bottle-Rocket-Step-11-Version-5.jpg\/v4-728px-Build-a-Bottle-Rocket-Step-11-Version-5.jpg","smallWidth":460,"smallHeight":259,"bigWidth":728,"bigHeight":410,"licensing":"<div class=\"mw-parser-output\"><p>\u00a9 2024 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is <b>not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.<br>\n<\/p><p><br \/>\n<\/p><\/div>"}
Oct 21 19:16:27 x270.home.lan ovos-audio[607446]: 2024-10-21 19:16:27.976 - audio - ovos_plugin_manager.templates.tts:_get_ctxt:595 - DEBUG - TTS kwargs: {'lang': 'en-US', 'voice': 'Matthew'}
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]: 2024-10-21 19:16:28.159 - audio - ovos_audio.service:execute_tts:390 - ERROR - TTS synth failed! An error occurred (InvalidSsmlException) when calling the SynthesizeSpeech operation: Invalid SSML request
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]: Traceback (most recent call last):
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/ovos_audio/service.py", line 387, in execute_tts
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     self.tts.execute(utterance, ident, listen,
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/ovos_plugin_manager/templates/tts.py", line 542, in execute
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     self._execute(sentence, ident, listen, **kwargs)
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/ovos_plugin_manager/templates/tts.py", line 626, in _execute
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     audio_file, phonemes = self.synth(sentence, ctxt)
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/ovos_plugin_manager/templates/tts.py", line 672, in synth
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     audio.path, phonemes = self.get_tts(sentence, str(audio),
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/ovos_tts_plugin_polly/__init__.py", line 73, in get_tts
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     response = self.polly.synthesize_speech(
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/botocore/client.py", line 569, in _api_call
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     return self._make_api_call(operation_name, kwargs)
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:   File "/home/goldyfruit/.venvs/ovos/lib64/python3.12/site-packages/botocore/client.py", line 1023, in _make_api_call
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]:     raise error_class(parsed_response, operation_name)
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]: botocore.errorfactory.InvalidSsmlException: An error occurred (InvalidSsmlException) when calling the SynthesizeSpeech operation: Invalid SSML request
Oct 21 19:16:28 x270.home.lan ovos-audio[607446]: 2024-10-21 19:16:28.160 - audio - ovos_audio.service:execute_fallback_tts:420 - ERROR - No fallback TTS available and main TTS failed!