Mycroft Community Forum

Mycroft read *sharing*

hey everyone fairly new to programing here and work exclusively in bash at the moment so I’ve piggybacked on the inbuilt Mycroft features. however, I wanted to share this little script that I’ve made that sets Mycroft as a voice reader (which I use to read my textbooks) because I haven’t found a simple reader done up anywhere.

set -o nounset # Treat unset variables as an error
set -e # exit on error
_readpath="$1"
while read -r line; do
  mycroft-speak <<<"$line"
done <"$_readpath"
unset _readpath

simple but it works usage mcre /path/to/file

2 Likes

If you’re planning on doing significant amounts of TTS like this you should set up your own local (or cloud, your choice) TTS server. It’s frowned on (and possibly will get you rate limited) to do against the Mycroft TTS server.

1 Like

hey i tried setting up my-croft locally initially buy i just couldn’t get it to work (that being said i’ve only been programing and on Linux for 4 months and it was over a months ago) so i may re look into that installing the “preferred way” for my distro didn’t work anyways (arch linux) so ill look back into it (any recommended reading?) i have the hardware to run locally either on my computer or an external mini server. To be honest i never really thought about that. Also are you suggesting i run all of mycroft locally or just the text to speech portion? or are they inseparable? thanks in advanced.

If you’re feeding it lots of text, then running TTS locally would be a good idea. You can configure it to use a local tts server separate from the default choices.

There’s a few different choices for TTS, from really basic (mimic) to more human-sounding choices (mimic2, mozilla tts, tacotron[2], etc). They all have some level of instruction on setting up locally now, though may require a bit of digging.

Hey thanks I’ve had to sideline the the project for a little bit I’m back In school full time and I couldn’t get it to pause reading one I started however ideally I’d like to run the whole Mycroft project locally but I’d prefer to keep the more pleasant if possible google voice If possible I’ll have a look at those two when I have some time I was also looking at some separate standalone TTS software as well I was mostly using the read to read from my bash scripted to do list