TTS audioContent Base64 Decoder – Free

Paste a text-to-speech response and this TTS audioContent decoder turns the Base64 in its audioContent field into audio you can play and download. Decoding happens in your browser.

How to use the TTS audioContent Decoder tool

  1. Paste the JSON response into API response. The audioContent field must be at the top level of the object.
  2. Under Audio type, choose the format you requested from the API: WAV, MP3 or Ogg. Choose Download raw bytes if you are not sure.
  3. Select Decode audio to convert the field.
  4. Play the clip in the preview. The Result box shows the decoded size and media type.
  5. Use the Download link to save tts.wav, tts.mp3, tts.ogg or tts.bin.

What the audioContent field holds

Speech synthesis REST APIs in the Google Cloud style answer with a small JSON object whose audioContent property is the entire audio file as Base64. JSON cannot carry raw bytes, so the service encodes them and the client is expected to decode the string and write a file. Client libraries do this automatically. With curl or a plain HTTP call you get the long string and have to decode it yourself.

The container inside depends on the audio encoding named in the request. An MP3 request yields an MP3 stream, an Ogg Opus request yields an Ogg file, and a LINEAR16 request yields 16-bit PCM that already includes a WAV header.

Choosing the audio format

Choose the format returned by your speech service. The decoder checks the file header before offering playback and saves the original bytes with the matching extension.

For headerless audio or another format, select Download raw bytes to save tts.bin.

Example response and result

Select Example to load a 0.1-second WAV tone. Play it or download the same 1,644 bytes as tts.wav.

1,644 bytes · audio/wav

Identifying the real format from the Base64

The first characters of audioContent reveal the container, which helps when you do not know which encoding was requested.

  • UklGR: the letters RIFF, so a WAV file.
  • SUQz: an ID3 tag, so MP3 with metadata in front.
  • Two slashes at the start, as in //N or //u: an MPEG audio frame header, so MP3 without a tag.
  • T2dnU: the OggS marker, so an Ogg container.

Frequently asked questions

Why does the tool say Expected a Base64 string?

The pasted JSON has no string named audioContent at its top level. The field may be nested inside another object or spelled differently, such as audio_content, or the response may be an error object. Paste an object whose first level contains audioContent.

Why will the decoded audio not play?

A format mismatch appears as an error. If the format matches but playback fails, check that the file is complete and that your browser supports its codec. Use PCM to WAV Base64 for headerless PCM.

Can I paste only the Base64 string without JSON?

No. The input is parsed as JSON and the audioContent property is read from it. Wrap a bare string in an object with an audioContent key, including the double quotes, or use Base64 to File for a plain string.

Does it convert MP3 to WAV or change the bitrate?

No. The bytes are written exactly as decoded. The tool only decodes Base64 and labels the result. Use an audio converter if you need a different format.

Is the synthesized speech sent to a server?

No. The response is parsed and decoded locally, and the preview plays from memory in your browser tab.

Does the decoder work with responses from other speech APIs?

It works with any JSON object that has a top-level audioContent string. APIs that return binary audio directly or use another field name need a different route, such as the AI API Base64 Extractor to locate the field.

Related tools