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

add custom TTS playback speed #1210

Closed

Conversation

ivan20203
Copy link

--> what:
the TTS (text to speech) speed has fixed settings of 0.25-0.5-0.75-1.00-1.25- and so on.

I implemented a custom speed option.
So now you will be able to type in numbers between 0 to 5 and with 2 decimal places.
So the value 1.1 will work.

--> how:
After setting up my the dev environment, this is where I had like 74 updates in git for making the files multi line.
I added it in BookReader/plugins/plugin.tts.js

After having a multiline implementation i asked ChatGPT to convert the new code i wrote into single line format that the current plugin.tts.js requires.

So thats where we are. After testing it I am now making a pull request.

Apologies for this if it was done the wrong way.

Pictures of working version below:

Screenshot 2023-08-10 at 17 23 28 Screenshot 2023-08-10 at 17 23 44 Screenshot 2023-08-10 at 17 23 56

@ivan20203
Copy link
Author

code changed:

From: BookReader.prototype.initNavbar=function(t){return function()
To: n.find(".BRcontrols .BRicon.zoom_out").closest("li"))}return n}}

changed in between them to add custom playback speed.

@ivan20203 ivan20203 marked this pull request as ready for review August 11, 2023 00:35
@ivan20203
Copy link
Author

Edited wrong files. Edited plugin.tts.js in BookReader instead of src

@ivan20203 ivan20203 closed this Aug 11, 2023
@ivan20203 ivan20203 mentioned this pull request Aug 11, 2023
@ivan20203 ivan20203 deleted the custom_TTS_playbackspeed branch August 13, 2023 04:27
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.

1 participant