How I'm currently tackling tts (text to speech) right now #3558
jessebot
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know that support for screen readers is on the roadmap, but I'm trying to keep accessibility in mind with all code I write, so I wanted to accommodate text to speech before releasing my app in a week or two. Here's some of the methods I've included in my app in order to use text to speech when the user focuses a new element, or when they press the f5 key. (I also include an option to read screen titles as well) It's not perfect, but I'm doing my best:
click me for python code for an app with text to speech features
In the code above,
INITIAL_USR_CONFIG
is a dictionary from a config file that looks like this:If you are curious, this is what the accesibility screen looks like, though I am still working on it:
click me for the accessibility screen python code example
Here is a short demo of the text to speech feature (Sorry for not having subtitles. I don't know how to generate them yet):
Screen.Recording.2023-10-18.at.09.23.12.mov
I am overall still working on this, and I'm still not sure how to accommodate reading
Label()
gracefully, but I thought it might be helpful to others working on the same feature, as I couldn't find any other examples in the current discussions.Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions