Vercel
Run WebSocket voice sessions on Vercel Functions with the Bun runtime, and what Vercel can't host.
Vercel Functions can run a server.ts with the Bun runtime. With it, a function accepts WebSocket
upgrades and runs one voice session per socket. The code is the
Vercel framework page, tested in
examples/framework-snippets/vercel.
Set the runtime in vercel.json:
{ "bunVersion": "1.x" }What works
- WebSocket sessions. The
/wsendpoint upgrades infetchand runs the agent on the socket, with protobuf audio frames. - WebRTC signalling. The
/api/offerroute answers the SDP offer, but the media can't follow: see below.
Limits
- No WebRTC media. SmallWebRTC needs UDP, which Vercel Functions don't carry. Use the WebSocket transport, or run SmallWebRTC on a server.
- One instance per socket. Each WebSocket is pinned to one function instance for its lifetime, and messages don't cross instances. Keep shared state in a database.
- Duration. A function's maximum duration also ends a long session. Check your plan's limit against your longest calls.
- Vercel Daemons are always-on workers with no inbound HTTP or TCP traffic, so they can't serve these endpoints. They suit background workers that pull their own work.
- Next.js on Vercel. A Next.js route handler can answer the offer, but it can't upgrade a WebSocket. See Next.js.
pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.
Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).
Voice agent fully on Cloudflare
Run the whole voice stack on Cloudflare, with Deepgram Flux speech-to-text, a Workers AI LLM and Aura text-to-speech in a Durable Object.
Coming from Pipecat (Python)
How Pipecat's Python API maps to pipedog - naming, options objects, enums, async and cancellation, frames, and what is not ported.