aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/picospeaker
blob: 22b021085ee312f03f6f5e05f895c935b6227e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh -eu
audio=$(mktemp --suffix -picospeaker.wav)
text=${1:-The text argument is absent.}

rm -f /tmp/*-picospeaker.wav;

[ "${1-}" = "echo" ] && picospeaker "${2-}" "${1-}" && exit;

pico2wave -w "$audio" "$text";
[ "${2-}" = "echo" ] && ffmpeg -y -i "$audio" -map 0 -c:v copy -af aecho=1:1:50:0.5 "$audio";
mplayer "$audio";