Skip to content

patrick-mns/actos-voice

Repository files navigation

ActosVoice

React library for voice applications with LLM and Tool Calling — 100% client-side.

🎯 Overview

ActosVoice is a modular library that combines:

  • ASR (Speech-to-Text) — Injectable voice recognition
  • LLM (Large Language Model) — Natural language processing on the client
  • Tool Calling — Tool pattern inspired by OpenAI/Ollama/Gemini
┌─────────────────────────────────────────────────────────┐
│                    ActosVoice Library                     │
├─────────────────────────────────────────────────────────┤
│                                                         │
│   🎤 ASR                   🧠 LLM                       │
│   ├── webSpeech()          ├── webLLM()                 │
│   ├── whisper()            ├── ollama()                 │
│   └── deepgram()           └── openai()                 │
│                                                         │
│   🛠️ Tools                                              │
│   ├── Built-in tools                                    │
│   └── Custom tools                                      │
│                                                         │
└─────────────────────────────────────────────────────────┘

📦 Installation

npm install @actos-voice/react

🚀 Quick Start

import { ActosVoice, useVoiceAgent } from '@actos-voice/react';
import { webSpeech } from '@actos-voice/asr-webspeech';
import { webLLM } from '@actos-voice/llm-webllm';

const tools = [
  {
    name: 'change_color',
    description: 'Changes the application background color',
    parameters: {
      type: 'object',
      properties: {
        color: { type: 'string', description: 'Color name' }
      },
      required: ['color']
    },
    execute: (args) => {
      document.body.style.backgroundColor = args.color;
      return { success: true };
    }
  }
];

function App() {
  return (
    <ActosVoice
      asr={webSpeech({ language: 'en-US' })}
      llm={webLLM({ model: 'Llama-3.2-1B-Instruct-q4f16_1-MLC' })}
      tools={tools}
    >
      <VoiceInterface />
    </ActosVoice>
  );
}

📚 Documentation

🔧 Requirements

  • React 18+
  • Browser with WebGPU (Chrome 113+, Edge 113+) for client-side LLM
  • Microphone for ASR

📄 License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published