CoolFace
Modelpublic

Aillom/aillom-vox-client

sourceHugging Faceupdated 8mo agoView on Hugging Face
1likes
Model Card

πŸŽ™οΈ AillomVox Public Client

![npm version](https://www.npmjs.com/package/aillom-vox-client) ![License: ISC](https://opensource.org/licenses/ISC) ![Node.js](https://nodejs.org/)

The Enterprise-Grade Voice AI SDK.

Build Speech-to-Speech, Audio-to-Audio, and Realtime Multimodal applications with a single, unified protocol. Connect effortlessly to OpenAI Realtime, Gemini Multimodal, AWS Nova, Qwen, Grok, UltraVox, and AillomVox native models.


πŸ“¦ Installation

bash
npm install aillom-vox-client

πŸ“š Documentation

  • β€”**Quick Start (SDK)** - The modern way
  • β€”**Quick Start (WebSocket)** - The low-level way
  • β€”**Examples** - Ready-to-use client implementations
  • β€”**N8N Integration** - Official AillomVox node for n8n
  • β€”**Client Tools** - Add custom UI controls to your AI
  • β€”**Voice Catalog** - All voices across all providers
  • β€”**Asterisk Integration** - Complete guide for Asterisk 23/SIP
  • β€”**Protocol Specification** - WebSocket messages and binary formats
  • β€”**Supported Providers** - AI models and configuration options
  • β€”**Troubleshooting** - Common errors and solutions

πŸš€ Key Features

  • β€”Unified API: Switch between OpenAI, Gemini, and others by changing one string
  • β€”Real-Time Streaming: Full-duplex WebSocket for sub-500ms latency
  • β€”65 Voices: Full Inworld TTS 1.5 catalog across 15 languages
  • β€”Robust Audio: Native PCM 16-bit at 8kHz, 16kHz, or 24kHz
  • β€”Client Tools: Add custom UI controls (hangup, alerts, navigation) to your AI
  • β€”15 Languages: en, pt, es, fr, de, it, ja, zh, ko, hi, ar, ru, pl, nl, he
  • β€”Event Driven: Simple event emitter (audio, transcript, interrupt)
  • β€”Enterprise Security: Automatic key redaction and sanitized error messages

πŸ’° Pricing & Performance

Choose the tier that fits your budget. AillomVox is optimized for telephony and high-volume use cases.

ProviderCost/MinTierRecommended For
AillomVox$0.03πŸš€ Best ValueHigh volume, Telephony, Support
Gemini$0.06StandardGoogle Gemini 2.5 Flash. Multimodal
AWS$0.06StandardAWS Nova Sonic 2. Enterprise
Qwen$0.06StandardAlibaba Qwen Omni 3. Cost-effective
OpenAI$0.10PremiumGPT Realtime Mini. Logic-heavy
Grok$0.10PremiumGrok Beta. Witty personality
UltraVox$0.10PremiumHigh emotional intelligence
Why AillomVox? Native optimized pipeline delivers sub-500ms latency and 8kHz support at less than half the cost. Choose from 65 voices with dynamic mid-conversation switching.

πŸ“± Examples

This repository contains multiple examples ranging from a minimal connection script to full-featured dashboards and creative use cases.

FolderLevelDescription
`examples/01-basic`⭐ BeginnerMinimal HTML/JS implementation. Connects, sends defaults, streams audio. Perfect for understanding the core protocol.
`examples/02-advanced-dashboard`⭐⭐⭐ ExpertFull-featured UI with Dark Mode. Configures Voice, LLM Provider, Tools, and Visualizations.
`examples/03-smart-home`⭐⭐ CreativeA Smart Home Controller simulation. Use voice to "turn on lights" or "adjust temperature" via Tool Calling.
`examples/04-customer-support`⭐⭐ IndustryA CRM / Support Agent interface. Demonstrates integration with business data.

⚑ Quick Start (SDK)

The easiest way to connect to AillomVox.

typescript
import { AillomVox } from 'aillom-vox-client';

const client = new AillomVox({
  apiKey: 'av_YOUR_KEY',
  voice: 'Edward',
  debug: true
});

client.on('transcript', (msg) => {
  console.log(`[${msg.role}] ${msg.text}`);
});

client.on('audio', (chunk) => {
  // Play chunk (ArrayBuffer)
});

await client.connect();

πŸ”Œ Quick Start (WebSocket)

If you prefer raw WebSockets (e.g. for Python, Go, or minimal JS):

javascript
const ws = new WebSocket("wss://vox.aillom.com/ws");

ws.onopen = () => {
  ws.send(JSON.stringify({
    type: "config",
    apikey: "YOUR_API_KEY",
    provider: "aillomvox",
    voice: "Edward"
  }));
};

ws.onmessage = (event) => {
  if (event.data instanceof ArrayBuffer) {
    playAudio(event.data);
  }
};

🎀 Voices

AillomVox uses Inworld TTS 1.5 with 65 voices across 15 languages. See the full Voice Catalog.

Top Picks

VoiceGenderStyleBest For
EdwardMaleFast-talking, emphaticGeneral purpose (default EN)
JuliaFemaleQuirky, playfulCustomer support
HeitorMaleComposed, neutralPortuguese (default PT)
MaitΓͺFemaleProfessionalPortuguese
AshleyFemaleWarm, naturalSales, onboarding
CraigMaleRefined, articulateEnterprise, authority
DiegoMaleSoothing, gentleSpanish (default ES)
LunaFemaleCalm, relaxingWellness, concierge

πŸ› οΈ Client Tools

Client Tools allow the AI to control your application's UI directly. When the AI decides to execute a tool, your app receives a callback and can respond.

Registering Tools

javascript
{
    "provider": "aillomvox",
    "voice": "Edward",
    "tools": [
        {
            "name": "hangup",
            "description": "End the call when user says goodbye.",
            "parameters": { "type": "object", "properties": {} }
        },
        {
            "name": "show_alert",
            "description": "Show alert to user",
            "parameters": {
                "type": "object",
                "properties": {
                    "message": { "type": "string", "description": "Alert message" }
                },
                "required": ["message"]
            }
        }
    ]
}

Handling Tool Calls (Client-Side)

javascript
socket.onmessage = (event) => {
    if (typeof event.data !== 'string') return;
    const msg = JSON.parse(event.data);
    
    if (msg.type === 'tool_call') {
        console.log(`Tool requested: ${msg.name}`, msg.args);
        
        let result = 'OK';
        if (msg.name === 'hangup') {
            disconnect();
            result = 'Call ended';
        } else if (msg.name === 'show_alert') {
            alert(msg.args.message);
            result = 'Alert displayed';
        }

        // Always respond β€” AI waits for this (15s timeout)
        socket.send(JSON.stringify({
            type: 'tool_result',
            call_id: msg.call_id,
            result: result
        }));
    }
};

πŸ”§ Advanced Configuration

Audio Formats

javascript
{
    sample_rate: 16000,  // 8000 (telephony), 16000 (standard), 24000 (high-quality)
    // Audio is PCM 16-bit little-endian Mono
}

Session Limits

javascript
{
    max_duration: 300,  // 1-3600 seconds (default: 300 = 5 minutes)
}

At 15 seconds remaining, the AI will say the farewell_message. At 0 seconds, the connection closes.

Multi-Language Support

javascript
{
    language: 'pt-BR',
    voice: 'Heitor',  // or 'MaitΓͺ' for female
    system_prompt: 'VocΓͺ Γ© um assistente da Aillom. Seja conciso.',
    first_message: 'OlΓ‘! Como posso ajudar?',
    farewell_message: 'Obrigado por ligar. AtΓ© logo!'
}

Supported: en-US, pt-BR, es-ES, fr-FR, de-DE, it-IT, ja-JP, ko-KR, zh-CN, hi-IN, ar-SA, ru-RU, pl-PL, nl-NL, he-IL


πŸ›‘οΈ Security & Limits

Automatic Sanitization

  • β€”All error messages are stripped of sensitive data
  • β€”API keys are never exposed in logs
  • β€”Client cannot access server-side resources

Rate Limits

  • β€”Concurrent: 3 connections per user, 2 per API key
  • β€”Max Duration: 1-60 minutes per call
  • β€”Default: 5 minutes per session
  • β€”Behavior: Warning at 15s remaining, force disconnect at 0s

🀝 Support


πŸ“„ License

ISC Β© Aillom Technologies