mirror of
https://github.com/rany2/edge-tts
synced 2024-11-21 17:29:07 +00:00
improve playback script
This commit is contained in:
parent
b11e7cc1ae
commit
d7c95d8743
@ -3,6 +3,6 @@
|
||||
## edge-tts.py to a directory in your $PATH
|
||||
## as executable and give it the name edge-tts.
|
||||
trap 'kill -- $(jobs -p) 2>/dev/null' EXIT
|
||||
[ "$1" == "read-from-stdin" ] && { stdin=$(cat); shift 1; } || stdin=""
|
||||
[ "$1" == "stdin" ] && { stdin=$(cat); shift 1; set -- "$@" '--file=/dev/stdin'; } || stdin=""
|
||||
exec {fd}< <(edge-tts "${@}" <<<"$stdin")
|
||||
mpg123 -C "/dev/fd/$fd"
|
||||
|
Loading…
Reference in New Issue
Block a user