CognxSafeTrack
feat: audit and hardening of audio pipeline, AI localization, and WhatsApp UX improvements
9eff59c Download test-transcribe.js from safetrack/edtech: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/spaces/safetrack/edtech/resolve/main/test-transcribe.js
- Command line
-
hf download hf://spaces/safetrack/edtech/test-transcribe.js
-
curl -L -o test-transcribe.js https://huggingface.co/spaces/safetrack/edtech/resolve/main/test-transcribe.js
722 Bytes
| 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(); | |