Skip to content
vp.Ven Petrov
WorkWritingAboutAt a glance
← Projects & notes
Vapi and Telnyx voice integrationTechnical note · 3 min read

The Vapi agent could speak, but it could not hear me clearly

My Telnyx number connected to the assistant, but the caller audio was distorted. Three codec tests recovered the connection without fixing that original problem.

Ven PetrovUnresolved investigation

I called the Telnyx number I'd connected to my Vapi assistant. The agent answered and I could understand its voice. When I spoke, the audio reaching the agent was so distorted that even a person couldn't understand it. There was no useful transcription, and the agent stayed silent.

The call had two audio directions. The greeting travelled from the assistant to my phone. My reply had to travel back through the telephone connection to the speech-recognition service. Hearing the greeting established that one direction worked; it didn't establish that my voice arrived in a usable form.

The two audio directions behaved differently

assistant → phoneClear audio

The call connected and the caller could understand the agent.

caller → recognitionDistorted audio

The caller's speech was unintelligible at the agent side.

Reported observations from the test calls. The codec mismatch described in Vapi's documentation remains a hypothesis for this case.

I had imported the number through Vapi's Telnyx integration panel. I started testing the audio formats offered in the connection settings. These are codecs: the rules used to encode and decode the sound.

The three tests

Telnyx's assistant suggested adding Opus. I enabled it and called again. The distortion remained.

Next I left G711U as the only selected audio codec. VP8 and H.264 were still selected as video codecs. That configuration made the connection worse: the call disconnected, Vapi showed “unable to decode audio data” and I couldn't hear the assistant anymore.

I then restored G722, G711A and G711U, the original three audio choices. The call connected again and the assistant's voice returned. My incoming audio was still distorted.

Change I tested Connection My voice reaching the agent
Add Opus to the original setup Connected Still distorted
G711U audio only, VP8/H.264 still selected Disconnected Decode error
Restore G722, G711A and G711U Connected again Still distorted

That last test recovered the call, not the original problem. It would be misleading to call it a successful audio fix just because the greeting returned.

A plausible explanation still needs a recording

Vapi's Telnyx guide describes a failure that could fit: some calls outside North America can arrive using G.711 A-law while the native integration expects G.711 µ-law. Interpreting one encoding as the other can produce garbled caller audio and incomplete transcripts. The guide also distinguishes this telephone path from browser calls, which use WebRTC.

That is a hypothesis for this investigation. I haven't established which encoding was actually negotiated on my calls.

The suggested next diagnostic was to compare the caller recording at Telnyx with the caller recording at Vapi and inspect the negotiated media format. I don't have that completed comparison. The last observed state remains a connected call, clear assistant speech and an unusable caller track.

Project sources & checks
Actual call feedback

User reports describe clear assistant audio, unintelligible caller audio, the unsuccessful Opus test, a G711U-only audio configuration that disconnected and restored connectivity after the original codecs were re-enabled.

Relevant Vapi documentation ↗

The native Telnyx guide describes a possible A-law/µ-law mismatch on some calls outside North America. That explanation has not been confirmed for these calls.

Unresolved work

No successful repair, completed comparison of the two providers’ caller recordings or packet-capture result is established.

On this page
Sources & checks
VapiTelnyxVoice agentsDebuggingAudio

Connected to this

All writing
Restaurant-service voice agent · Experiment

Designing a restaurant-service call around the real offer

Ven PetrovSoftware engineer · Barcelona
GitHub ↗LinkedIn ↗Email ↗

Find a project or a note

17 results

Transfutur ERP · ExperienceERP for transport and logisticsAs the sole engineer, I built an ERP from zero for transport and logistics. It supported roughly €5–6 million in annual invoicing across two offices, and I kept it running for about a year.Financial review lab · Project storyExploring a financial report with Python and FastAPII started with one income change, then opened up the same 54-page report: products, regions, cash flow, core adjustments and a dataset whose figures lead back to the source.Crude-oil narrative tracker · Project storyCrude-oil research from global news and market dataI wanted help following global events that could matter for crude oil. The prototype combines news research with calculated market and position values, while keeping recent assessments separate from the longer numeric history.MNQ time-series research · ExperimentTime-series prediction experimentsAn exploration of high-resolution market data: choosing what to acquire, checking its limits, comparing time intervals and testing whether a prediction survived later data and the cost of acting on it.NQ/MNQ backtest engine · Technical noteA missing closing bar left the simulator’s short position openThe strategy reset for a new day while a shared counter still counted yesterday’s short. A small replay shows why closing the position has to happen before clearing its state.Small-cap edge research · Project storyTurning small-cap trading ideas into repeatable researchI asked Claude Code for a fresh research system that could test named price patterns, compare later periods and carry its methodology into new sessions. One candidate shows how features, entry timing and costs fit together.Gadgeon Europe applications · ExperienceConnected-device dashboards and mobile apps at Gadgeon EuropeI worked on Ionic and Angular applications that brought several APIs into dashboards for energy monitoring and connected-device control, with releases and maintenance across multiple client versions.ctxforge · Project storyctxforge: discovering what to build before codingA context discovery framework that asks an LLM to act like a senior engineering interviewer: understand the idea, uncover requirements and agree the scope before an agent starts building.Sociedades Inactivas enquiries · Technical noteSaving an enquiry before trying to send its emailOn the Sociedades Inactivas catalogue, a visitor can ask about a company or send a general enquiry. The form separates saving that request from delivering its notification, including when the visitor retries.Astro local-services website · Project storyA local-services site assembled from city, service and FAQ recordsThe Astro site describes flooring and other local services across different cities. Shared templates check availability, read the matching content and select one FAQ set for both visitors and structured data.3D Spaces website migration · Project storyMoving 3D Spaces to Next.js while its email stayed on the old serverI rebuilt the virtual-tour website with AI coding collaborators, preserving its content and URLs. The cutover also had to protect the mailbox, enquiry flow and existing analytics history.Capture CRM · Project storyConnecting classified listings to contacts in a small CRMA Chrome extension and Next.js dashboard bring classified listings, platform profiles and contact history together. Saving a listing again can add the person who was missing from an earlier import.Product-description comparison bench · ExperimentComparing one model call with separate vision and writing stepsA small product-description tool lets me inspect the visual analysis before the copy is written, change the model used for each step and compare request measurements.Between Us · Project storyBetween Us: why I kept the first take and widened the shotI compared dialogue takes, asked for wider shots and more physical acting, then changed the workflow when its studio limited the scenes I wanted to make.Restaurant-service voice agent · ExperimentDesigning a restaurant-service call around the real offerI worked through a Spanish outbound agent prompt, corrected a free visit to the actual paid service and compared how two drafts handled transfers and bookings.Vapi and Telnyx voice integration · Technical noteThe Vapi agent could speak, but it could not hear me clearlyMy Telnyx number connected to the assistant, but the caller audio was distorted. Three codec tests recovered the connection without fixing that original problem.Warloop: Echoes of Solmara · Project storyWarloop: turning generated character art into a playable prototypeGood-looking character images became tiny figures, a backwards walk and misplaced bosses in the game. I worked through the gap between generated art and playable behavior.
esc to close · Tab to move through results