Skip to content
vp.Ven Petrov
WorkAI demoWritingResourcesResume / CVAboutAt 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

I could hear the assistant, but it could not understand my distorted audio. Three codec tests changed the connection behavior and brought the greeting back; the caller-audio problem remains unresolved.

Ven PetrovUnresolved investigation

The assistant answered my call clearly. When I replied, the audio reaching it was so distorted that even a person could not understand the words. There was no useful transcription, and the agent stayed silent.

I had connected my Telnyx number through Vapi's integration panel. The greeting proved that sound could reach my phone. It did not establish that my reply could make the return trip to speech recognition in a usable form. Without that second direction, there was no conversation.

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 tested the audio formats available in the connection settings. These are codecs, the rules used to encode and decode sound. The tests changed what happened, but none repaired the original caller-audio problem.

One change failed; another broke the connection

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

Next I selected G711U as the only audio codec. VP8 and H.264 were still selected as video codecs. The call disconnected, Vapi reported “unable to decode audio data”, and I could no longer hear the assistant.

I restored the original three audio choices: G722, G711A and G711U. The connection 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

The last step recovered the call. It did not make the caller track usable. Keeping those two outcomes separate is necessary to describe where the investigation stopped.

The documentation suggests a cause to check

Vapi's Telnyx guide describes a possible mismatch on some calls outside North America. Audio can arrive using G.711 A-law while the native integration expects G.711 µ-law. Reading one encoding as the other can produce garbled caller audio and incomplete transcripts.

That fits the class of failure I heard, but I have not established which encoding my calls actually negotiated. The guide also distinguishes this telephone path from browser calls, which use WebRTC. A working browser call would test a different media path.

The suggested next diagnostic was to compare the caller recording at Telnyx with the caller recording at Vapi and inspect the negotiated media format. That comparison has not been completed, and there is no packet-capture result confirming the cause.

The last observed state is still a connected call with clear assistant speech and an unusable caller track. Restoring the original codecs gave me a connection to investigate; a successful audio repair remains open.

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

18 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.Finance evidence desk · Project storyCan an AI reviewer improve a financial explanation?A finance review needs the right explanation as well as the right numbers. I tested one AI analyst, an added reviewer and self-review on the same public report. The added review produced fewer supported answers.Financial review lab · Project storyWhat contributed to an $86 million rise in operating income?I built a financial-report explorer around a question I could check: how did seven income-statement movements add up to an $86 million increase? The same source now supports comparisons of sales, cash flow and reported versus core results.MNQ time-series research · ExperimentA time-series model that failed on later dataA model gained about $2,351 in the research simulation, then lost about $1,728 in three later windows. I followed the experiment from data acquisition and time intervals to costs, evaluation and the decision to reject it for trading.Crude-oil narrative tracker · Project storyFollowing crude-oil news without losing the market numbersI used a short personal experiment to follow global events alongside crude-oil prices and position values. The prototype calculates the numbers before asking Claude Code for an assessment and keeps a limited recent history.NQ/MNQ backtest engine · Technical noteYesterday’s short was blocking today’s trades in the simulatorWhen input stopped before the scheduled close, the strategy forgot a position but a shared counter kept counting it. Closing the old position before resetting the day restored the trade record and released the block.Small-cap edge research · Project storyWhat would make a small-cap price pattern worth testing?I built a Python and DuckDB prototype to turn trading ideas into named tests, compare their costs and revisit them in later periods. The candidates deteriorated under further checks, and the source exposed a misleading pass flag.Gadgeon Europe applications · ExperienceConnected-device dashboards and mobile apps at Gadgeon EuropeThe dashboards let people monitor energy use and control connected devices through data from several APIs. My work covered customized Ionic and Angular apps, integrations, store releases and maintenance.ctxforge · Project storyctxforge: turn “add search” into a task an agent can build“Add search” leaves decisions about data, matching and behavior unanswered. I built an editable toolkit that asks an LLM to uncover those requirements and show its assumptions before a coding agent starts.Sociedades Inactivas enquiries · Technical noteAn enquiry should survive a failed emailA failed notification should not make someone submit the same enquiry twice. The implemented form keeps the saved request and its reference while email delivery is retried; live activation is still pending.Astro local-services website · Project storyKeeping local service pages and their FAQs consistentA city page should only offer services enabled for that location. I used shared Astro templates with explicit availability rules, and one FAQ selection for both the visible page and its structured data.3D Spaces website migration · Project storyMoving 3D Spaces without moving its mailboxThe website could move to Next.js and Vercel, while email still depended on the old host. I carried over the pages, enquiry flow and analytics, then checked what the cutover had actually preserved.Capture CRM · Project storySave the listing now, connect the person when the details arriveA classified listing may arrive before its phone number or contact name. Capture CRM keeps those records separate, then lets a later capture complete the existing listing and bring contact status back to the browsing page.Product-description comparison bench · ExperimentWhere did the product description get that detail wrong?A product description can go wrong when the image is read or when the copy is written. This local bench exposes both steps, lets me switch models and records request measurements. A matched quality comparison is still unfinished.Between Us · Project storyBetween Us: keeping control of a generated filmA more emotional dialogue take still needed convincing acting and framing. I kept the alternatives, widened shots to reveal gestures and changed the workflow when its studio limited the films I wanted to make.Restaurant-service voice agent · ExperimentDesigning a restaurant-service call around the real offerThe first correction was the offer: a paid service had become a free visit in one draft. I then compared how the Spanish voice-agent prompts handled new speakers, technical limits and booking results.Vapi and Telnyx voice integration · Technical noteThe Vapi agent could speak, but it could not hear me clearlyI could hear the assistant, but it could not understand my distorted audio. Three codec tests changed the connection behavior and brought the greeting back; the caller-audio problem remains unresolved.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