Skip to main content

Text to Speech

The Text to Speech (TTS) Generation API provides an endpoint that can be used to convert entered text into audio.

The current model available to achieve this is kokoro

Here are some simple examples of how to call this API in both python and using curl.

curl -s "https://api.ai.it.ufl.edu/v1/audio/speech" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $NAVIGATOR_TOOLKIT_API_KEY" \
-d "{ \
\"model\": \"kokoro\", \
\"input\": \"Hello. I am Navigator Toolkit. Nice to meet you.\" \
\"voice\": \"af_heart\", \
\"response_format\": \"mp3\", \
\"speed\": 1.0
} \
--output out.mp3