edge-tts icon indicating copy to clipboard operation
edge-tts copied to clipboard

Upgraded to 6.1.14 version still doesn't work

Open wuzimi opened this issue 1 year ago • 1 comments

Successfully installed edge-tts-6.1.14

C:\Users\Administrator\Documents\GitHub\edge-tts-master>pip show edge-tts Name: edge-tts Version: 6.1.14 Summary: Microsoft Edge's TTS Home-page: https://github.com/rany2/edge-tts Author: rany Author-email: [email protected] License: Location: C:\Users\Administrator\miniconda3\Lib\site-packages Requires: aiohttp, certifi Required-by:

C:\Users\Administrator\Documents\GitHub\edge-tts-master>cd C:\Users\Administrator\Documents\GitHub\edge-tts-master\examples

C:\Users\Administrator\Documents\GitHub\edge-tts-master\examples>python test06.py Traceback (most recent call last): File "C:\Users\Administrator\Documents\GitHub\edge-tts-master\examples\test06.py", line 17, in asyncio.run(amain()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "C:\Users\Administrator\Documents\GitHub\edge-tts-master\examples\test06.py", line 13, in amain await communicate.save(OUTPUT_FILE) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\edge_tts\communicate.py", line 523, in save async for message in self.stream(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\edge_tts\communicate.py", line 506, in stream async for message in self.__stream(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\edge_tts\communicate.py", line 365, in __stream async with aiohttp.ClientSession( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client.py", line 1355, in aenter self._resp: _RetType = await self._coro File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client.py", line 949, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=af4ecb5170334e63a48953bb15e5d20b'

And here is the test code: ort asyncio

import edge_tts

TEXT = "Hello World!" VOICE = "en-GB-SoniaNeural" OUTPUT_FILE = "test.mp3"

async def amain() -> None: """Main function""" communicate = edge_tts.Communicate(TEXT, VOICE) await communicate.save(OUTPUT_FILE)

if name == "main": asyncio.run(amain())

wuzimi avatar Oct 20 '24 14:10 wuzimi

Could someone from mainland China also confirm this and help debug?

rany2 avatar Oct 20 '24 16:10 rany2

me too

21030304 avatar Oct 21 '24 02:10 21030304

Could someone from mainland China also confirm this and help debug?

I had the same problem in version 6.1.12, but when I upgraded to version 6.1.14 everything worked fine. What has been updated in this version to resolve this <WSServerHandshakeError: 403, message='Invalid response status' > issue?

changingshow avatar Oct 21 '24 02:10 changingshow

I noticed this point: Location: C:\Users\Administrator\miniconda3\Lib\site-packages, which is something I installed several days ago. So when I upgraded to the lasted version, it was installed under this folder. I removed miniiconda and reinstalled the package, the problem is solved. Thanks!

wuzimi avatar Oct 21 '24 02:10 wuzimi

yes me too

kryst5l avatar Oct 21 '24 07:10 kryst5l