File size: 722 Bytes
9eff59c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | const fs = require('fs');
async function test() {
const audioData = "UklGRiQAAABXRUJQRk1UIAoAAAABAEgA/wAAACQAAABHRU5EIQAAAA=="; // Dummy
try {
const res = await fetch('https://whatsapp-worker-production-0bc0.up.railway.app/v1/ai/transcribe', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer sedap_admin_987654321`
},
body: JSON.stringify({ audioBase64: audioData, filename: 'msg.ogg' })
});
const text = await res.text();
console.log("Status:", res.status);
console.log("Response:", text);
} catch(e) {
console.error(e);
}
}
test();
|