How to Use the Text-to-Speech Endpoint in Vultr Serverless Inference

How to Use the Text-to-Speech Endpoint in Vultr Serverless Inference

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.

Vultr Customer Portal

  1. Navigate to Products, click Serverless, and then click Inference.
  2. Click your target inference subscription to open its management page.
  3. Open the Text-to-Speech page.
  4. Select a preferred model.
  5. Select a preferred voice.
  6. Provide an input and click on Prompt.
  7. Click Reset to provide a new input.

Vultr API

  1. Send a GET request to the List Serverless Inference endpoint and note the target inference subscription’s ID.
    console
    $ curl "https://api.vultr.com/v2/inference" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
  2. Send a GET request to the Serverless Inference endpoint and note the target inference subscription’s API key.
    console
    $ curl "https://api.vultr.com/v2/inference/{inference-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
  3. Send a GET request to the List Audio Models endpoint and note the preferred audio inference model’s ID.
    console
    $ curl "https://api.vultrinference.com/v1/audio/models" \
        -X GET \
        -H "Authorization: Bearer ${INFERENCE_API_KEY}"
  4. Send a GET request to the List Audio Voices endpoint and note the preferred voice for the chosen model.
    console
    $ curl "https://api.vultrinference.com/v1/audio/voices" \
        -X GET \
        -H "Authorization: Bearer ${INFERENCE_API_KEY}"
  5. Send a POST request to the Create Speech endpoint to generate speech from the input text.
    console
    $ 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"

How to Use the Text-to-Speech Endpoint in Vultr Serverless Inference 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,…

How to Use the Text-to-Speech Endpoint in Vultr Serverless Inference 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,…

Leave a Reply

Your email address will not be published. Required fields are marked *