npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@marcosremar/talking-head-avatar

v0.3.1

Published

React 3D avatar component with integrated chat and lip-sync capabilities

Readme

@marcosremar/talking-head-avatar

A React component for rendering interactive 3D avatars with integrated chat, voice recognition, and lip-sync capabilities.

Features

  • 🎭 3D Avatar with facial expressions and animations
  • 🎤 Voice input support with Voice Activity Detection
  • 💬 Text and voice chat integration
  • 👄 Real-time lip-sync animation
  • 🎨 Customizable themes and styling
  • 📱 Mobile-friendly and responsive

Installation

npm install @marcosremar/talking-head-avatar

or

yarn add @marcosremar/talking-head-avatar

Quick Start

import { TalkingHeadAvatar } from '@marcosremar/talking-head-avatar';

function App() {
  return (
    <div style={{ width: '100%', height: '600px' }}>
      <TalkingHeadAvatar 
        apiUrl="https://your-backend-api.com"
        initialMessage="Hello! How can I help you today?"
      />
    </div>
  );
}

Advanced Usage

With Custom Configuration

import { TalkingHeadProvider, Avatar, UI } from '@marcosremar/talking-head-avatar';
import { Canvas } from '@react-three/fiber';

function App() {
  return (
    <TalkingHeadProvider 
      config={{
        apiUrl: 'https://your-api.com',
        assetsUrl: 'https://your-cdn.com/assets',
        theme: 'dark',
        onError: (error) => console.error('Avatar error:', error)
      }}
    >
      <div style={{ width: '100%', height: '600px' }}>
        <Canvas>
          <Avatar />
        </Canvas>
        <UI />
      </div>
    </TalkingHeadProvider>
  );
}

Using Hooks

import { TalkingHeadProvider, useTalkingHead } from '@marcosremar/talking-head-avatar';

function ChatInterface() {
  const { sendMessage, sendVoiceMessage, loading, messages } = useTalkingHead();
  
  const handleSendMessage = async () => {
    const response = await sendMessage('Hello!');
    console.log('Avatar response:', response);
  };
  
  return (
    <div>
      <button onClick={handleSendMessage} disabled={loading}>
        Send Message
      </button>
    </div>
  );
}

Props

TalkingHeadAvatar

| Prop | Type | Default | Description | |------|------|---------|-------------| | apiUrl | string | http://localhost:4001 | Backend API URL | | assetsUrl | string | /models | URL for 3D model assets | | initialMessage | string | - | Initial message from avatar | | onMessage | function | - | Callback when avatar sends a message | | onError | function | - | Error handler | | theme | string | 'light' | Theme ('light' or 'dark') | | cameraZoom | boolean | false | Enable camera zoom | | showControls | boolean | true | Show UI controls | | enableVoice | boolean | true | Enable voice input | | className | string | '' | Additional CSS classes | | style | object | {} | Additional inline styles |

Backend Requirements

The component expects a backend API with the following endpoints:

  • POST /chat - Text chat endpoint
  • POST /voice-chat - Voice chat endpoint

Expected Response Format

{
  "message": "Avatar's response text",
  "audio": "base64_encoded_audio",
  "lipsync": {
    "mouthCues": [
      { "start": 0, "end": 0.1, "value": "A" }
    ]
  },
  "facialExpression": "smile",
  "animation": "Talking"
}

Styling

The component uses minimal default styling and can be customized using:

  • The className prop for custom CSS classes
  • The style prop for inline styles
  • CSS variables for theming
/* Example custom styling */
.talking-head-container {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

Note: Voice features require browser support for Web Audio API and getUserMedia.

License

MIT © Marcos Remar

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and feature requests, please create an issue.