Native mode
Stream raw audio frames from your own server and get clean frames at your bot.
Use native mode when your own server holds the raw audio. Send one 20 ms frame per message; the clean frame arrives at your redirect URL with the same frame_id.
Message sequence
- Connect to the Enhancer URL with your key and redirect.
- You receive
{"type":"connected","message":"connected successfully"}. - Send the config. You can skip it and use URL parameters or the defaults; a config message wins over URL parameters.
- Your redirect URL is opened and receives
{"type":"ready","message":"Denoise service initialized and ready"}. - Send audio, one frame per message, in real time (one every 20 ms).
datais 16-bit signed samples as JSON numbers: 160 per frame at 8 kHz and 20 ms.
- Your redirect receives each clean frame with the same
frame_id:
- To finish, send
{"type":"close"}. The last frames go to your redirect, then both sockets close.
The data arrays above are cut short; real frames hold 160 samples. Nothing else comes back on your own socket: clean audio and any {"type":"error"} message go to the redirect.