r/reactjs • u/927tanmay • Aug 14 '26
Show /r/reactjs I open-sourced a React component that runs a full 3D AI voice avatar (Whisper + TTS + lip-sync) entirely in the browser
Hey React devs,
Building voice-enabled 3D avatars usually requires tying together 5 different cloud APIs and messy Three.js canvas code.
I wanted to make it as simple as a single npm install — one component inside your R3F canvas:
<Canvas>
<AiVoiceAvatar avatarPreset="ananya" />
</Canvas>I just open-sourced react-ai-voice-avatar. It handles Whisper (speech-to-text) and Kokoro (text-to-speech) entirely in background Web Workers, and drives a 3D avatar with 60 FPS ARKit facial blendshapes on the main thread using React Three Fiber.
For the "thinking" part you have two options: run the LLM strictly locally via WebGPU (Qwen 0.5B), or hook it up to your own backend with the onSubmit prop to use ChatGPT/Claude — the avatar natively reads streamed responses.
Heads up on expectations: the first load downloads ~90 MB of models (cached after that), it's English-only for now, and it's happiest on Chrome/Edge - Safari automatically falls back to a lighter TTS model when it hits WASM memory limits. MIT licensed.
GitHub: https://github.com/927tanmay/react-ai-voice-avatar
Live Demo: https://react-ai-voice-avatar.vercel.app/
I had to do a lot of crazy bundling tricks to get the ONNX/WebGPU workers to bundle seamlessly in Vite and Next.js (both verified working). I'd love to hear your feedback on the component architecture!
1
u/Mission-Switch-7711 Oct 22 '26 edited Oct 22 '26
Tried the live demo on mobile chrome for Android. After clicking on "Talk to it", the download reaches 99% then crashes
1
u/falconmick Aug 14 '26
Crashes on iOS after downloading the model
1
u/Miserable_Ship8979 Aug 14 '26
Tested the live demo on my pc and it runs fine. Running entirely in browser is surprisingly good. Quick question: I want to use your 3D Avatar and TTS, but feed it text from my own custom LLM. Is it viable.