-
Notifications
You must be signed in to change notification settings - Fork 57
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
WebsocketError with ErrorCode 429 #56
Comments
Hi, I registered an Azure account and used aspeak with my subscription key. But I constantly hit some similar errors when I used my configuration file: Error: Location: Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Could you help me? |
Hi, @babykidp. What's the command you used and the relevant config entries( You should use an official API endpoint instead of the default trial endpoint. For example, for |
I use the command: My profile looks like this: [auth] It‘s OK when I only run aspeak -r eastasia -k MY_KEY text "Hello World". |
And I met another error about endpoint: Error: Location: Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. When my profile is set up without endpoint, I met some other error: Error: Location: Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. |
The endpoint url should be something like "wss://eastus.api.speech.microsoft.com/cognitiveservices/websocket/v1". You don't need to specify endpoint url if you have specified |
This should be a bug of aspeak. I will fix it. |
My Azure Keys and Endpoint page shows the endpoint as: https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken. That's different from the default endpoint. |
The endpoint url in aspeak config is not the issuetoken API url. A list of TTS endpoints can be found at https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech?tabs=streaming#prebuilt-neural-voices . And you need to change There is a bug that caused the endpoint/region settings in profile ineffective. I will fix it soon. |
I see, thank you! |
You're welcome. The new version works well now. |
I found some new error. No matter whether I set the region or not, once I set the endpoint as your guide, a new error occurs. The new version works well when I only specify region. [auth] Error: Location: Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. |
Ah, it should be |
Thank you for your help. I missed "websocket". |
The trial endpoint has been removed in v5.0. |
The free trial API is heavily rate limited by Microsoft.
If you are constantly hitting this with an error code 429, please consider registering an Azure account and use aspeak with an azure subscription key. (There is a free tier)
Or you can try to use the edge tts endpoint which comes with fewer features(You need at least aspeak v4.2.0). You can figure out what options are needed by looking at
edge-tts
's code:The text was updated successfully, but these errors were encountered: