Install the requirements into your virtual environment:
.venv/bin/pip3 install -r requirements_http.txt
Run the web server:
.venv/bin/python3 -m piper.http_server --model ...
See --help
for more options.
Using a GET
request:
curl -G --data-urlencode 'text=This is a test.' -o test.wav 'localhost:5000'
Using a POST
request:
curl -X POST -H 'Content-Type: text/plain' --data 'This is a test.' -o test.wav 'localhost:5000'