←
Peter McKee691 posts
Peter McKee avatar

Peter McKee

@pmckee

Mentor | Coach | Coder | AI Engineer

◷ Joined December 2010▧ 51 Photos and videos
Peter McKee avatar
Peter McKee@pmckee·Nov 12

Dumping TTS frames before an audio track connects and killing the call while the buffer drains makes voice agents sound broken. Wrote a post on how to start and end a Python voice agent call without clipping first or last words:dev.to/pmckeetx/start-and-en…

PolyAI avatar
⟳ Peter McKee retweeted
PolyAI@polyaivoice·Oct 26

Sign up for the Dialog-RSN-1 API before November 19th, every developer who builds on it starts with @cartesia Sonic as the voice, and your first $100 is on us. Under 300ms median first-token latency, plus the highest quality and safety scores of any real-time-capable model. 🔑 Get your API key: bit.ly/4knljLA

Post attachment
Peter McKee avatar
Peter McKee@pmckee·Oct 26

The tests run the real agent against a fake realtime server. A fake that speaks the holding line in the same order as the real server caught a hang when the agent failed before the line finished. Code: github.com/pmckeetx/dialog-r…

Peter McKee avatar
Peter McKee@pmckee·Oct 26

An agent behind a tool took 4 to 5 seconds in my runs. That's dead air on a call. Mark one tool argument "poly_spoken": true and the model writes a line the server speaks while the tool runs. First words in about half a second.

Peter McKee avatar
Peter McKee@pmckee·Oct 26

LangChain tool to realtime tool is one line: {"type": "function", **convert_to_openai_function(tool)} convert_to_openai_tool is the wrong one here. It nests everything under "function", and the Realtime API wants it flat.

Peter McKee avatar
Peter McKee@pmckee·Oct 26

Give your LangChain tools a voice without wiring up STT, turn detection and TTS yourself. Dialog-RSN-1 hears the caller and writes the reply; the API voices it. LangChain tools and a create_agent do the work. ~270 lines of Python, with tests. petermckee.dev/blog/build-a-…

PolyAI avatar
⟳ Peter McKee retweeted
PolyAI@polyaivoice·Oct 22

“Hello? Is anyone there?” 🤔 That’s what callers say when a voice agent takes a beat too long. AI can write production code, but many agents still can’t tell when to speak on a live call. Dialog-RSN-1 hears the caller’s audio and handles the whole turn in a single pass, so callers hear a reply in under 1 second. Independent benchmarking by Coval found it the strongest realtime model they’ve tested on production-style calls. @pmckee, @Addlesee_AI, and @matthen2 take you inside the model in Part 1 of Let’s Dialog: Building the Next Voice Agents. Grab your spot: bit.ly/4dVUc6B

Post attachment
Peter McKee avatar
Peter McKee@pmckee·Oct 22

A browser voice assistant in ~550 lines of JS. Mic audio streams to Dialog-RSN-1, which hears it directly, detects end of turn and streams the reply back as speech. No STT, LLM, TTS chain. Ships as one <voice-assistant> custom element. Write-up: petermckee.dev/blog/add-a-vo…

Peter McKee avatar
Peter McKee@pmckee·Oct 22

Vite 8 library mode bundles React 19, the CSS and the worklet (as a Blob URL) into one ES module, ~81 kB gzipped, in a Shadow DOM. Code, plus a test site to drop it into: github.com/pmckeetx/dialog-r…

Peter McKee avatar
Peter McKee@pmckee·Oct 22

Audio: an AudioWorklet turns float32 into 16-bit PCM in 20 ms chunks at the native rate, and the server resamples. Replies are 24 kHz PCM16, scheduled as back-to-back AudioBuffers. On barge-in the server cancels the reply. The client just flushes its queue.

Peter McKee avatar
Peter McKee@pmckee·Oct 5

AI After Hours, London, Wed 14 Oct, 6 to 9 PM. Bring a laptop. Join a small team with a PolyAI engineer at the table and build a working agent for a bank or insurer in 90 minutes. AWS covers food and drinks. poly.ai/events/ai-after-hour…

Peter McKee avatar
Peter McKee@pmckee·Sep 4

We've been running Dialog-RSN-1 in production for weeks ~250k live production ~2.5M model turns ~100k calls in the last 7 days ~50k on the peak day ~20 customer accounts Speech-native. no transcript step, sub-300ms median model first-token. poly.ai/blog/PolyAI-dialog-r…

Peter McKee avatar
Peter McKee@pmckee·Sep 2

A caller says "Matthew with two Ts." The ASR types "Matthew with to tease." Your LLM is done. Dialog-RSN-1 skips the text bottleneck. Raw audio + conversation history + your prompt, so it hears what transcripts get wrong. Mood, noise, accents too. poly.ai/dialog-rsn-1-early-a…