Replies: 1 comment
-
Very cool and helpful to see how you leveraged the lib dir. Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted my ChatGPT responses to be read aloud immediately, as they appear on the screen.
This was problematic because of two reasons:
say
command stops any spoken text and starts speaking the new text. Meaning, we cannot simply call it every time we receive new text.This is a rough start, but works well for my current needs.
This util class maintains a queue, detects certain delimiters (e.g.
.
,,
) and starts speaking only when it detects that a phrase has probably been accumulated.https://gist.github.com/shyagamzo/749b7535aa8876ec2ce09f39aaef6a80
To use it, simply import and call
queueSpeech
:Beta Was this translation helpful? Give feedback.
All reactions