---
title: ffmpeg taught me more about voice AI than the docs did
description: The first time I debugged a voice AI integration, ffmpeg saved me. It is still the most useful tool in my kit, and it is not even designed for voice.
canonical: https://lukeocodes.dev/ffmpeg-voice-ai-debugger
type: article
locale: en_GB
published: 2026-05-15T00:00:00.000Z
modified: 2026-05-15T00:00:00.000Z
authors:
  - Luke Oliff
section: Developer Experience
tags:
  - Developer Experience
  - Voice AI
  - Engineering
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/ffmpeg-voice-ai-debugger#article
        headline: ffmpeg taught me more about voice AI than the docs did
        alternativeHeadline: ffmpeg taught me more about voice AI than the docs did
        description: The first time I debugged a voice AI integration, ffmpeg saved me. It is still the most useful tool in my kit, and it is not even designed for voice.
        datePublished: 2026-05-15T00:00:00.000Z
        dateModified: 2026-05-15T00:00:00.000Z
        url: https://lukeocodes.dev/ffmpeg-voice-ai-debugger
        mainEntityOfPage: https://lukeocodes.dev/ffmpeg-voice-ai-debugger
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: Developer Experience, Voice AI, Engineering
        articleSection: Developer Experience
        about:
          - "@type": Thing
            name: Developer Experience
          - "@type": Thing
            name: Voice AI
        abstract: A developer in the Deepgram Discord had audio that would not transcribe. They were sure the model was broken. They sent me the file. I opened it with ffplay and heard thirty seconds of silence followed by a short burst of someone speaking right into the mic.
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/blog/ffmpeg-voice-ai-debugger/hero.png
        wordCount: 875
        timeRequired: PT5M
        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: ffmpeg taught me more about voice AI than the docs did
            item: https://lukeocodes.dev/ffmpeg-voice-ai-debugger
---

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

# ffmpeg taught me more about voice AI than the docs did

May 2026 · [Developer Experience](/blog/category/developer-experience) · 5 min read · [Luke Oliff](/authors/luke)

A developer in the Deepgram Discord had audio that would not transcribe. They were sure the model was broken. They sent me the file. I opened it with ffplay and heard thirty seconds of silence followed by a short burst of someone speaking right into the mic. The rest of the file was 48 kHz stereo silence with metadata headers that looked right but payload that was empty.

ffmpeg found it in one command. Not a Deepgram tool. Not a voice AI SDK. A twenty-year-old media utility that every developer already has installed.

I spent the first few months at Deepgram learning the stack the wrong way. Read the docs, built the integrations, assumed the STT model was the source of every problem. It almost never was. Most of the time, the issue was in the audio itself. Wrong sample rate. Unexpected codec. Variable bitrate that the streaming endpoint did not like. Mono when stereo was expected, or the other way round. And the only tool that gave me a clear picture of what was actually in the audio file was ffmpeg.

## What ffmpeg reveals about voice AI problems that nothing else does

The first thing you learn in voice AI debugging is that most audio files lie about what they are. The extension says WAV. The file header says 16-bit 16 kHz mono. You run `ffprobe` and it shows the real story: 44.1 kHz, 24-bit, the file is actually 48 kHz upsampled to a wrong format.

```bash
ffprobe -v quiet -print_format json -show_format -show_streams mystery_audio.wav
```

That JSON output has saved me more times than any SDK error message. The `sample_rate` field tells you what the audio actually is. The `codec_name` tells you if the file was compressed with something the API does not support. The `duration` tells you whether the file is sixty seconds or six seconds of audio padded with silence.

ffmpeg's real power is that it sits between the raw audio and the API call. It can resample, re-encode, trim silence, merge channels, and split stereo into mono. All without installing a DAW or opening an audio editor. I used it to build a quick validation script that checked every property the Deepgram API cared about before sending the request. It caught bad files in milliseconds instead of waiting for the API to time out.

## The one-liner I use most

```bash
ffmpeg -i input.wav -ar 16000 -ac 1 -f wav output.wav
```

Resample to 16 kHz mono WAV. This is the format nearly every STT API expects for streaming, including Deepgram at the time. The command takes milliseconds and turns almost any audio file into something the API will accept without complaint. I put this in a shell function on day three and have not stopped using it since.

## What this taught me about developer experience

This is the part that stuck with me longer than the ffmpeg commands. The documentation for every STT API tells you the supported formats. None of them tell you how many integrations fail because of format mismatch rather than model accuracy. And very few developers know that ffprobe exists.

I ended up writing a tiny CLI wrapper that wrapped ffprobe and the Deepgram SDK into one tool. You pointed it at an audio file and it told you two things: what the file actually contained, and whether the API would accept it. Saved a lot of Discord threads. That tool never shipped as a product, it was just a shell script in my dotfiles, but it was the most practical thing I built in those first months.

The lesson was not about ffmpeg. It was about the gap between what the API docs say and what developers actually hit. The docs tell you the format constraints. They do not tell you that most developers sending you audio files have no idea what format they are sending. The tooling gap is where the real friction lives.

### FAQ

#### Why does audio format matter for speech-to-text APIs?

STT models are trained on specific sample rates and channel configurations. Feeding them mismatched audio causes silent failures, degraded accuracy, or dropped connections. The model tries to process whatever it receives, but garbage in means garbage out, and the API rarely tells you the audio was the problem.

#### What is the most common audio format mistake developers make?

Sending stereo audio to a mono pipeline, or sending high-sample-rate files without resampling. Most streaming STT endpoints expect 16 kHz 16-bit mono PCM. Most audio recordings come out of phones and meeting software at 44.1 or 48 kHz stereo. The mismatch is invisible until the transcript comes back wrong.

#### Can ffmpeg fix bad audio before sending it to an STT API?

Yes. Resampling, channel mixing, silence trimming, and format conversion are all single-line ffmpeg commands. The tool is not designed for voice AI, but it handles every audio preprocessing step a developer needs before calling a speech API.

#### Is this still relevant with newer STT models?

More relevant, not less. Newer models handle a wider range of input formats, but robustness is not the same as optimal. Preprocessing still improves accuracy, reduces latency, and avoids edge cases that newer models inherit from their training distributions.

[← Newer: 5 SDK anti-patterns I keep fixing in voice AI](/5-sdk-anti-patterns-voice-ai)

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