
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
web-voice-assistant
Advanced tools
A lightweight voice assistant for web applications with AI response capabilities using the Web Speech API.
A lightweight voice assistant for web applications with AI response capabilities using the Web Speech API.
npm install web-voice-assistant
# or
yarn add web-voice-assistant
# or
pnpm add web-voice-assistant
For browser/CDN usage:
<script src="https://cdn.jsdelivr.net/npm/web-voice-assistant@latest/dist/web-voice-assistant.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/web-voice-assistant"></script>
const assistant = new WebVoiceAssistant({
geminiApiKey: "your-api-key-here", // Required
language: 'en-US', // Optional
position: "bottom-right", // Optional
buttonSize: 70, // Optional
panelWidth: 400 // Optional
});
Option | Type | Default | Description |
---|---|---|---|
geminiApiKey | string | - | Gemini API key (Required) |
model | string | gemini-1.5-flash | Gemini model version |
language | string | en-US | Speech recognition language |
position | string | bottom-right | Button position |
buttonSize | number | 60 | Button size in pixels |
panelWidth | number | 350 | Panel width in pixels |
panelHeight | number | 450 | Panel height in pixels |
rate | number | 0.9 | Speech speed (0.1-2.0) |
pitch | number | 1 | Voice pitch (0-2.0) |
contextSize | number | 5000 | Context size in words |
ButtonBackGroundColour | string | black | Button background color |
svgColor | string | white | Icon color |
textColor | string | white | Text color |
PanelBackgroundColor | string | rgb(24 24 27) | Panel background |
MessagesBackgroundColor | string | rgb(24 24 27) | Messages background |
import { useEffect } from 'react';
import WebVoiceAssistant from 'web-voice-assistant';
function VoiceAssistant() {
useEffect(() => {
const assistant = new WebVoiceAssistant({
geminiApiKey: process.env.REACT_APP_GEMINI_KEY,
position: 'bottom-left',
buttonSize: 70
});
return () => assistant.destroy();
}, []);
return null;
}
'use client';
import { useEffect } from 'react';
import WebVoiceAssistant from 'web-voice-assistant';
export default function VoiceAssistant() {
useEffect(() => {
const assistant = new WebVoiceAssistant({
geminiApiKey: process.env.NEXT_PUBLIC_GEMINI_KEY,
panelWidth: 400
});
return () => assistant.destroy();
}, []);
return null;
}
Browser | Support |
---|---|
Chrome | ✅ Full |
Firefox | ✅ Full |
Edge | ✅ Full |
Safari | ⚠️ Partial |
Mobile Chrome | ✅ Full |
Mobile Safari | ⚠️ Partial |
MIT © Abdullah Mukadam
FAQs
A lightweight voice assistant for web applications with AI response capabilities using the Web Speech API.
The npm package web-voice-assistant receives a total of 30 weekly downloads. As such, web-voice-assistant popularity was classified as not popular.
We found that web-voice-assistant demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.