---
title: Text-to-Speech
url: https://docs.vultr.com/products/compute/serverless-inference/management/usage/text-to-speech
publish_date: 2024-09-23T20:20:51.566658Z
last_updated: 2026-05-26T19:11:18.750758Z
---

# 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 Console or API.

=== "Vultr Console"

    1. Navigate to **Products**, click **Serverless**, and then click **Inference**.

    1. Click your target inference subscription to open its management page.

    1. Open the **Text-to-Speech** page.

    1. Select a preferred model.

    1. Select a preferred voice.

    1. Provide an input and click on **Prompt**.

    1. Click **Reset** to provide a new input.

=== "Vultr API"

    1. Send a `GET` request to the [**List Serverless Inference** endpoint](https://www.vultr.com/api/#tag/serverless-inference/operation/list-inference) and note the target inference subscription's ID.

        ```console
        $ curl "https://api.vultr.com/v2/inference" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `GET` request to the [**Serverless Inference** endpoint](https://www.vultr.com/api/#tag/serverless-inference/operation/get-inference) 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}"
        ```

    1. Send a `GET` request to the [**List Audio Models** endpoint](https://api.vultrinference.com/#tag/Models/operation/list-audio-models) 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}"
        ```

    1. Send a `GET` request to the [**List Audio Voices** endpoint](https://api.vultrinference.com/#tag/Audio/operation/list-audio-voices) 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}"
        ```

    1. Send a `POST` request to the [**Create Speech** endpoint](https://api.vultrinference.com/#tag/Audio/operation/create-speech) 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" 
        ```
