STT API
URIs:
http://api.privox.io/stt
Legacy API which does not require SSL.
https://secure.privox.io/stt
Secure API which require SSL, TLS 1.2 or better.
Post Variables:
Required:
key - a valid user key.
file - a wav file or zip file containing a wav file.
Optional:
quality - one of {fast, normal, better, best, xcribe or xcribe2}.
language - defaults to 'en'.
engine - currently ignored.
Examples:
curl -X POST -F "file=@sample.wav" -F "quality=fast" -F "language=en" -F "key=XXX" api.privox.io/stt
Note: specify language if 'en' for faster more accurate recognition.
date;curl -X POST -F "file=@sample.wav" -F "quality=fast" -F "key=XXX" api.privox.io/stt;date
Note: measure API transcription time.
zip sample.zip sample.wav;curl -X POST -F "file=@sample.zip" -F "quality=fast" -F "key=XXX" api.privox.io/stt
Note: compress file before sending (recommended).
TTS API
URIs:
http://api.privox.io/tts
Legacy API which does not require SSL.
https://secure.privox.io/tts
Secure API which require SSL, TLS 1.2 or better.
Post Variables:
Required:
key - a valid user key.
text - an utterance to be converted to an audio wav file.
Optional:
voice - one of {voice1 or voice2}.
language - defaults to 'en'.
engine - currently ignored.
Examples:
curl -X POST http://api.privox.io/tts -H "Content-Type: application/x-www-form-urlencoded" -d "key=XXX&text=testing one two three" > junk.wav;aplay junk.wav
See also the
PriVox Repository for more detailed information and coding examples.