Skip to main content
POST
/
v1
/
speech
JavaScript
import Spitch from 'spitch';

const client = new Spitch({
  apiKey: 'My API Key',
});

const response = await client.speech.generate({ language: 'yo', text: 'text', voice: 'sade' });

console.log(response);

const content = await response.blob();
console.log(content);
This response does not have an example.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

A request to generate speech in dataset.

Attributes: language: the language of the text to be generated text: the text for which audio is to be generated voice: the voice to use to generate the audio model: the model to use to generate the audio format: the output format of the audio file

language
enum<string>
required
Available options:
yo,
en,
ha,
ig,
am
text
string
required
voice
enum<string>
required
Available options:
sade,
segun,
femi,
funmi,
amina,
aliyu,
hasan,
zainab,
john,
jude,
lina,
lucy,
henry,
kani,
ngozi,
amara,
obinna,
ebuka,
hana,
selam,
tena,
tesfaye
model
enum<string> | null
default:legacy
Available options:
legacy
format
enum<string>
Available options:
wav,
mp3,
ogg_opus,
webm_opus,
flac,
pcm_s16le,
mulaw,
alaw

Response

Successful Response

The response is of type file.