> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio watermark detection

> Check whether audio was generated by Telnyx text-to-speech. Upload a file over HTTP or stream audio over a WebSocket, and read the per-channel result and its confidence.

Supported Telnyx text-to-speech models embed an inaudible watermark in the speech they synthesize. The audio watermark detection API reads audio and answers one question: does it contain that watermark, that is, was it generated by Telnyx text-to-speech?

The API answers only whether the watermark is present, and how confident the answer is. It never returns the watermark payload or the organization the audio was synthesized for.

| Interface | Endpoint | Use it for |
| - | - | - |
| HTTP | `POST https://api.telnyx.com/v2/audio_watermark_detections` | A recorded file, up to 100 MB and 60 minutes per channel. The response carries the result. |
| WebSocket | `wss://api.telnyx.com/v2/audio_watermark_detections/stream` | Audio that is still coming in, such as a live call. A `detection` message arrives as soon as the watermark reads. See [Streaming detection](https://developers.telnyx.com/docs/voice/watermark-detection/websocket.md). |

The API detects only the Telnyx watermark. Speech from other text-to-speech services, from third-party voices offered through Telnyx, and from Telnyx models that do not embed the watermark carries no Telnyx watermark: the result is `watermark_detected: false`. A `false` result does not prove that the speech is human.

## Quickstart

Send the audio as a `multipart/form-data` part named `file`:

```bash theme={null}
curl https://api.telnyx.com/v2/audio_watermark_detections \
  -H "Authorization: Bearer $TELNYX_API_KEY" \
  -F file=@call-recording.wav
```

Response for a two-channel call recording, with Telnyx text-to-speech on the second channel:

```json theme={null}
{
  "data": {
    "record_type": "audio_watermark_detection",
    "id": "257ef836-7f93-49e2-b282-b49289463a68",
    "watermark_detected": true,
    "confidence": "high",
    "channels": [
      { "channel": 0, "watermark_detected": false },
      { "channel": 1, "watermark_detected": true }
    ],
    "audio": {
      "duration_millis": 20280,
      "sample_rate": 16000,
      "format": "wav",
      "channels": 2
    },
    "created_at": "2026-12-04T14:50:25.200Z"
  }
}
```

The request is synchronous. A 30-second call reads in about a second; a 30-minute recording can take 15 to 30 seconds. Set the HTTP client timeout to at least 120 seconds for long files.

See the [API reference](https://developers.telnyx.com/api-reference/audio-watermark-detection/detect-the-telnyx-tts-watermark-in-an-audio-file.md) for every field and error.

## Reading the result

| Field | Description |
| - | - |
| `watermark_detected` | `true` when the watermark read on at least one channel. |
| `confidence` | `high`, `medium`, or `low`: how much to rely on `watermark_detected`. See [Confidence](#confidence). |
| `channels` | One entry for each channel, in channel order, with its own `watermark_detected`. |
| `audio` | What was read: `duration_millis`, `sample_rate`, `format`, and number of `channels`. |
| `id` | Identifier of this detection. Detections are not stored, so it cannot be retrieved later. Quote it, or the `X-Request-Id` response header, when you contact support. |

A `true` result is very unlikely to be wrong: the watermark carries a checksum, and the API reports a detection only when the checksum matches. A `false` result means that no watermark read; the audio can still be synthetic, or watermarked audio can be too damaged to read (see [What affects detection](#what-affects-detection)).

### Confidence

When a watermark is detected, `confidence` is that of the best channel. Otherwise it is that of the least certain channel.

| Value | With `watermark_detected: true` | With `watermark_detected: false` |
| - | - | - |
| `high` | The watermark read directly. | No sign of a watermark in at least 20 seconds of audio, or the channel is digital silence. |
| `medium` | The watermark read only after a wider search, for example after skipping unmarked stretches. | No sign of a watermark, but in less than 20 seconds of audio. |
| `low` | Not used. | The audio shows signs of a watermark that could not be read, for example after heavy compression; or there is less than 2 seconds of audio. |

Treat `false` with `low` confidence as inconclusive. If you have a longer or less compressed copy of the audio, check that copy.

### Channels

Every channel is read on its own. In a call recorded with one channel per leg, the Telnyx text-to-speech audio is on one channel and the other party on the other; `channels` shows which leg carries it. Send the separate channels when you have them: in a mono mix of both parties, the other voice masks the watermark, and detection is less reliable.

## What affects detection

Detection needs a few seconds of the synthesized speech. The figures below are approximate, measured on Telnyx text-to-speech output across many voices:

| Audio | 8 seconds | 12 seconds | 20 seconds |
| - | - | - | - |
| Text-to-speech output as synthesized | about 85% | about 88% | about 93% |
| The same speech after a phone call and an 8 kHz MP3 call recorder | about 72% | about 87% | about 92% |

* **Low-bitrate codecs remove the watermark.** AMR-NB at 7.95 kbit/s or lower, Opus at 8 kbit/s or lower, and MP3 at 16 kbit/s are not read reliably.
* **Edited audio reads less well.** A recording assembled from pieces, such as a clip looped or spliced, can fail to read even when each piece is watermarked.
* **Repeated prompts in a call read less well.** In a call with several utterances, a prompt that is replayed rather than synthesized fresh, for example from a cache, can fail to read. Freshly synthesized utterances read as one stream.
* **Less than 2 seconds of audio** cannot be read.

## Supported audio

| | HTTP | WebSocket |
| - | - | - |
| Formats | WAV (PCM, µ-law, A-law, float), MP3, FLAC, OGG (Vorbis or Opus), AIFF | Raw `l16` (16-bit little-endian PCM), `mulaw`, or `alaw` |
| Sample rate | 8 kHz to 48 kHz read as is; other rates are resampled to 24 kHz | 8000 to 48000 Hz |
| Channels | Up to 8 | Up to 2, interleaved |
| Size | Up to 100 MB | Frames of up to 65,536 bytes |
| Duration | Up to 60 minutes per channel | 590 seconds per session, and up to 60 minutes of audio |

AAC/M4A and video containers are not supported. Convert them first, for example:

```bash theme={null}
ffmpeg -i input.m4a output.wav
```

## Limits and access

* The audio is held in memory for the read only. Telnyx does not store it.
* Pretrial and everroam accounts cannot use the API. Requests from those accounts fail with `403`.
* When detection is busy, requests fail with `503` and a `Retry-After` header. Retry after that many seconds.

See [Errors](https://developers.telnyx.com/docs/voice/watermark-detection/errors.md) for every error code.

## Next steps

* [Streaming detection](https://developers.telnyx.com/docs/voice/watermark-detection/websocket.md): detect the watermark in a live stream, with Python and Node.js examples.
* [Errors](https://developers.telnyx.com/docs/voice/watermark-detection/errors.md): HTTP error codes, WebSocket error frames, and close codes.
