Speech-to-Text API
Transcribe audio to text in Ghanaian languages
💰 Cost: 3 credits per request
Simple explanation
Upload or send base64-encoded audio (WAV/MP3/M4A/WebM). The API returns a text transcript and detected language.
Endpoint
POST https://api.bisakofi.com/api/sttRequest
Body Parameters
audio (required): Base64-encoded audio data (supports WAV, MP3, M4A, WebM)
language (required): Language code: tw, ee
Response
{
"success": true,
"transcript": "Akwaaba! Wo ho te sen?",
"language": "tw",
"creditsRemaining": 97
}Example
const fs = require('fs');
const audioBuffer = fs.readFileSync('audio.mp3');
const audioBase64 = audioBuffer.toString('base64');
const response = await fetch('https://api.bisakofi.com/api/stt', {
method: 'POST',
headers: {
'X-API-Key': 'bsk_your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
audio: audioBase64,
language: 'tw'
})
});
const data = await response.json();What did you think of this content?
It was helpful
It was not helpful
I have a feedback