Text to WAV
curl https://aisenseapi.com/services/v1/audio_encode \
-H 'Content-Type: application/json' \
-d '{"data":"Hello from AI SENSE","input_encoding":"utf8","mode":"audible"}' \
--output message.wavThe response is a mono, 48 kHz, 16-bit PCM WAV file with Content-Type: audio/wav. A maximum-size message lasts about 17 seconds. Play it without changing the playback speed. The tones include framing and an integrity check so the receiver can recover the original bytes.
Input fields
| Field | Value |
|---|---|
data | The text or standard Base64 string to encode. The decoded input must be 1 to 128 bytes. |
input_encoding | utf8 for text or base64 for binary bytes. |
mode | audible, high or ultrasound. The default is audible. |
The size limit counts bytes, not letters. A UTF-8 character can occupy more than one byte. For binary input, send standard Base64 with its padding and no whitespace.
{"data":"AAECA/8=","input_encoding":"base64","mode":"audible"}This encodes five bytes, including a zero byte and FF. Decode the WAV to recover those exact bytes. The API generates data tones, not spoken words or a musical interpretation of the input.
When a request fails
Empty or oversized input, malformed Base64 and unsupported modes are refused. Read the JSON error field when the response status is not successful. An error body is not a WAV file.
Two devices, one sound
Both devices need internet access for the API calls. The message travels between them as sound. Start listening on the receiver before you play the complete WAV on the sender. Keep the devices close together in a quiet room and start at moderate volume.
The receiver needs a microphone and permission to use it. Keep its tab visible while recording. A Bluetooth headset, voice-call processing or a microphone noise filter can remove the data tones. If decoding fails, move the devices closer, try the built-in microphone and play the entire sound again.
Audible mode uses twelve tones from 800 to 3000 Hz. Experimental high mode uses twelve tones from 14.0 to 16.2 kHz, and experimental ultrasound mode twelve tones from 18.0 to 20.2 kHz. Every symbol hops between three sets of four tones, so the room's echo of the previous symbols is ignored, and Reed-Solomon repairs damaged bytes. These higher-frequency modes can still be audible. High-frequency playback and capture vary by device, so start with audible mode. The service cannot guarantee high-frequency reception on a particular phone or laptop.
Privacy and limits
The text or bytes you encode and the recording you decode are sent to AI SENSE over HTTPS. The audio conversion does not create a stored file or a share link. The Try page keeps its recording in browser memory until it sends it for decoding or you cancel it. The microphone stops before the upload begins.
Sound carries the message to anyone close enough to record it. It is not encrypted. High-frequency mode does not make a message private. Only send data you intend to share.
No account or API key is required. Requests also count toward the service-wide limits. Keep messages short and wait for a result before trying again.