---
title: "TIL: Read speech marks from the Speechify API response"
description: Every Speechify TTS response includes word-level timing data alongside the audio. Here is how to read speech marks and what you can do with them.
canonical: https://lukeocodes.dev/til-speech-marks-speechify-api
type: article
locale: en_GB
published: 2026-06-23T00:00:00.000Z
modified: 2026-06-23T00:00:00.000Z
authors:
  - Luke Oliff
section: TIL
tags:
  - TIL
  - Text-to-Speech
  - APIs
  - Developer Experience
feed: https://lukeocodes.dev/rss.xml
search: https://lukeocodes.dev/search.json?q={query}
schema:
  - "@context": https://schema.org
    "@graph":
      - "@type": Organization
        "@id": https://ably.com/#organization
        name: Ably
        url: https://ably.com
      - "@type": WebSite
        "@id": https://lukeocodes.dev/#website
        url: https://lukeocodes.dev
        name: Luke Oliff
        alternateName: lukeocodes
        inLanguage: en
        publisher:
          "@id": https://lukeocodes.dev/authors/luke#person
        description: Personal blog and writing by Luke Oliff — developer relations, voice AI, developer experience.
        potentialAction:
          - "@type": SearchAction
            target:
              "@type": EntryPoint
              urlTemplate: https://lukeocodes.dev/blog/search?q={search_term_string}
            query-input: required name=search_term_string
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Staff engineer and Staff Tech Lead for Developer Experience at Ably. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Staff Tech Lead, Developer Experience
        worksFor:
          "@id": https://ably.com/#organization
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
  - "@context": https://schema.org
    "@graph":
      - "@type": Organization
        "@id": https://ably.com/#organization
        name: Ably
        url: https://ably.com
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Staff engineer and Staff Tech Lead for Developer Experience at Ably. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Staff Tech Lead, Developer Experience
        worksFor:
          "@id": https://ably.com/#organization
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
      - "@type": BlogPosting
        "@id": https://lukeocodes.dev/til-speech-marks-speechify-api#article
        headline: "TIL: Read speech marks from the Speechify API response"
        alternativeHeadline: "TIL: Read speech marks from the Speechify API response"
        description: Every Speechify TTS response includes word-level timing data alongside the audio. Here is how to read speech marks and what you can do with them.
        datePublished: 2026-06-23T00:00:00.000Z
        dateModified: 2026-06-23T00:00:00.000Z
        url: https://lukeocodes.dev/til-speech-marks-speechify-api
        mainEntityOfPage: https://lukeocodes.dev/til-speech-marks-speechify-api
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: TIL, Text-to-Speech, APIs, Developer Experience
        articleSection: TIL
        about:
          - "@type": Thing
            name: Text-to-Speech
        abstract: "TIL Tuesday: the Speechify API returns word-level timing in every speech response, and I almost missed it. The first time I called POST /v1/audio/speech I went straight for the audio data and ignored everything else."
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/og.png?h=TIL%3A+Read+speech+marks+from+the+Speechify+API+response&d=Every+Speechify+TTS+response+includes+word-level+timing+data+alongside+the+audio.+Here+is+how+to+read+speech+marks+and+what+you+can+do+with+them.&e=Writing
        wordCount: 777
        timeRequired: PT4M
        publisher:
          "@id": https://ably.com/#organization
      - "@type": BreadcrumbList
        itemListElement:
          - "@type": ListItem
            position: 1
            name: Home
            item: https://lukeocodes.dev
          - "@type": ListItem
            position: 2
            name: Writing
            item: https://lukeocodes.dev/blog
          - "@type": ListItem
            position: 3
            name: "TIL: Read speech marks from the Speechify API response"
            item: https://lukeocodes.dev/til-speech-marks-speechify-api
---

[Luke Oliff.](/)

- [Blog](/blog)
- [CV](/cv)
- [Uses](/uses)
- [User manual](/user-manual)
- [Living with ADHD](/living-and-working-with-adhd)
- [RSS](/rss.xml)

[Luke Oliff · Writing](/blog)

# TIL: Read speech marks from the Speechify API response

Jun 2026 · [TIL](/blog/category/til) · 4 min read · [Luke Oliff](/authors/luke)

TIL Tuesday: the Speechify API returns word-level timing in every speech response, and I almost missed it. The first time I called `POST /v1/audio/speech` I went straight for the audio data and ignored everything else. Turns out the response carries a `speech_marks` object with a `chunks` array containing start and end times for every word.

