Discuss Scratch

KittyCatKayden
Scratcher
1000+ posts

Text to speech doesn't work perfectly

There are problems with text to speech. If the message is too long, it glitches and only plays part of the voice and then won't continue. Which is annoying, and needs to be fixed. Also, for some reason, if i have no internet connection, there is a possibility that the text to speech won't work at all. Both of these things can break and ruin projects. But the first one is worse in my opinion.
Blue_Moon2607
Scratcher
63 posts

Text to speech doesn't work perfectly

For some reason, Text to Speech has a text limit, which says partial part of the text, and not the full way. Text to Speech requires internet as well because it doesn't have a built-in text to speech sound, it is stored on their server or their programming language. However, there's an alternative that can say the full thing, here are the examples…
Text to speech: Say [Hello, I speak too much since I am very chatty, I work on Scratch and I help]
Text to speech: Say [projects speak, I am an extension of Scratch, and I'm here!]
// Break up text to say the whole thing...
KittyCatKayden
Scratcher
1000+ posts

Text to speech doesn't work perfectly

Blue_Moon2607 wrote:

Text to speech: Say [Hello, I speak too much since I am very chatty, I work on Scratch and I help]
Text to speech: Say [projects speak, I am an extension of Scratch, and I'm here!]
// Break up text to say the whole thing...
What if I'm using a list that chooses stuff randomly to say?
Maximouse
Scratcher
1000+ posts

Text to speech doesn't work perfectly

KittyCatKayden wrote:

Blue_Moon2607 wrote:

Text to speech: Say [Hello, I speak too much since I am very chatty, I work on Scratch and I help]
Text to speech: Say [projects speak, I am an extension of Scratch, and I'm here!]
// Break up text to say the whole thing...
What if I'm using a list that chooses stuff randomly to say?
You can make another list with the same length that contains the second part of each message. The code for selecting a random message could look like this:
set [message v] to (pick random (1) to (length of [first list v]))
speak (item (message) of [first list v]) :: pen
speak (item (message) of [second list v]) :: pen
KittyCatKayden
Scratcher
1000+ posts

Text to speech doesn't work perfectly

Maximouse wrote:

KittyCatKayden wrote:

Blue_Moon2607 wrote:

Text to speech: Say [Hello, I speak too much since I am very chatty, I work on Scratch and I help]
Text to speech: Say [projects speak, I am an extension of Scratch, and I'm here!]
// Break up text to say the whole thing...
What if I'm using a list that chooses stuff randomly to say?
You can make another list with the same length that contains the second part of each message. The code for selecting a random message could look like this:
set [message v] to (pick random (1) to (length of [first list v]))
speak (item (message) of [first list v]) :: pen
speak (item (message) of [second list v]) :: pen
Maybe i could try that
cosmo250
Scratcher
500+ posts

Text to speech doesn't work perfectly

KittyCatKayden wrote:

There are problems with text to speech. If the message is too long, it glitches and only plays part of the voice and then won't continue. Which is annoying, and needs to be fixed. /quote]
I have the same problem. You can fix this by breaking up the long text into two smaller texts.
KittyCatKayden
Scratcher
1000+ posts

Text to speech doesn't work perfectly

cosmo250 wrote:

KittyCatKayden wrote:

There are problems with text to speech. If the message is too long, it glitches and only plays part of the voice and then won't continue. Which is annoying, and needs to be fixed. /quote]
I have the same problem. You can fix this by breaking up the long text into two smaller texts.
But i am using a list that chooses random messages
ScratchUserCL
Scratcher
0 posts

Text to speech doesn't work perfectly

add ((5) - (0)) to [list v]

Powered by DjangoBB