Notify Message
Forums
Page 1
Search
#13932907 Jan 01, 2019 at 11:49 AM
Crew
2 Posts
=================================================
Reads text files out loud.
=================================================
First output log files you want to listen to "live" all to a single file, named
whatever you want. Here I named it "output-here.txt". Note that if the path
contains spaces or parentheses or for some reason a weird symbol, put '
around it. So ~/path/freenode/some.log -but- ~/path/'ubuntu servers (freenode)'/some.log
Following command outputs multiple logs to one file (I suggest running it in screen or screen alternatives like maybe: tmux, byobu, dtach, abduco):

tail -q -f -n 5 ~/.config/hexchat/logs/'ubuntu servers (freenode)'/2019-01-01/#themanaworld.log ~/.local/share/mana/logs/server.themanaworld.org/2019-01/01/#General.log ~/.local/share/mana/logs/server.themanaworld.org/2019-01/01/#Guild.log | tee ~/Text-to-Speech/output-here.txt


Second, make espeak read your combined logs. This example speaks 155 words per minute in english (en).
For other languages you may have luck with command "espeak --voices" for alternatives,
also "man espeak"
Following command speaks the text (run in a second screen tab, or a terminal of its own):

tail -q -f -n 15 ~/Text-to-Speech/output-here.txt | espeak -a 90 -g 11ms -p 40 -s 155 -v en


Following command empties the contents of "output-here.txt" file to keep it from
becoming huge.

cat /dev/null > ~/Text-to-Speech/output-here.txt
=================================================
So on day one you could for example open a terminal, run screen,
and in first screen tab run command:
v
v
v
cat /dev/null > ~/Text-to-Speech/output-here.txt
v
v
v
then
v
v
v
tail -q -f -n 5 ~/.config/hexchat/logs/'ubuntu servers (freenode)'/2019-01-01/#themanaworld.log ~/.local/share/mana/logs/server.themanaworld.org/2019-01/01/#General.log ~/.local/share/mana/logs/server.themanaworld.org/2019-01/01/#Guild.log | tee ~/Text-to-Speech/output-here.txt
v
v
v
then
v
v
v
open a second tab in screen, and run
v
v
v
tail -q -f -n 15 ~/Text-to-Speech/output-here.txt | espeak -a 90 -g 11ms -p 40 -s 155 -v en
v
v
v
On day two, open a text file you have both tail commands in and search and replace
"2019-01-01" with "2019-01-02"
and
"2019-01/01" with "2019-01/02"
you get the idea
v
v
v
It is more simple than I have put it here, but I tried to be thorough.

The above is an example using Linux (Ubuntu)
you may need to install espeak
you may already have: tail, tee, cat
you have cat, you know you do :P

There are different ways to do this, I just prefer this way.

Optional, in Hexchat I have log files %n/%Y-%m-%d/%c.log
in settings/preferences/logging/log file name

Of course this whole thing can be adapted to speak just about any
file, log, chat, that is constantly being written to. Have fun.
Please be aware that on the internet any person can make an account with the same username as yours or mine. And that finding the same or similar username on another site, that exists on this site, does not necessarily mean it is the same person. Thanks.
+0
Page 1