Skip to content

Instantly share code, notes, and snippets.

@PawanOsman
Created February 5, 2023 17:24
Show Gist options
  • Save PawanOsman/310f8ecc459001e8c72d7ad017f477db to your computer and use it in GitHub Desktop.
Save PawanOsman/310f8ecc459001e8c72d7ad017f477db to your computer and use it in GitHub Desktop.

Elevenlabs.io API Documentation

Endpoint

The Text-to-Speech API is available at the following endpoint: https://api.pawan.krd/tts

Methods

The API supports the following methods:

  • GET
  • POST

Parameters

The API accepts the following parameters:

  • text: (Required) The text to be converted to speech.
  • voice: (Required) The voice to use for the conversion. The available voices are: "adam", "antoni", "arnold", "bella", "josh", "rachel", "domi", "elli", "sam".

Examples

GET

To use the API with the GET method, you can make a request to the following URL: https://api.pawan.krd/tts?text=hello&voice=arnold

POST

To use the API with the POST method, you can make a request with the following payload:

json

{ "text": "hello", "voice": "arnold" }

Response

The API will return an audio file in response to a successful request. The format of the audio file will be determined by the API.

Error Responses

If there is an error in the request, the API will return a JSON object with the error message.

@nsde
Copy link

nsde commented Feb 9, 2023

It works, but is pretty slow. Some requests take ~20 seconds

@Shiuki
Copy link

Shiuki commented Feb 9, 2023

😹

@PawanOsman
Copy link
Author

It works, but is pretty slow. Some requests take ~20 seconds

true sometimes it's slow, it needs time to bypass Elevenlabs.io rate limits

@dominicdev
Copy link

works but still slow :(

@mobilejudi
Copy link

Hi, thank you, can you add le language parameter please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment