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

vocalia-widget

v1.0.0

Published

AI-powered voice assistant widget for websites. 40 industry personas, 5 languages (FR/EN/ES/AR/Darija), BANT lead qualification, RTL support. Zero API cost via Web Speech API.

Readme

vocalia-widget

AI-powered voice assistant widget for websites. 40 industry personas, 5 languages (FR/EN/ES/AR/Darija), BANT lead qualification, RTL support.

Installation

npm install vocalia-widget

Usage

General purpose

import { initVocalia } from 'vocalia-widget';

initVocalia({
  tenantId: 'your_tenant_id',
  apiKey: 'voc_xxxxxxxxxxxx',
  position: 'bottom-right',
  primaryColor: '#5E6AD2',
  language: 'auto',
  persona: 'AGENCY'
});

B2B (lead qualification)

import { initVocaliaB2B } from 'vocalia-widget';

initVocaliaB2B({
  tenantId: 'your_tenant_id',
  persona: 'SAAS'
});

E-commerce (product catalog)

import { initVocaliaEcommerce } from 'vocalia-widget';

initVocaliaEcommerce({
  tenantId: 'your_tenant_id',
  persona: 'ECOMMERCE'
});

CDN Alternative

<script>
  window.VOCALIA_CONFIG = {
    tenantId: 'your_tenant_id',
    position: 'bottom-right',
    primaryColor: '#5E6AD2'
  };
</script>
<script src="https://cdn.jsdelivr.net/npm/vocalia-widget/src/voice-widget.js" defer></script>

Configuration

| Option | Type | Default | Description | |:-------|:-----|:--------|:------------| | tenantId | string | required | Your VocalIA tenant identifier. | | apiKey | string | — | API key for authenticated operations (BANT/CRM). | | position | string | 'bottom-right' | Widget position: bottom-right, bottom-left, top-right, top-left. | | primaryColor | hex | '#5E6AD2' | Button and accent color. | | buttonSize | number | 60 | Button diameter in pixels. | | language | string | 'auto' | Force language: fr, en, es, ar, ary. | | persona | string | 'AGENCY' | Initial AI personality (see Personas list). | | ecommerceMode | boolean | true | Enable catalog search & cart intent detection. | | autoStart | boolean | false | Start voice synthesis immediately on open. | | debug | boolean | false | Enable console logging for voice events. |

Programmatic Control

The widget can be controlled programmatically via the window.VocalIA object:

// Open the widget
VocalIA.open();

// Close the widget
VocalIA.close();

// Toggle state
VocalIA.toggle();

// Switch persona on the fly
VocalIA.setPersona('RESTAURANT');

// Send data to the AI (e.g., current product context)
VocalIA.sendContext({
  productId: '123',
  price: '99.99',
  currency: 'EUR'
});

Event Hooks

Listen to widget lifecycle events to trigger custom site logic:

window.addEventListener('vocalia:ready', (e) => {
  console.log('VocalIA is loaded and ready.');
});

window.addEventListener('vocalia:message', (e) => {
  const { role, text } = e.detail;
  console.log(`New ${role} message: ${text}`);
});

window.addEventListener('vocalia:qualify', (e) => {
  const { score, bant } = e.detail;
  // Trigger your own CRM conversion pixels here
  console.log('Lead qualified:', bant);
});

window.addEventListener('vocalia:error', (e) => {
  console.error('VocalIA Error:', e.detail.message);
});

Advanced Customization (CSS)

The widget uses CSS Variables for style overrides. You can define these in your main stylesheet:

:root {
  --vocalia-primary: #FF5733;
  --vocalia-font: 'Inter', sans-serif;
  --vocalia-z-index: 9999;
}

Data Attributes

Control widget behavior without writing JavaScript using HTML data attributes:

<!-- Trigger widget open from any button -->
<button data-vocalia-action="open">Speak with AI</button>

<!-- Switch persona based on page section -->
<section data-vocalia-persona="DENTAL"> ... </section>

Personas

VocalIA includes 40 fine-tuned personas, categorized by industry:

  • Real Estate: PROPERTY, LISTINGS, CLIENT_RELATIONS
  • Healthcare: DENTAL, HEALTHCARE, WELLNESS
  • Professional Services: LAWYER, INSURANCE, FINANCE, AGENCY
  • Home Services: CONTRACTOR, PLUMBING, ROOFING
  • E-commerce & Retail: ECOMMERCE, RESTAURANT, HOTEL, TRAVEL
  • Tech & Education: SAAS, EDUCATION, CUSTOMER_SUPPORT

Languages & Localization

VocalIA is a global-first platform with deep regional intelligence:

  • RTL Support: Automatically adjusts UI layout for Arabic and Darija.
  • Auto-Detection: Uses sophisticated visitor logic:
    • Geo: Morocco -> French (Primary) / Darija (Secondary)
    • Geo: MENA -> Arabic
    • Geo: Europe/Americas -> English / Local
  • Manual Override: Set language: 'ary' to force Moroccan Darija specifically.

Requirements

  • HTTPS: Browsers block microphone access on insecure connections.
  • Supported Browsers: Chrome (v33+), Safari (v14.1+), Edge (v79+).
  • Network: Access to api.vocalia.ma (Port 443).

Enterprise Support

For white-label solutions, custom personas training, or on-premise deployments, contact [email protected].

License

MIT © Jouiet/VocalIA