Novembro de 2017 Ubuntu 16.04
Para meu projeto, cron
jobs que podem falar, espeak
é o mais simples.
sudo apt-get update
sudo apt-get install espeak
Para a primeira parte, fazer o sistema falar o tempo requer uma única entrada no cron
0 * * * * /home/username/scripts/saytime
saytime:
#!/bin/bash
echo "\'$(date +%H)\' Hundred" | espeak
Pode receber entrada via stdio, assim:
cat textfile | espeak -s 100
Para referência, aqui estão as opções de linha de comando selecionadas para o eSpeak:
espeak [options] [""]
-a
Amplitude, 0 to 200, default is 100
-g
Word gap. Pause between words, units of 10mS at the default speed
-k
Indicate capital letters with: 1=sound, 2=the word "capitals",
higher values indicate a pitch increase (try -k20).
-l
Line length. If not zero (which is the default), consider
lines less than this length as end-of-clause
-p
Pitch adjustment, 0 to 99, default is 50
-s
Speed in words per minute, 80 to 450, default is 175
-v
Use voice file of this name from espeak-data/voices
-w
Write speech to this WAV file, rather than speaking it directly
-z
No final sentence pause at the end of the text
- vozes =
List the available voices for the specified language.
If <language> is omitted, then list all voices.