curl --request POST \
--url https://api.namuai-lab.com/v1/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Sannu da zuwa! Muna farin cikin jin muryarku."
}
'
"<string>"{
"error": {
"type": "unknown_voice",
"message": "Unknown voice. Try one of: nadia, warm, fr, mouhamad.",
"request_id": "3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7"
}
}{
"error": {
"type": "missing_api_key",
"message": "Send your key as 'Authorization: Bearer namu_sk_...'.",
"request_id": "3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Speech
Create speech
Turns text into spoken audio in Hausa, Zarma or French. Counts the length of the audio returned against your monthly allowance. Needs the speech scope.
POST
/
v1
/
speech
curl --request POST \
--url https://api.namuai-lab.com/v1/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Sannu da zuwa! Muna farin cikin jin muryarku."
}
'
"<string>"{
"error": {
"type": "unknown_voice",
"message": "Unknown voice. Try one of: nadia, warm, fr, mouhamad.",
"request_id": "3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7"
}
}{
"error": {
"type": "missing_api_key",
"message": "Send your key as 'Authorization: Bearer namu_sk_...'.",
"request_id": "3f2a9c1e5b7d4e8fa0c2b6d9e1f3a5c7"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Your secret key: Authorization: Bearer namu_sk_.... Create one at https://www.namuai-lab.com/account/keys.
Body
application/json
What to say. Up to 2,000 characters.
Maximum string length:
2000Who says it. See GET /v1/voices.
Available options:
nadia, warm, mouhamad, fr The language of the text. Defaults to the voice's first language, and must be one it speaks.
Available options:
ha, dje, fr opus is the smallest file, for phones and weak connections. json returns base64 WAV.
Available options:
wav, mp3, opus, json Response
The audio, or JSON when format is json. Binary responses carry X-Audio-Seconds.
24 kHz, 16-bit PCM, mono.