TTS/tests/test_demo_server.sh

16 lines
322 B
Bash
Raw Normal View History

#!/bin/bash
set -xe
2020-09-09 10:27:23 +00:00
python -m TTS.server.server &
SERVER_PID=$!
echo 'Waiting for server...'
sleep 30
2021-03-08 13:51:27 +00:00
curl -o /tmp/audio.wav "http://localhost:5002/api/tts?text=synthesis%20schmynthesis"
python -c 'import sys; import wave; print(wave.open(sys.argv[1]).getnframes())' /tmp/audio.wav
kill $SERVER_PID
rm /tmp/audio.wav