
Michael Trehan
Founder, Protoface
Michael Trehan is the founder of Protoface, the platform for realtime AI avatars and generative media models behind one API.
Before Protoface he was a software engineer at Radiant Nuclear and worked in investment banking at JP Morgan. He is an alum of UC Berkeley’s M.E.T. program.
Articles by Michael

AI NPCs in Games: How They Work and How to Build One
You want a character that answers whatever the player says. Build the loop in order: text, game state, voice, then a face.

AI Video Generator Pricing: Quotas, Credits and Budgets
You are choosing or budgeting for an AI video tool. Compare how each one charges, then work out what a finished minute costs your team.

AI Video Prompt Examples and How to Write Your Own
You have a clip to make and a blank prompt box. Copy a prompt that fits the job, then learn the order of parts that lets you write the next one yourself.

Code-Switching in Voice Agents: Handling Mixed Languages
Your callers mix two languages in one sentence and the agent trips. Fix it stage by stage, then prove it with a test set you can rerun.

Flutter WebRTC: Connecting an App to a Realtime Avatar
You have a Flutter app and a voice agent. Set up WebRTC on both platforms, then put a live avatar on screen without writing a signaling server.

How to Add a Realtime AI Avatar to a React or Angular App
You have a voice agent and a front end. Give the agent a live face with one token endpoint, one hook or service, and one video element.

How to Plan a Hybrid AI and Live-Action Shoot
You have one shoot day and a script that needs three locations. Split the shot list first, then film so the generated shots cut in cleanly.

Is WebRTC Secure? Encryption, Auth and Safe Embeds
The media is encrypted before you write a line of code. Your work is deciding who gets a token, what the browser can see and where an embed may run.

LiveKit vs WebSocket for Realtime Voice and Video Apps
You need live audio between a user and an agent. Decide whether a managed room or your own socket carries it, and what each one leaves you to build.

Load Balancing WebRTC Sessions Across Servers
One media server is full and you need a second. Split signaling from media, pin each session to a server, and scale without cutting live calls.

OpenAI Realtime API vs STT + LLM + TTS Pipelines
You need a voice agent that answers fast and sounds right. Pick the architecture by what you must control, then put a face on it.

OpenTelemetry for GenAI Voice and Avatar Apps
Your agent feels slow and you cannot say which stage is to blame. Trace each turn with standard GenAI spans and add the avatar spans the conventions leave out.

Pipecat Multilingual Voices: English, Spanish, French
Your Pipecat agent answers Spanish and French callers in an English voice. Detect the language per turn and switch voice, prompt and avatar audio with it.

Rust WebRTC: Streaming a Realtime AI Avatar
Your Rust service has to put live audio and video in a browser. Pick the crate, write the signaling, and send real media.

Sending Video Frames over WebRTC: Python and Node Guide
Your server renders frames and a browser has to play them live. Put them on a video track, and WebRTC handles encoding, pacing and loss.

Vapi Voices: Multi-Voice Setup for Realtime AI Avatars
You need the right voice on a Vapi assistant, maybe more than one, and a face that keeps up. Pick the voice, set it, then hand off between voices.

Visemes Explained: Real-Time Lip Sync for AI Avatars
Your avatar's mouth has to match the words. Learn the mouth shapes, where to get them, and how to keep them on the audio clock.

Voice Activity Detection: How Voice Agents Handle Barge-In
Your agent cuts people off, or keeps talking when they interrupt. Both come down to how it detects speech and what it cancels when it does.

WebRTC Echo Cancellation: How It Works and Fails
Your users hear themselves, or your voice agent keeps interrupting itself. Find out what the browser cancels, what it cannot, and how to fix the route.

WebRTC Latency: How to Measure and Reduce It
Your call or avatar feels slow and you do not know which stage to blame. Measure each one in the browser, then fix the largest first.

WebRTC Simulcast: Bandwidth Adaptation for Live Video
Some of your viewers are on fiber and some are on a train. Send three layers, let the SFU pick one per viewer, and check that each layer is really on the wire.

WebRTC Troubleshooting: ICE, Autoplay and Audio Failures
Your call will not connect, or it connects and stays silent. Find the layer that failed in a few minutes, then apply the matching fix.

WebRTC vs WebSocket: Which to Use for Realtime AI
You are picking a transport for a voice agent or avatar. Decide by what travels on each hop, then wire the two together.

What Is a Concept Trailer and When Should You Make One?
You have an idea nobody can picture yet. A concept trailer shows it in a minute or two, if you make it for the right audience at the right time.

What Is a WebRTC SFU? SFU vs P2P vs MCU Explained
You are deciding how media should flow in a call, maybe one with an AI agent or avatar in it. Count the endpoints, then pick the topology.
