Jarvis icon indicating copy to clipboard operation
Jarvis copied to clipboard

Improve what Jarvis reads out loud

Open ryclorak opened this issue 4 years ago • 3 comments

First time playing with Jarvis (or anything open source for that matter), I had it tell me about corona with sound enabled and laughed when it said "plus" repeatedly.

I haven't looked at other plugins, but I'm sure this will come up again when someone inevitably makes a line with symbols, like:

+++++++++++++++++++++++++++++++++++++++ Corona status: "Worldwide" +++++++++++++++++++++++++++++++++++++++

It looks like y'all are using pyttsx3 in jarviscli\utilities\voice.py for processing text to speech. I can also see that escape sequences are ignored which suggests there's an easy way to also make sure Jarvis doesn't say long strings of symbols when a human wouldn't. Searching for a 'word' that contains more than x number of repeating symbols (from some list of characters) and preventing that word from being said out loud seems like one way to fix this. I'm also wondering about a general solution and wonder what other text we might want Jarvis to skip.

Have others thought about this more generally? Would it be solved by using a different text to speech library? Should I raise this issue with pyttsx3?

A bigger issue here is obviously related to making Jarvis's responses more natural, like #424 but that's more of an epic. Any recommendations on where I should focus my efforts?

ryclorak avatar Jun 27 '21 18:06 ryclorak

Should I raise this issue with pyttsx3?

No, pyttsx3 talks out whatever we pass, it's not up to pyttsx3 to decide if this has any meaning. If someone wants to hear 'plus plus plus plus' then so it is ;).

Searching for a 'word' that contains more than x number of repeating symbols (from some list of characters)

This is a really good idea. Could even work for any characters.

Edit: But of course, ultimately it would be up to the plugins to decide what passages should be spoken and what not (say has parameter speak=True/False).

pnhofmann avatar Jun 27 '21 19:06 pnhofmann

Oh I see the speak parameter now. So is this something you would leave up to each plugin writer to decide (and know how to use say() properly), or would you make some changes to say() in CmdInterpreter to always skip certain strings/patterns? What strings/patterns would those be and how should they be dealt with? Should Jarvis say "plus plus plus etcetera" or "a whole bunch of pluses" or something like that?

ryclorak avatar Jun 27 '21 20:06 ryclorak

What strings/patterns would those be and how should they be dealt with? Should Jarvis say "plus plus plus etcetera" or "a whole bunch of pluses" or something like that?

Don't think "a whole bunch of pluses" would feel natural.

But I really agree to filter duplicate characters (like any character repeating >5 times) before talking out load.

pnhofmann avatar Jul 10 '21 08:07 pnhofmann