diff options
author | tdro <tdro@users.noreply.github.com> | 2023-02-21 08:23:04 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2023-02-21 08:23:04 -0500 |
commit | e2f0774130f319d3d9f8b9bb7c115913d591c2be (patch) | |
tree | 13c697c1303595f3e78018480d66368746e6682d /.local | |
parent | cb736ea12aea50a3f79ac9b775533fe6d9017411 (diff) | |
download | dotfiles-e2f0774130f319d3d9f8b9bb7c115913d591c2be.tar.gz dotfiles-e2f0774130f319d3d9f8b9bb7c115913d591c2be.tar.bz2 dotfiles-e2f0774130f319d3d9f8b9bb7c115913d591c2be.zip |
.config/nixpkgs: Replace pico2wave with larynx
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/picospeaker | 14 | ||||
-rwxr-xr-x | .local/bin/say | 20 |
2 files changed, 20 insertions, 14 deletions
diff --git a/.local/bin/picospeaker b/.local/bin/picospeaker deleted file mode 100755 index 55a1b7b..0000000 --- a/.local/bin/picospeaker +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -eu - -audio=/tmp/picospeaker-jfgOUcZdWu.wav -text=${1:-Nothing to read.} - -[ "${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,atempo=0.85 "$audio.mp3" \ - && mplayer -really-quiet "$audio.mp3" && exit; - -mplayer -really-quiet "$audio"; diff --git a/.local/bin/say b/.local/bin/say new file mode 100755 index 0000000..cd9e07f --- /dev/null +++ b/.local/bin/say @@ -0,0 +1,20 @@ +#!/bin/sh -eu + +audio=/tmp/speak-jfgOUcZdWu.wav +text=${1:-Nothing to say.} + +[ "${1-}" = "echo" ] && $0 "${2-}" "${1-}" && exit; + +printf '%s' "$text" | larynx -q low > $audio + +[ "${2-}" = "echo" ] && + ffmpeg \ + -y \ + -i "$audio" \ + -map 0 \ + -c:v copy \ + -af aecho=1:1:50:0.5,atempo=0.85 "$audio.mp3" && + mplayer -really-quiet "$audio.mp3" && + exit; + +mplayer -really-quiet "$audio"; |