initial commit
This commit is contained in:
parent
af1191625f
commit
1e6fd2e1d5
7
speak-mp3.sh
Executable file
7
speak-mp3.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE="ffmpeg_output.wav"
|
||||
MP3="ffmpeg_output.mp3"
|
||||
|
||||
ffmpeg -i $FILE -acodec mp3 $MP3 -y
|
||||
ffplay $MP3 -nodisp -autoexit
|
25
speak.sh
Executable file
25
speak.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo usage: $0 \"text\" [tempo] [model]
|
||||
exit
|
||||
fi
|
||||
|
||||
STR=$1
|
||||
MODEL="tts_models/en/jenny/jenny"
|
||||
TEMPO=1.0
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
TEMPO=$TEMPO
|
||||
else
|
||||
TEMPO=$2
|
||||
if [ -z "$3" ]; then
|
||||
MODEL=$MODEL
|
||||
else
|
||||
MODEL=$3
|
||||
fi
|
||||
fi
|
||||
|
||||
tts --text "$STR" --model_name "$MODEL" && \
|
||||
ffmpeg -i tts_output.wav -filter:a "atempo=$TEMPO" -vn ffmpeg_output.wav -y && \
|
||||
ffplay ffmpeg_output.wav -nodisp -autoexit
|
Loading…
Reference in New Issue
Block a user