Vultr Serverless Inference text-to-speech endpoint converts text into spoken audio using advanced AI models. This service enables users to integrate high-quality, natural-sounding speech synthesis into their applications, enhancing accessibility and user engagement through seamless audio output. By leveraging this feature, you can provide an auditory experience that is both clear and engaging, making your applications more user-friendly and inclusive.
Follow this guide to utilize the text-to-speech endpoint on your Vultr account using the Vultr Customer Portal or API.
Navigate to Products, click Serverless, and then click Inference.
Click your target inference subscription to open its management page.
Open the Text-to-Speech page.
Select a preferred model.
Select a preferred voice.
Provide an input and click on Prompt.
Click Reset to provide a new input.
Send a GET
request to the List Serverless Inference endpoint and note the target inference subscription's ID.
$ curl "https://api.vultr.com/v2/inference" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the Serverless Inference endpoint and note the target inference subscription's API key.
$ curl "https://api.vultr.com/v2/inference/{inference-id}" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the List Audio Models endpoint and note the preferred audio inference model's ID.
$ curl "https://api.vultrinference.com/v1/audio/models" \
-X GET \
-H "Authorization: Bearer ${INFERENCE_API_KEY}"
Send a GET
request to the List Audio Voices endpoint and note the preferred voice for the chosen model.
$ curl "https://api.vultrinference.com/v1/audio/voices" \
-X GET \
-H "Authorization: Bearer ${INFERENCE_API_KEY}"
Send a POST
request to the Create Speech endpoint to generate speech from the input text.
$ curl "https://api.vultrinference.com/v1/audio/speech" \
-X POST \
-H "Authorization: Bearer ${INFERENCE_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"model": "{model-id}",
"input": "{user-input}",
"voice": "{selected-voice}"
}' \
--output "{output-path}/output.wav"
No comments yet.