16 lines
298 B
Bash
16 lines
298 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Usage: $0 <text> <output_file>"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$2" ]; then
|
|
echo "Usage: $0 <text> <output_file>"
|
|
exit 1
|
|
fi
|
|
|
|
curl -X POST https://localhost:8443/tts -H "Content-Type: application/json" \
|
|
-d "{\"text\": \"$1\"}" \
|
|
--insecure \
|
|
-o "$2" |