You are not logged in.
Pages: 1
Hi all, I thought I would post here a quick explanation of how I get custom voice messages on my computer.
To explain a little you may use bash scripts to do something and you would like it to tell you when it is finished, one way to do this could be a kdialog message box, but as I am not always looking at the screen running the script I wanted an audible notification.
So I went back to a script I created to make my pc talk to my grandchildren which uses a small program called pico2wave
SCRIPT:- /home/dai/bin/say
#!/bin/bash
pico2wave --lang=en-GB -w=/tmp/test.wav "$1"
aplay /tmp/test.wav >/dev/null 2>&1
rm /tmp/test.wav
This script simply says what you type, for example if you type
say "Hello this is your computer talking to you"
It will speak the text you entered
In a script you could use it inside if conditions to notify of the direction a script is going, or pretty much anything really.
I adapted the script a little to save the output to a wav file for use with the sound notifications
SCRIPT:-/home/dai/bin/saytofile
#!/bin/bash
pico2wave --lang=en-GB -w=/home/dai/Documents/Music/Sounds/test.wav "$1"
aplay /home/dai/Documents/Music/Sounds/test.wav >/dev/null 2>&1
This will save the file as test.wav and play it back to you to confirm it sounds ok. What I do is rename the file to something relevant afterwards and then I can use it in system notifications as a greeting or logout or any other sound.
To install pico2wave either use synaptic or from the command line enter
sudo apt-get install libttspico-utils
this will install all that is required to run these scripts as aplay should already be installed.
I hope some of you might find this useful.
Dai
Offline
Very nice, thanks you for well arranged tips Dai.
Offline
Thank you, and you are welcome
Offline
Dia -
I kept missing my ham net meetings on Tuesday night at 8:15PM. So I made a .wav file and set up cron to play the file, using aplay, about 10 min before the net meeting. Works out pretty well for me!
Offline
Excellent use for cron Jim. There are so many things you can do with q4os (and linux in general) to make life easier.
Dai
Offline
Are there tags that correspond to custom questions that would allow me to embed the answers into a confirmation email to either the registrant and/or the coordinator if that module is installed?
JF
Offline
I don't understand what you want to know, do you want to be able to email someone if you install something?
Offline
Pages: 1