---
title: 5 habits that reduce voice AI debugging
description: Most voice AI debugging time goes to problems that follow a pattern. Here are five habits I built at Deepgram that catch those patterns before they become incidents.
canonical: https://lukeocodes.dev/5-habits-voice-ai-debugging
type: article
locale: en_GB
published: 2026-05-02T00:00:00.000Z
modified: 2026-05-02T00:00:00.000Z
authors:
  - Luke Oliff
section: Engineering
tags:
  - Engineering
  - Developer Experience
  - Voice AI
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/5-habits-voice-ai-debugging#article
        headline: 5 habits that reduce voice AI debugging
        alternativeHeadline: 5 habits that reduce voice AI debugging
        description: Most voice AI debugging time goes to problems that follow a pattern. Here are five habits I built at Deepgram that catch those patterns before they become incidents.
        datePublished: 2026-05-02T00:00:00.000Z
        dateModified: 2026-05-02T00:00:00.000Z
        url: https://lukeocodes.dev/5-habits-voice-ai-debugging
        mainEntityOfPage: https://lukeocodes.dev/5-habits-voice-ai-debugging
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: Engineering, Developer Experience, Voice AI
        articleSection: Engineering
        about:
          - "@type": Thing
            name: Developer Experience
          - "@type": Thing
            name: Voice AI
        abstract: I spent years at Deepgram building integrations and SDK examples. The part of the job that surprised me most was not the model work. It was the debugging. Voice AI debugging is different from debugging a normal API integration. You cannot just read the error message and move on. The audio is invisible.
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/blog/5-habits-voice-ai-debugging/hero.png
        wordCount: 1251
        timeRequired: PT7M
        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: 5 habits that reduce voice AI debugging
            item: https://lukeocodes.dev/5-habits-voice-ai-debugging
---

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

# 5 habits that reduce voice AI debugging

May 2026 · [Engineering](/blog/category/engineering) · 7 min read · [Luke Oliff](/authors/luke)

I spent years at Deepgram building integrations and SDK examples. The part of the job that surprised me most was not the model work. It was the debugging. Voice AI debugging is different from debugging a normal API integration. You cannot just read the error message and move on. The audio is invisible. The transcript is one interpretation of a signal you cannot see. You spend more time figuring out why a transcript looks wrong than you do writing the code that produces it.

Over time I built a set of habits that turned that debugging time down. Not eliminated it, but shrunk it from a multi-hour investigation to a five-minute check. Here are the five that paid for themselves fastest.

## 1. Log the raw API response before you parse it

Every SDK and client library parses the API response into a nice object. That is good for your application code. It is terrible for debugging. By the time the error reaches your catch block, the raw response body is gone. The status code is there, maybe a message, but the actual bytes the API sent back are lost.

The habit is simple: log the raw response body at the debug level before the SDK touches it. One line in your HTTP client middleware:

```javascript
const response = await fetch(url, options);
const text = await response.text();
console.debug('raw response:', text);
const data = JSON.parse(text);
```

This caught every silent failure I ever debugged. An API returns a 200 with an error object inside the body. The SDK parses it as success because the HTTP status is fine. Your code sees an empty transcript and you spend an hour wondering if the audio is broken. The raw body would have shown you the error in the first minute.

I added this to every SDK example I wrote at Deepgram. It was never the wrong call.

## 2. Save every audio file the pipeline touches

When a transcript comes back wrong, you need to see the audio that produced it. If the pipeline transformed the file before sending it (resampled, downmixed, trimmed), the transformed version is what matters, not the original.

Save the preprocessed audio alongside the transcript. Name them with a shared correlation ID so you can match them. A simple convention:

```
transcripts/2026-05-02/call-abc123/raw-audio.wav
transcripts/2026-05-02/call-abc123/preprocessed-audio.wav
transcripts/2026-05-02/call-abc123/transcript.json
```

When someone says the transcript is wrong, you open the preprocessed audio and listen. Nine times out of ten you hear the problem. The audio is clipped. The gain is too low. The resampling introduced artifacts. You fix the preprocessing step and the next transcript is better.

Without the saved audio, you guess. With it, you know. The storage cost is trivial compared to the engineering time it saves.

## 3. Isolate network latency from processing latency

Voice AI pipelines have two latency sources that look identical in logs: network time and processing time. A transcript that takes 3 seconds to return could be 2.5 seconds of network and 0.5 seconds of processing. Or it could be 0.5 seconds of network and 2.5 seconds of processing. Those need different fixes.

The first one means your client is far from the API region. The second means the model is slow on that input.

Measure both separately. In your HTTP client, record the time before the request, the time the response headers arrive, and the time the body is complete:

```javascript
const t0 = performance.now();
const response = await fetch(url, options);
const t1 = performance.now(); // network time (TTFB)
const body = await response.json();
const t2 = performance.now(); // processing time
```

I put this in every demo I built. It told me when to blame the API and when to blame my code. Most of the time it was my code. But the few times it was the API, I had the numbers ready.

## 4. Version your prompt and configuration changes

Voice AI pipelines are configuration-heavy. Keyterm lists, language preferences, model versions, VAD thresholds, encoding parameters. A change to any of these changes the output. When the output changes in a bad way, you need to know what changed.

Version your config files like you version your code. Keep them in the same repository with the same diff tools. When a transcript quality regression appears, diff the config changes between the working version and the broken one.

```yaml
# config-v1.yaml
model: nova-2
language: en-US
keywords: ["api", "error", "timeout"]

# config-v2.yaml
model: nova-3
language: en-US
keywords: ["api", "error", "timeout", "response"]
```

The diff tells you the story. Maybe nova-3 handles keywords differently. Maybe the new keyword is confusing the model. Whatever the cause, you find it by comparing what changed, not by guessing.

## 5. Test with the simplest possible input first

Before you run a complex integration test with a 30-minute meeting recording, test the pipeline with a two-second clip of a single word. A clean WAV file of you saying "hello". That test validates the entire pipeline from file to transcript. If it fails, you know the problem is in the pipeline, not the audio.

When it passes, step up to a five-second clip with silence at the start. Then a clip with background noise. Each step tests one more variable. When one step fails, you know exactly which variable broke it.

The habit is to never skip the simplest test. I broke this rule exactly once and spent three hours debugging a pipeline that failed because the API key had a trailing newline from the environment file. The simplest test would have caught it in thirty seconds.

## How these habits reduce voice AI debugging time

All five habits do the same thing. They make the invisible visible. The raw response, the saved audio, the separate timestamps, the versioned config, the simple test. Each one surfaces information that is normally discarded. That information is what turns a two-hour debugging session into a ten-minute fix.

## FAQ

### How do I correlate audio files with transcripts across services?

Use a shared UUID generated at the start of the pipeline. Pass it as a request header if the API supports it, or embed it in the filename. Store the transcript and the preprocessed audio in the same directory named with that UUID.

### What is the cheapest way to store pipeline audio?

Compress to 16 kHz mono FLAC before storing. FLAC is lossless and typically compresses WAV to about 60% of the original size. For a voice AI pipeline processing thousands of calls per day, a few hundred gigabytes of storage is cheap relative to debugging time.

### Should I log every API response or only errors?

Log every response at debug level and errors at warn or error level. The debug logs are noise until something breaks, then they are the single source of truth. Configure your logging framework to keep debug logs for a rolling window and archive them with the audio files.

### Does saving audio files create a data privacy concern?

Yes. If your pipeline processes personal data, the audio files need the same access controls and retention policies as the transcripts. Store them in the same region with the same encryption. Treat the audio as the sensitive data it is, not a debugging artifact.

### How often does the simple test actually catch something?

Often enough that I never skip it anymore. Environment variable issues, file permission problems, encoding mismatches, stale dependencies. The simple test catches all of them before they become clever bugs that take an hour to reproduce.

[← Newer: Sunday roundup: debugging habits and multilingual speech](/sunday-roundup-may-3-2026)

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