IRC-TTS
Broadcast your IRC channel via the Text-To-Speech webserver.
Usage
Prebuilt binaries are available under the releases page.
First you need the go/golang compiler to compile the code
Then you need to have the Festival text to speech server running for this to work. You also need sox built with mp3 support for transcoding the Festival's output.
Compile the code to the executabe binary with "go build" and run the irc-tts executable (see the program's flags below). Open up http://localhost:8338/ and press play.
Settings info (-h)
IRC-TTS'S USAGE:
* * * * * * * * *
FLAGS:
-nick (IRC nick to use)
-chan (IRC channel to connect to)
-server (IRC server to use, defaults to Freenode)
-port (Webserver port, default: 8338)
-debug (Set to print raw IRC messages to stdout)
-h (Help)
* * * * * * * * *
ENV VARIABLES as an alternative to flags but with more options
IRC_TTS_NICK (IRC nick to use)
IRC_TTS_PASSWORD (IRC user password)
IRC_TTS_CHAN (IRC channel to connect to)
IRC_TTS_IRC_SERVER (IRC server to use, defaults to Freenode)
IRC_TTS_IRC_PORT (IRC server's port)
IRC_TTS_TITLE (Set the <title> tag)
IRC_TTS_DESC (Set the meta description, not visible to users)
IRC_TTS_HEAD (The text of the main heading)
IRC_TTS_BLURB (Short text about the thing)
IRC_TTS_BACKGROUND (A URL to an image that will be the background of the website)
IRC_TTS_BACKGROUND_PATH (An absolute path to the background image in the filesystem)
IRC_TTS_BITRATE (mp3 bitrate in kilobits for streaming, default 32)
* * * * * * * * *
MORE INFO
You need "festival", "festival_client", "sox" programs on your Whatever/Linux install.
The sox-plugins-freeworld package might be needed for the mp3 support.
In order to use the festival's text-to-speech function you need to run it as a server
with "festival --server".
Also don't forget to configure the voice you want to use in festival.
You can customize the main.js and main.html files in the project folder but run "go generate"
and rebuild the executable afterwards to set up the new code.
The file expansions.txt file contains regex rules for emoticons and their translations
and the acronyms.txt file contains translations of acronyms.
Both can be edited to remove or add new rules, but as previously said,
you need to run "go generate" and rebuild the binary afterwards.
* * * * * * * * *
SYSTEMD EXAMPLE
[Unit]
Description=irc tts service
[Service]
ExecStart=/path/to/irc-tts -port 8338
User=youruser
Environment="IRC_TTS_CHAN=#yourchannel"
Environment="IRC_TTS_NICK=yournick"
Environment="IRC_TTS_TITLE=your title tag"
Environment="IRC_TTS_DESC=your meta tag description"
Environment="IRC_TTS_HEAD=Your Heading!"
Environment="IRC_TTS_BLURB=Listen to the chatter"
Environment="IRC_TTS_BACKGROUND_PATH=/path/to/background.jpg"
[Install]
WantedBy=network-online.target
* * * * * * * * *
NGINX CONFIG EXAMPLE
server {
listen 80;
server_name irc.example.com;
index /;
access_log /var/log/nginx/irc.example.com.access.log;
tcp_nopush on;
sendfile on;
location / {
proxy_pass http://localhost:8338/;
proxy_http_version 1.1;
}
location /stream {
sendfile off;
max_ranges 0;
chunked_transfer_encoding off;
proxy_request_buffering off;
proxy_buffering off;
proxy_http_version 1.0;
proxy_pass http://localhost:8338/stream;
}
location /ws {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_pass http://localhost:8338/ws;
}
location /listen.pls {
proxy_set_header X-SSL $https;
proxy_set_header Host $host;
proxy_pass http://localhost:8338/listen.pls;
}
}
Screenshot (links to the demo site of some channel)
Caveats
I have absolutely ZERO clue if this can work on Windows or Mac operating system