-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 error is back/need to implement Sec-MS-GEC token #290
Comments
Are you using 6.1.15? |
pip show edge-tts [17:54:01] |
升级即可: |
解决了,谢谢您! |
今天发现有同样的问题报错 然后升级了 现在还是同样的报错哎 |
@yixian3500 unfortunately these blocks are only mainland China, I don't have access to a proxy that's in mainland china so I can't assist a lot. I ask, can you try to change the user agent to see if the blocks are still user agent based? It's interesting because if it really is user agent based, then this means they're also blocking users that use the latest Edge browser. |
That is, unless there is another criteria they're using to prevent blocks on legitimate Edge Browser. If they actually are then it needs to be examined what the criteria is. |
I'm sorry how to change the user agent? |
It's in constants.py :) |
what user agent need to change? It doesn't work. |
I used a proxy, but the problem still persists |
When I turn on the proxy and change the IP, it can work normally |
Could you please share? |
@rany2 The reading feature in the EDGE browser works, but edge-tts does not, returning a 403 status. It is already the latest version. |
open ur proxy ,change ur code for tts ,communicate = edge_tts.Communicate(content,proxy="http://127.0.0.1:port") |
even through i can solved this problem by using proxy, but i hope find a way to using tts without proxy |
用了翻墙软件。。。 |
I hope too |
I hope too too,how to dealwith this probrem |
However, it seems to be unstable, sometimes working normally and sometimes resulting in a 403 error. |
您好,邮件已收到,我将在阅读邮件后,尽快给您回复!
|
Same question! Has collapsed.. |
Same issue |
same issue |
Same issue |
@rany2 |
Nice job bro! |
Good people should be rewarded. |
It can' t work in China again. |
03,message='Invalid |
我刚刚试了,我的好像还可以用 |
aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&Sec-MS-GEC=951A6D4FD7C99AF5EC48E4FB4E35AFF9925812CEA2729B447D9A772AF4CEBC51&Sec-MS-GEC-Version=1-132.0.2917.0&ConnectionId=b7ebe8510d3348f59828a7abde6d9e81' |
it works again. it seems it isn't stable.
获取Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: HTYpig ***@***.***>
Sent: Monday, November 11, 2024 10:32:00 AM
To: rany2/edge-tts ***@***.***>
Cc: zhongtanru ***@***.***>; Comment ***@***.***>
Subject: Re: [rany2/edge-tts] 403 error is back/need to implement Sec-MS-GEC token (Issue #290)
aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&Sec-MS-GEC=951A6D4FD7C99AF5EC48E4FB4E35AFF9925812CEA2729B447D9A772AF4CEBC51&Sec-MS-GEC-Version=1-132.0.2917.0&ConnectionId=b7ebe8510d3348f59828a7abde6d9e81'
我的也是无法使用呢,已更新版本到6.1.17了python版本为3.11
―
Reply to this email directly, view it on GitHub<#290 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A72PW5LANY2LGSSOPEA76XD2AAJKBAVCNFSM6AAAAABQS47KCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRXGEYTGNBWGU>.
You are receiving this because you commented.Message ID: ***@***.***>
|
If it is only unavailable on the Chinese server, can it be used directly through the intermediate proxy of the Japanese mirror or the reverse proxy through the clash of the Chinese server? |
I have gotten Error generating speech: 403, message='Invalid response status', seems it banned our chinese ip? |
I can't reproduce on 6.1.17. Do you have an accurate clock? |
If people don't have an accurate clock, I should be able to adjust it on retry by checking the Date header. |
Should be fixed by #309 |
edge-tts version 6.1.18 was released with this fix for clock skew. |
非常感谢,已经成功生成了 |
Sorry, i update the lastest version, now it work! |
This comment was marked as off-topic.
This comment was marked as off-topic.
it can't work after updating v6.1.19 |
@zhongtanru I think it's an issue with your packaging, you might be bundling an outdated edge-tts version somehow. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I reinstall windows and python ,but it does work, the same py , the same exe.
获取Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
发件人: Rany ***@***.***>
发送时间: 星期六, 十一月 23, 2024 1:18:09 上午
收件人: rany2/edge-tts ***@***.***>
抄送: zhongtanru ***@***.***>; Mention ***@***.***>
主题: Re: [rany2/edge-tts] 403 error is back/need to implement Sec-MS-GEC token (Issue #290)
@zhongtanru<https://github.com/zhongtanru> I think it's an issue with your packaging, you might be bundling an outdated edge-tts version somehow.
―
Reply to this email directly, view it on GitHub<#290 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A72PW5OEGH3W535K6LPGGKL2B5RM3AVCNFSM6AAAAABQS47KCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJUGMZDSNRWGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Report it to pyinstaller maybe, you've already mentioned that the non-packaged variant doesn't have any issues. |
I have solved this problem. These codes are not packed by pyinstaller:
if getattr(sys, 'frozen', False):
current_directory = sys._MEIPASS
else:
current_directory = os.path.dirname(os.path.abspath(__file__))
roles_audio_path = os.path.join(current_directory, "Mymp3")
os.makedirs(roles_audio_path, exist_ok=True)
so I have to modify:
roles_audio_path = r"C:\edgetts\roles"
os.makedirs(roles_audio_path, exist_ok=True)
…________________________________
发件人: Rany ***@***.***>
发送时间: 2024年11月24日 15:08
收件人: rany2/edge-tts ***@***.***>
抄送: zhongtanru ***@***.***>; Mention ***@***.***>
主题: Re: [rany2/edge-tts] 403 error is back/need to implement Sec-MS-GEC token (Issue #290)
Report it to pyinstaller maybe, you've already mentioned that the non-packaged variant doesn't have any issues.
―
Reply to this email directly, view it on GitHub<#290 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A72PW5J47FHKED4ZP53GDCT2CF3ORAVCNFSM6AAAAABQS47KCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVHA2DMMRTGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Traceback (most recent call last):
File "/usr/local/bin/edge-tts", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/edge_tts/util.py", line 139, in main
loop.run_until_complete(amain())
File "/usr/local/Cellar/[email protected]/3.8.18_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/site-packages/edge_tts/util.py", line 132, in amain
await _run_tts(args)
File "/usr/local/lib/python3.8/site-packages/edge_tts/util.py", line 66, in _run_tts
async for chunk in tts.stream():
File "/usr/local/lib/python3.8/site-packages/edge_tts/communicate.py", line 316, in stream
async with aiohttp.ClientSession(
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1167, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 821, in _ws_connect
raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url=URL('wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=4b190acbbb4548049ac8faa8772ce020')
The text was updated successfully, but these errors were encountered: