---
title: "TIL: Test TTS Voices With Curl"
description: One curl command to compare TTS voice output side by side before you write any integration code. Handy for prototyping or auditing voice quality.
canonical: https://lukeocodes.dev/til-tts-voices-curl
type: article
locale: en_GB
published: 2026-07-14T00:00:00.000Z
modified: 2026-07-14T00:00:00.000Z
authors:
  - Luke Oliff
section: TIL
tags:
  - TIL
  - Text-to-Speech
  - APIs
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-tts-voices-curl#article
        headline: "TIL: Test TTS Voices With Curl"
        alternativeHeadline: "TIL: Test TTS Voices With Curl"
        description: One curl command to compare TTS voice output side by side before you write any integration code. Handy for prototyping or auditing voice quality.
        datePublished: 2026-07-14T00:00:00.000Z
        dateModified: 2026-07-14T00:00:00.000Z
        url: https://lukeocodes.dev/til-tts-voices-curl
        mainEntityOfPage: https://lukeocodes.dev/til-tts-voices-curl
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: TIL, Text-to-Speech, APIs
        articleSection: TIL
        about:
          - "@type": Thing
            name: Text-to-Speech
        abstract: The fastest way to test a TTS voice is a single curl command that pipes audio straight to a file, no SDK or dashboard needed. I learned this the hard way after setting up a full integration just to hear whether a voice parameter did what I expected.
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/og.png?h=TIL%3A+Test+TTS+Voices+With+Curl&d=One+curl+command+to+compare+TTS+voice+output+side+by+side+before+you+write+any+integration+code.+Handy+for+prototyping+or+auditing+voice+quality.&e=Writing
        wordCount: 480
        timeRequired: PT3M
        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: Test TTS Voices With Curl"
            item: https://lukeocodes.dev/til-tts-voices-curl
---

[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: Test TTS Voices With Curl

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

The fastest way to test a TTS voice is a single curl command that pipes audio straight to a file, no SDK or dashboard needed. I learned this the hard way after setting up a full integration just to hear whether a voice parameter did what I expected.

```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": "The quick brown fox jumps over the lazy dog. That sentence is a pangram, which means it contains every letter of the alphabet. Handy for hearing how a voice handles the full phonetic range.",
    "voice_id": "george",
    "audio_format": "mp3"
  }' \
  --output test-george.mp3
```

Swap the voice_id, change the input text, run it again. I keep a shell script with a handful of voice IDs and run them in a loop to A-B compare. No browser, no state, no cache.

### Which TTS parameters should you test with curl?

The voice ID is obvious but the parameters that actually change the output are less so. A JSON payload can carry speed, pitch, emphasis, SSML, and model version. The fastest way to test any of them is the same pattern: change one variable per request, pipe to a new filename, listen back to back.

```bash
# Compare speed
for speed in 0.8 1.0 1.2; do
  curl -s -X POST "https://api.speechify.ai/v1/audio/speech" \
    -H "Authorization: Bearer $SPEECHIFY_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"input\":\"Testing at speed $speed.\",\"voice_id\":\"george\",\"audio_format\":\"mp3\",\"speed\":$speed}" \
    --output "test-speed-$speed.mp3"
done
```

The same trick works for SSML tags, voice personality parameters, or different model tiers. Curl keeps everything stateless and explicit. No hidden state from a dashboard session.

### Why I use curl over SDKs for voice testing

Three weeks into a TTS role I learned that most voice quality issues I was debugging turned out to be things I would have heard in the first five seconds with curl. A misconfigured rate limit, a voice model that sounded different at certain speeds, an SSML tag that one provider interpreted differently from another. The integration code was fine. The parameters were wrong. And I could have known that before writing the first line of it.

### FAQ

#### Can I use curl with other TTS APIs?

Yes. Most TTS APIs follow the same POST pattern. Swap the endpoint URL, auth header, and parameter names. The curl workflow is the same.

#### What if the API returns a binary response?

That is expected. Most TTS APIs return raw audio bytes. The `--output` flag in curl writes them directly to a file. Play it with any media player.

#### Is this faster than using an SDK?

For testing and exploration, yes. An SDK adds setup, imports, and object instantiation before you hear audio. Curl is one command. For production, use the SDK. For figuring out whether "george" sounds better at speed 1.1 or 1.2, curl wins every time.

[← Newer: TTS Quality Has No Single Number Yet](/tts-quality-no-single-number)

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