Code Monkey home page Code Monkey logo

Comments (16)

kxxt avatar kxxt commented on August 24, 2024

It's an issue on microsoft's side. Neither aspeak or the web page is working for me.

image

The web page no longer contains the token. That's why the functionality is broken now.

from aspeak.

Funktionar avatar Funktionar commented on August 24, 2024

Is there another way?

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

It seems microsoft side is normal now. But they have changed the place where the token is stored. A fix is on the way.

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

The good news is that microsoft side no longer requires an auth token.

But I don't know whether they have downgraded the free services. There is a TrafficType: AzureDemo header in the request now.

image

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

I have got it working now. A new version of aspeak will be published soon to address this issue.

from aspeak.

Ivyhuangshiming avatar Ivyhuangshiming commented on August 24, 2024

Thanks a lot!

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

I have uploaded a preview version (3.0.0.dev1) to pypi. You can use it if you can't wait. 🎉

pip install aspeak==3.0.0.dev1

I updated the major version since the change introduced on microsoft side caused some breaking changes to aspeak API.

I will publish a stable version after some refactors and testings.

from aspeak.

Funktionar avatar Funktionar commented on August 24, 2024

Could you include an example without token being used also?

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

Could you include an example without token being used also?

Currently the old examples still works. They don't depend on the token retrieval logic directly.Instead, the code that depends on Token or get_auth_token directly will break now

I will rewrite a cleaner API for v3.0 while keeping the old ones(marked as obsolete).

from aspeak.

Funktionar avatar Funktionar commented on August 24, 2024

The examples work well but it takes more time to get the audio, can I instead infer straight to speechsdk.SpeechSynthesizer instead of speechprovider? Could you give me an example?

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

The examples work well but it takes more time to get the audio, can I instead infer straight to speechsdk.SpeechSynthesizer instead of speechprovider? Could you give me an example?

Yes. SpeechProvider is a useless layer of abstraction now because we no longer need to refresh the token. A new API will arrive in v3.0.

You can read the code yourself and figure out how to do it if you can't wait until v3.0 is released.

from aspeak.

ganjunhong avatar ganjunhong commented on August 24, 2024

If the text exceeds 300 words, it will fail

The examples work well but it takes more time to get the audio, can I instead infer straight to speechsdk.SpeechSynthesizer instead of speechprovider? Could you give me an example?

Yes. SpeechProvider is a useless layer of abstraction now because we no longer need to refresh the token. A new API will arrive in v3.0.

You can read the code yourself and figure out how to do it if you can't wait until v3.0 is released.

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

If the text exceeds 300 words, it will fail

Did you encounter this specific error?

Error: Speech synthesis canceled: CancellationReason.Error
WebSocket operation failed. Internal error: 3. Error details: WS_ERROR_UNDERLYING_IO_ERROR USP state: 4. Received audio size: 2058600 bytes.

It seems that microsoft has downgraded the free services and they force the websocket to stop when 2058600 bytes of audio is received.

Edit: Microsoft includes a new notice on the web page: This demo supports a maximum input length of 1000 characters.

from aspeak.

ganjunhong avatar ganjunhong commented on August 24, 2024

If the text exceeds 300 words, it will fail

Did you encounter this specific error?

Error: Speech synthesis canceled: CancellationReason.Error
WebSocket operation failed. Internal error: 3. Error details: WS_ERROR_UNDERLYING_IO_ERROR USP state: 4. Received audio size: 2058600 bytes.

It seems that microsoft has downgraded the free services and they force the websocket to stop when 2058600 bytes of audio is received.

Edit: Microsoft includes a new notice on the web page: This demo supports a maximum input length of 1000 characters.

It would be perfect if it could help users automatically segment text and audio combinations.
For example, Chinese characters can be 200 characters.

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

It would be perfect if it could help users automatically segment text and audio combinations. For example, Chinese characters can be 200 characters.

I don't think segmenting the text is aspeak's responsibility. There are too many languages, and simply segmenting text by 200 characters will produce bad results if the first/last sentence is cut in the middle.

from aspeak.

kxxt avatar kxxt commented on August 24, 2024

Closing this because v3.0.0 fixed it.

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.