```json
{
  "audio_data": "<base64-encoded-audio>",
  "audio_format": "mp3",
  "speech_marks": {
    "start": 0,
    "end": 28,
    "start_time": 0,
    "end_time": 1850,
    "value": "Here is the speech marks example.",
    "chunks": [
      { "start": 0, "end": 4, "start_time": 125, "end_time": 375, "value": "Here" },
      { "start": 5, "end": 7, "start_time": 375, "end_time": 500, "value": "is" },
      { "start": 8, "end": 11, "start_time": 500, "end_time": 750, "value": "the" },
      { "start": 12, "end": 18, "start_time": 750, "end_time": 1250, "value": "speech" },
      { "start": 19, "end": 24, "start_time": 1250, "end_time": 1600, "value": "marks" },
      { "start": 25, "end": 32, "start_time": 1600, "end_time": 1850, "value": "example." }
    ]
  }
}
```

Each entry has five fields. `value` is the spoken text. `start_time` and `end_time` are times in milliseconds from the beginning of the audio. `start` and `end` are character indices into the original input text. The outer `speech_marks` object wraps the full sentence, and the `chunks` array has per-word entries.

The first word does not always start at `start_time` 0. There is often a few milliseconds of silence before speech starts, so the first chunk's `start_time` is typically offset from zero.

## Why speech marks matter

Word timing unlocks things raw audio alone cannot do. Subtitles synced to spoken audio, karaoke-style highlighting where each word lights up as it is spoken, and cursor-based navigation in long audio where you jump to the exact second a specific word starts.

For voice agents, speech marks let you render a transcript with live word highlighting while the agent is still speaking. The client gets the full response at once and the timing data means you align the visible text with the audible speech without guessing.

## How to read them

The response from `POST /v1/audio/speech` includes `speech_marks` automatically. No extra parameter needed. The official SDKs expose it as `.speechMarks` or `.speech_marks`. If you call the API directly with curl, decode the JSON response and read `speech_marks.chunks`.

```bash
curl -s -X POST "https://api.speechify.ai/v1/audio/speech" \
  -H "Authorization: Bearer $SPEECHIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "This is the Speechify text to speech API.",
    "voice_id": "george",
    "model": "simba-english",
    "audio_format": "mp3"
  }' | jq '.speech_marks.chunks'
```

That pipe to `jq .speech_marks.chunks` filters out everything but the word timing. Handy for debugging or prototyping.

## What speech marks are not

They are not phoneme-level timestamps. Each entry is a full word, not individual sounds within a word. They are also not guaranteed to cover every word in the input. Punctuation, pauses inserted by SSML tags, and silence between sentences may not all appear as entries. If you need per-character timing or silence detection, that is a separate concern.

The response also carries character index gaps between words. The `start` and `end` values of adjacent words may not connect cleanly. When looking for a word at a specific character index, check if `start` is greater than or equal to your target rather than checking if the index falls within both bounds.

For everything else, speech marks are free and they come with every response. I wish I had spotted them sooner.

## FAQ

#### Do speech marks work with streaming responses?

Not in June 2026 for the basic streaming endpoint. The batch `POST /v1/audio/speech` always returns speech marks, but the streaming `POST /v1/audio/stream` at this point returns plain audio. A dedicated endpoint for streamed speech marks shipped later. For now, the batch endpoint is the reliable path for word timing.

#### How accurate are the word timings?

Accurate enough for subtitle syncing and word highlighting, within a few milliseconds of the actual audio. The timing comes from the model's duration prediction rather than post-hoc alignment, so it matches the generated audio by construction.

#### Do speech marks work with SSML input?

Yes. SSML tags do not break speech marks, but inserted pauses like `<break time="500ms"/>` create gaps in the timing sequence. The entries still cover the spoken words. The gap between one word's `end_time` and the next word's `start_time` reflects the SSML pause.

#### Can I get character-level instead of word-level timing?

The Speechify API returns word-level timing. For per-character alignment you would need an external forced aligner such as Montreal Forced Aligner or WhisperX after the fact.

#### Do cloned voices return speech marks?

Yes. Speech marks work the same way for catalog voices and cloned voices. The model predicts timing regardless of which voice ID you use.

[← Newer: TTS Latency: How Time to First Audio Actually Works](/tts-latency-time-to-first-audio)

[All posts](/blog) →

## Search this site

`GET https://lukeocodes.dev/search.json?q=<words>` returns matching posts as JSON, each with its page URL and its markdown URL. Add `&limit=<1-50>` for more than 10. How it works: [/blog/search](https://lukeocodes.dev/blog/search.md).

```sh
curl "https://lukeocodes.dev/search.json?q=developer+relations"
```

---

© 2026 Luke Oliff. Posts live at the root of this site.

- [GitHub](https://github.com/lukeocodes)
- [LinkedIn](https://www.linkedin.com/in/lukeocodes)
- [X](https://x.com/lukeocodes)
- [Bluesky](https://bsky.app/profile/lukeocodes.dev)
- [Email](mailto:luke@lukeoliff.com)
- [RSS](/rss.xml)

## Cookies

This site sets one analytics cookie, from Google Analytics, and only in a browser that accepts the cookie banner. A client that does not run scripts sets no cookies, so there is nothing to accept or decline here.

[Cookie policy](/cookies)
