List speech models
const url = 'https://api.aderra.ai/v1/audio/models';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.aderra.ai/v1/audio/models \ --header 'Authorization: Bearer <token>'The speech model and what it accepts: its languages, response formats (with the
characters each takes, and the sample rate of pcm and wav), speed range, limits,
price per 1,000 billable characters (in credits; 1,000 credits = $1), and how many voices
have each filter value. Build language, format and voice-filter pickers from it.
Any Aderra key (API or terminal) may call it, and it is free: nothing is billed. Guide: https://aderra.ai/docs/api/text-to-speech/#read-the-model-from-code
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The speech models (one today, aderra-voice-1).
object
object
How many voices the model has.
For each GET /v1/audio/voices filter, every value in use and how many voices have it.
object
object
object
object
object
object
The supported languages, sorted by English name.
object
ISO 639-1 code, the value of language.
object
Billable characters a request takes in this format (4,096, or one 900-character chunk for formats that cannot be joined).
pcm and wav only.
pcm and wav only.
pcm and wav only.
object
Billable characters per request (Chinese, Japanese and Korean characters count 3).
Longer text is spoken in chunks of up to this many billable characters, split at sentence ends, and joined.
The audio is streamed as it is generated.
The price per 1,000 billable characters, in credits (1,000 credits = $1), as an exact decimal string.
Example
{ "object": "list", "data": [ { "id": "aderra-voice-1", "object": "model", "type": "text_to_speech", "endpoint": "/v1/audio/speech", "voices": 200, "voice_filters": { "gender": { "male": 119, "female": 81 }, "age": { "middle_aged": 119, "young": 74, "old": 7 } }, "languages": [ { "code": "af", "name": "Afrikaans" } ], "response_formats": [ { "format": "mp3", "content_type": "audio/mpeg", "max_characters": 4096, "sample_rate": 24000, "channels": 1, "bits_per_sample": 16 } ], "default_format": "mp3", "speed": { "min": 0.7, "max": 1.3, "default": 1 }, "max_characters": 4096, "chunk_characters": 900, "streaming": true, "per_thousand_characters": "30" } ]}The key is missing, unknown or revoked: authentication_error / unauthorized.
object
Example
{ "error": { "message": "Send an Aderra API key as a Bearer token.", "type": "authentication_error", "param": null, "code": "unauthorized" }}