Skip to main content
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.
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:
Response for a two-channel call recording, with Telnyx text-to-speech on the second channel:
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 for every field and error.

Reading the result

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).

Confidence

When a watermark is detected, confidence is that of the best channel. Otherwise it is that of the least certain channel. 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:
  • 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

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

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 for every error code.

Next steps

  • Streaming detection: detect the watermark in a live stream, with Python and Node.js examples.
  • Errors: HTTP error codes, WebSocket error frames, and close codes.