Repository navigation
Edge: Sec-MS-GEC v2 token + full 2026-10 handshake (#141) - #142
Merged
Merged
Conversation
…y synthesis) (#141) Microsoft's 2026-10 handshake change 403'd every Edge synthesis WS connect while the voice list (tokenless URL) kept working — the reporter's exact repro, reproduced locally before the fix and gone after: voices=318, speak=89856 bytes, second utterance (pooled connection) 89856. The port (edge-tts PR #492, verified against the INSTALLED release): - Sec-MS-GEC v2: a SHA-256 variant with a data-dependent IV (salt = the first 7 bytes, custom schedule seeding, one round constant swap) plus a CS64 checksum, '<16hex>-<64hex>'. The reference accumulates UNMASKED and masks late — carries above bit 32 are load-bearing; the round sigmas keep high bits. The service's round-constant table ALSO differs from FIPS at index 32 (0x27B70A85 vs stock 0x2748774C) — a divergence between the published PR diff and the shipped package that only a golden- vector match against the installed reference caught. - Handshake: fresh ConnectionId query param, Cookie: muid=<random 16 bytes>, Pragma/Cache-Control headers, UA bumped to Chrome/143, Sec-MS-GEC-Version=2-143.0.3650.75. - Golden vectors: 6 timestamps pinned against the installed reference (generated, not transcribed); the old 64-hex-shape test updated to the v2 '<16>-<64>' shape. All 11 feature combos + the pre-push gate green; live e2e through the engine (reporter's flow: GetVoices → SetVoice → SynthToBytes, twice for the pooled path).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #141. Reproduced before (318 voices, then
WS connect error: HTTP error: 403on every synthesis — your exact repro) and verified after: voices=318, speak=89856 bytes, second utterance via the pooled connection = 89856 bytes.What changed
Microsoft's 2026-10 handshake requires the v2
Sec-MS-GECtoken (edge-tts PR #492) plus browser-fidelity handshake details. Ported in full:<16hex>-<64hex>. The reference's arithmetic accumulates unmasked and masks late — carries above bit 32 are load-bearing, which a naive wrapping-u32 port loses.0x27B70A85) — a divergence between the published PR diff and the shipped package that only matching golden vectors against the installed reference caught (the transcribed diff produced a valid-looking but wrong token).ConnectionIdper connection,Cookie: muid=<random>, Pragma/Cache-Control, UA → Chrome/143,Sec-MS-GEC-Version=2-143.0.3650.75.Verification