Git Product home page Git Product logo

Comments (15)

babykidp avatar babykidp commented on June 22, 2024

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.

kxxt avatar kxxt commented on June 22, 2024

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.

babykidp avatar babykidp commented on June 22, 2024

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.

babykidp avatar babykidp commented on June 22, 2024

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.

kxxt avatar kxxt commented on June 22, 2024

[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.

kxxt avatar kxxt commented on June 22, 2024

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.

This should be a bug of aspeak. I will fix it.

from aspeak.

babykidp avatar babykidp commented on June 22, 2024

[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.

kxxt avatar kxxt commented on June 22, 2024

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.

babykidp avatar babykidp commented on June 22, 2024

I see, thank you!

from aspeak.

kxxt avatar kxxt commented on June 22, 2024

@babykidp The region setting should now be effective with aspeak v4.3.1. Thanks for your error report.

from aspeak.

babykidp avatar babykidp commented on June 22, 2024

You're welcome. The new version works well now.

from aspeak.

babykidp avatar babykidp commented on June 22, 2024

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.

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.

kxxt avatar kxxt commented on June 22, 2024

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.

babykidp avatar babykidp commented on June 22, 2024

Thank you for your help. I missed "websocket".

from aspeak.

kxxt avatar kxxt commented on June 22, 2024

The trial endpoint has been removed in v5.0.

from aspeak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.