You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed aspeak and tried the sample code, e.g.:
service = aspeak.SpeechService(
region=SPEECH_REGION,
key=get_key()
)
print(ssml)
service.speak_ssml(ssml)
I get this error:
$ python3 tts_microsoft.py
<speak>Olá crianças! Como se sentem? Eu sinto-me contente.</speak>
Traceback (most recent call last):
File "~/tts_microsoft.py", line 150, in synth
service.speak_ssml(ssml)
OSError: unified synthesizer error: an invalid request is constructed or 400 status reported by the server
Caused by:
0: rest synthesizer error: an invalid request is constructed or 400 status reported by the server
1: HTTP status client error (400 Bad Request) for url (https://westeurope.tts.speech.microsoft.com/cognitiveservices/v1)
Location:
src/synthesizer/unified.rs:60:62
I get the same error if I use .synthesize_ssml, with or without the output argument.
How can I fix this error and run Microsoft's text-to-speech with aspeak and REST?
The text was updated successfully, but these errors were encountered:
Correct! Once I fixed the SSML to Microsoft's standards, instead of generic SSML, it worked. Thanks! For reference, this SSML failed:
<speak>Olá crianças! Como se sentem? Eu sinto-me contente.</speak>
This SSML worked:
<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='https://www.w3.org/2001/mstts' xml:lang='pt-pt'><voice name='pt-PT-RaquelNeural'>Olá crianças! Como se sentem? Eu sinto-me contente.</voice></speak>
I found this package by chance. I was using the official Python SDK, but out of nowhere it started failing with an OpenSSL issue unsolved for 8 months, also referenced here. The first issue suggests:
I think at this point your best bet is trying to migrate to the Azure Cognitive Services REST API, as Microsoft clearly has no interest or resources in maintaining the native SDK anymore.
I hope this helps someone find this package too. Thanks @kxxt for sharing this great piece of work and making my day!
I've been using the Python SDK, but due to Azure-Samples/cognitive-services-speech-sdk#2204 and Azure-Samples/cognitive-services-speech-sdk#2048, I am moving to REST.
I installed
aspeak
and tried the sample code, e.g.:I get this error:
I get the same error if I use
.synthesize_ssml
, with or without theoutput
argument.How can I fix this error and run Microsoft's text-to-speech with
aspeak
and REST?The text was updated successfully, but these errors were encountered: