mirror of
https://github.com/rany2/edge-tts
synced 2024-11-22 01:45:02 +00:00
28 lines
524 B
Bash
28 lines
524 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# test if prompt file exists
|
||
|
if ! [[ -f "tests/001-long-text.txt" ]]
|
||
|
then
|
||
|
echo "File not found!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# spawn
|
||
|
for i in {a..z}
|
||
|
do
|
||
|
edge-tts -f tests/001-long-text.txt --write-media "tests/001-long-text_${i}.mp3" --write-subtitles "tests/001-long-text_${i}.srt" &
|
||
|
done
|
||
|
wait
|
||
|
|
||
|
# set return code to 0
|
||
|
ret=0
|
||
|
|
||
|
# compare files to make sure all are the same
|
||
|
for i in {b..z}
|
||
|
do
|
||
|
cmp tests/001-long-text_a.srt "tests/001-long-text_${i}.srt" || ret=1
|
||
|
done
|
||
|
|
||
|
# exit with return code
|
||
|
exit "${ret}"
|