Migushthe2nd / MsEdgeTTS

A simple Azure Speech Service module that uses the Microsoft Edge Read Aloud API
https://migushthe2nd.github.io/MsEdgeTTS/
MIT License
285 stars 40 forks source link

reuse a wss connection #6

Closed fastfading closed 1 year ago

fastfading commented 1 year ago

How to reuse a wss connection? It takes a lot of time to connect to wss every time. Is it possible to use the same wss for multiple tts requests?

Migushthe2nd commented 1 year ago

The connection should stay open by default, although Microsoft closes the connection after some time it no requests are made.

fastfading commented 1 year ago

have you try send 2 text in one wss connection? it seems it does not get response. and after while , connection closed

Migushthe2nd commented 1 year ago

Hi, could you try out the latest version of the module? The websocket library was changed so this issue might have been resolved. If the issue still persists please let me know.