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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piper voices speed #383

Open
MendyBerger opened this issue Apr 5, 2024 · 8 comments
Open

Piper voices speed #383

MendyBerger opened this issue Apr 5, 2024 · 8 comments

Comments

@MendyBerger
Copy link

Hey 馃憢, thanks for this amazing extension! I love it!!!

Piper voices were added recently, the voices are great, and it works really well with ReadAloud!

One problem I did notice is that changing speed changes the pitch by a lot. Is this a fixable problem?

Thanks again for the amazing work!

@ken107
Copy link
Owner

ken107 commented Apr 6, 2024

I have made the fix in the https://github.com/ken107/piper-browser-extension repo, it will be released soon. Thank you for the bug report!

@ken107 ken107 closed this as completed Apr 6, 2024
@MendyBerger
Copy link
Author

MendyBerger commented Apr 7, 2024

Thanks so much @ken107! Really appreciate it!

Just curious, why is that a separate extension?

@ken107
Copy link
Owner

ken107 commented Apr 7, 2024

Ah, Read Aloud actually opens https://piper.ttstool.com and use that tool to synthesize Piper voices. The code for that page is in the repository above. And that repository releases a separate extension to provide Piper voices, not for Read Aloud, but generally for the browser and can be used by other websites and extensions. Yea, it's complicated.

@MendyBerger
Copy link
Author

@ken107 I see.
So does that mean that the fix will eventually trickle down to ReadAloud?

@ken107
Copy link
Owner

ken107 commented Apr 7, 2024

They share the code, so the fix fixes both.

@ken107
Copy link
Owner

ken107 commented Apr 8, 2024

Unfortunately I have to revert the change. We'll have to figure this out later.

The change worked by switching to using HTMLAudioElement instead of the Web Audio API to playback the synthesized speech. Unlike the latter, changing playbackRate on HTMLAudioElement does not affect pitch. However, turns out HTMLAudioElement suffers from a restriction where playback cannot begin unless the tab is active.

@ken107 ken107 reopened this Apr 8, 2024
@AvAkanksh
Copy link

@ken107 when can we expect to get this update ?

@ken107
Copy link
Owner

ken107 commented Apr 16, 2024

Not soon, sorry. I've exceeded my time allocation for this project for now.

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

No branches or pull requests

3 participants