Ubuntu – Does spd-say stop speaking after a short while in the command line

command linetext to speech

I've noticed that whenever I'm in the command line and I try spd-say, it always stops shortly after it starts, and doesn't finish what I've told it to say.

For instance,

spd-say "moo moo farms are the best cow farms ever. They say moo, they don't pollute the earth, and they give milk. Visit moo moo farms today for only twelve easy payments of seventeen ninety five weekly!"

will only say moo moo farms are the best cow farms. They say moo, they don't pollute the earth, and they gi; and then it cuts off.

Can anyone tell me what is going on here?
I'm using Linux Mint 19.0 on Aspire 5610Z and Linux Ubuntu 18.04 on Optiplex 755.

Best Answer

The reason is spd-say times out and exits before completing the full text-to-speech output.

To make spd-say wait until the full text has been read, please add the option --wait after it. Like so:

spd-say --wait "moo moo farms are the best cow farms ever. They say moo, they don't pollute the earth, and they give milk. Visit moo moo farms today for only twelve easy payments of seventeen ninety five weekly!"

Explanation - as requested by Joshua Miller:

spd-say sends text-to-speech output requests to speech-dispatcher. Please, read here.

However, if the text is too long, spd-say exits early... hence the need for the --wait option.

Other applications including your JAVA application might be sending text-to-speech output requests directly to speech-dispatcher. Please read the ( description ) part here.