Talk Webhooks

Webhook events for text-to-speech generation

The Talk API generates events when speech audio is synthesized. These events are delivered through the unified do.dev webhook system.

Event Types

Event TypeTriggerDescription
talk.speech.generatedPOST /v1/talk/speechText-to-speech audio generated

Event Payload

talk.speech.generated

Fired after speech audio is successfully generated.

{
  "eventId": "evt_c3d4e5f6-a7b8-9012-cdef-123456789012",
  "type": "talk.speech.generated",
  "service": "talk",
  "data": {
    "voice": "asteria",
    "format": "mp3",
    "textLength": 256,
    "speed": 1.0
  },
  "livemode": true,
  "createdAt": 1700000000000
}
FieldTypeDescription
data.voicestringVoice ID used for synthesis (e.g., asteria, orion)
data.formatstringAudio format requested (mp3, wav, flac, aac, opus)
data.textLengthnumberCharacter count of the input text
data.speednumberPlayback speed multiplier (0.5 - 2.0)

Subscribing to Talk Events

Create a webhook endpoint that listens to talk events:

curl -X POST https://api.do.dev/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks",
    "enabled_events": ["talk.*"]
  }'

Use Cases

  • Usage monitoring — Track TTS generation volume and character usage across your team
  • Cost tracking — Correlate generation events with your usage-based billing
  • Content pipeline — Trigger downstream workflows when audio is generated (e.g., upload to CDN, attach to content)
  • Voice analytics — Analyze which voices and formats are used most