.ts file directly (or compile it), npm install express multer namu-ai (JavaScript library), and NAMU_API_KEY set.
1
The server
It receives the browser’s recording, calls
/v1/translate with include_audio, and returns the result. The key never leaves it.server.ts
2
The page
The browser records with
MediaRecorder (WebM Opus), which the API reads as it is.public/index.html
3
Run it
http://localhost:3000, allow the microphone, hold a button and speak.Before real people use it
- Put your own sign-in in front of
/translate, or anyone who finds the page spends your allowance. - Show
heardso both people can see what was understood; that is often where a misunderstanding starts. - For health, legal or money conversations, keep a human interpreter in the loop.
Next
Translation
Every option
Building for weak networks
Make it work on 3G