익명 12:54

Text-To-Speech for a Writer?

Text-To-Speech for a Writer?

I'm on Ubuntu 24.04, I have installed rhvoice and speech-dispatcher, and this works fine from the command line.

My use case is that, as a writer, I want to be able to get the machine to read my text aloud to help check it. I used to use an online service but it's really expensive. I don't need Orca because I am not visually impaired and it would be overkill.

I write with Scrivener on WINE, so that's not going to integrate easily. I have tried getting LibreOffice to talk using the Read-Text extension but that's not working either (I have queried that on the LO forums because it's doing something truly weird).

My ideal would be being able to slap the text (a chapter at a time) into a text editor (for example) and have it read back (pausing would be great but a paragraph at a time would be acceptable).

So does anyone have any idea what I could use? Am I going the wrong way using speech-dispatcher even though standard APIs are good, right?

The speech output doesn't need to sound natural, in some ways it's better if it isn't for my purposes.



Top Answer/Comment:

You suggest to slap the text (a chapter at a time) into a text editor (for example) and have it read back.

You can do something similar with espeak: save the chapter into a text file for example your-file.txt. This can be done in several ways, for example via a text editor, or directly, if the word processor can save into a text file (without a lot of formatting characters).

espeak has options to fine-tune the voice, for example change the speed if the default is too fast. The options are described by man espeak. There are also settings for several languages (i use Swedish and English).

sudo apt install espeak

So when you have a text file, read from it directly,

< your-file.txt espeak

You can also copy a paragraph from your word processor and paste it into a terminal window, where espeak is running

espeak 2>/dev/null

and it will read the text.

See also this link.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다