Create transcription
curl --request POST \
--url https://api.namuai-lab.com/v1/transcribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.namuai-lab.com/v1/transcribe"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.namuai-lab.com/v1/transcribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "speech-recognition",
"text": "sannu da zuwa",
"language": "ha",
"audio_seconds": 2
}{
"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>"
}
}{
"error": {
"type": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Transcription
Create transcription
Writes down what was said in a recording. Send the audio as a multipart field named file, or as the raw request body with language in the query string. The container is recognised from the file itself: WAV, MP3, M4A/AAC, OGG/Opus (WhatsApp voice notes), WebM, FLAC. Up to 25 MB and 300 seconds. Counts the length of the audio sent. Needs the transcribe scope.
POST
/
v1
/
transcribe
Create transcription
curl --request POST \
--url https://api.namuai-lab.com/v1/transcribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.namuai-lab.com/v1/transcribe"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.namuai-lab.com/v1/transcribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "speech-recognition",
"text": "sannu da zuwa",
"language": "ha",
"audio_seconds": 2
}{
"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>"
}
}{
"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.
Query Parameters
Only when the audio is the raw body. With multipart, send it as a form field.
The language spoken: ha Hausa, dje Zarma, fr French.
Available options:
ha, dje, fr Body
multipart/form-dataapplication/octet-stream