Skip to content
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

send alpn extension in client hello for baidu tts #66

Merged
merged 2 commits into from
Feb 25, 2024

Conversation

kieranlblack
Copy link
Contributor

Baidu web server seems to behave nondeterministically when the extension is not supplied, sometimes returning 200 OK but with Content-Length 0. When the extension is sent, the audio/mpeg content is returned as expected. Automatically sending the alpn extension was added in python 3.10 (python/cpython@f97406b), but Anki is still using 3.9.

Close #61.

@kieranlblack
Copy link
Contributor Author

@tchen9922 are you familiar with installing a custom extension in anki? Curious if this patch fixes the bug for you.

Baidu web server seems to behave nondeterministically when the extension is not supplied, sometimes returning 200 OK but with Content-Length 0. When the extension is sent, the audio/mpeg content is returned as expected. Automatically sending the alpn extension was added in python 3.10 (python/cpython@f97406b), but Anki is still using 3.9.

Close Gustaf-C#61.
@tchen9922
Copy link

@kieranlblack No sorry, I've never installed a custom extension in anki before. I tried to find a tutorial on YouTube, but nothing popped up :(

@Gustaf-C
Copy link
Owner

Thanks Kieran, looks good!

@Gustaf-C Gustaf-C merged commit 926cce0 into Gustaf-C:main Feb 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Baidu Speech Engine Processing Error
3 participants