Comments (15)
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:
0: Websocket error
1: HTTP error: 429 Too Many Requests
Location:
src\main.rs:79
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Could you help me?
from aspeak.
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:
Hi, @babykidp. What's the command you used and the relevant config entries(region
and endpoint
)?
You should use an official API endpoint instead of the default trial endpoint. For example, for eastus
region, you can run aspeak -r eastus -k YOUR_KEY text "Hello World"
.
from aspeak.
I use the command:
aspeak --profile MY_PROFILE text "Hello"
My profile looks like this:
[auth]
endpoint = "https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken"
region = "eastasia"
It‘s OK when I only run aspeak -r eastasia -k MY_KEY text "Hello World".
from aspeak.
And I met another error about endpoint:
Error:
0: TOML parse error at line 19, column 12
0: |
0: 19 | endpoint = "https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken"
0: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0: unknown variant https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken
, expected Endpoint
or Region
0:
Location:
src\cli\config.rs:64
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
When my profile is set up without endpoint, I met some other error:
[auth]
region = "eastasia"
Error:
0: Websocket error
1: HTTP error: 200 OK
Location:
src\main.rs:79
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
from aspeak.
[auth]
endpoint = "https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken"
region = "eastasia"
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 region
. The endpoint url setting will be used instead of the region setting if you specified both.
from aspeak.
And I met another error about endpoint:
Error: 0: TOML parse error at line 19, column 12 0: | 0: 19 | endpoint = "https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken" 0: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0: unknown variant
https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken
, expectedEndpoint
orRegion
0:Location: src\cli\config.rs:64
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets.
This should be a bug of aspeak. I will fix it.
from aspeak.
[auth]
endpoint = "https://eastasia.api.cognitive.microsoft.com/sts/v1.0/issuetoken"
region = "eastasia"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
region
. The endpoint url setting will be used instead of the region setting if you specified both.
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.
from aspeak.
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 https://
to wss://
as aspeak is using the websocket API.
There is a bug that caused the endpoint/region settings in profile ineffective. I will fix it soon.
from aspeak.
I see, thank you!
from aspeak.
@babykidp The region setting should now be effective with aspeak v4.3.1. Thanks for your error report.
from aspeak.
You're welcome. The new version works well now.
from aspeak.
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
https://
towss://
as aspeak is using the websocket API.There is a bug that caused the endpoint/region settings in profile ineffective. I will fix it soon.
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]
endpoint = "wss://eastasia.tts.speech.microsoft.com/cognitiveservices/v1"
region = "eastasia"
Error:
0: Websocket error
1: HTTP error: 404 Not Found
Location:
src\main.rs:79
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
from aspeak.
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] endpoint = "wss://eastasia.tts.speech.microsoft.com/cognitiveservices/v1" region = "eastasia"
Ah, it should be wss://eastasia.tts.speech.microsoft.com/cognitiveservices/websocket/v1
. There is a subtle difference between the REST API endpoint and the websocket API endpoint.
from aspeak.
Thank you for your help. I missed "websocket".
from aspeak.
The trial endpoint has been removed in v5.0.
from aspeak.
Related Issues (20)
- Error: 0: Websocket error 1: HTTP error: 200 OK HOT 2
- synthesized data returned by Microsoft save to wav file HOT 1
- hyper-0.14.25.crate: 1 vulnerabilities (highest severity is: 7.5) - autoclosed HOT 1
- Add an CLI arg to disable colored output HOT 1
- Add `audio` feature for crate HOT 2
- the free version may refer to this page:https://speech.microsoft.com/audiocontentcreation HOT 2
- Better error handling HOT 1
- Pass key/auth token via environment variable HOT 1
- Add support get voice list in lib HOT 1
- Question #19017 HOT 1
- No examples on v5.2.0 HOT 3
- Provide REST Mode HOT 3
- feat: batch processing API HOT 2
- tokio-tungstenite-0.19.0.crate: 4 vulnerabilities (highest severity is: 9.1) - autoclosed HOT 1
- reqwest-0.11.18.crate: 1 vulnerabilities (highest severity is: 5.5) - autoclosed HOT 1
- Python Binding: provide .pyi file
- colored-2.0.0.crate: 1 vulnerabilities (highest severity is: 9.8) - autoclosed HOT 1
- aspeak does not support python3.9 or above HOT 1
- Publish python wheels for apple silicon Macs HOT 1
- tokio-tungstenite-0.20.1.crate: 1 vulnerabilities (highest severity is: 7.5) - autoclosed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspeak.