@amittrrajput/voice-plugin
v1.3.1
Published
Smart conversational voice navigation plugin with AI-powered form filling and modern pill-shaped UI
Maintainers
Readme
@liaplus/voice-plugin
Universal voice navigation and screen reader plugin for any website. Works dynamically on any page without configuration.
🚀 Quick Start
CDN (unpkg)
<!-- Load Microsoft Speech SDK -->
<script src="https://cdn.jsdelivr.net/npm/microsoft-cognitiveservices-speech-sdk@latest/distrib/browser/microsoft.cognitiveservices-speech.sdk.bundle.js"></script>
<!-- Load Voice Plugin -->
<script src="https://unpkg.com/@liaplus/[email protected]/voice-plugin.min.js"></script>
<script src="https://unpkg.com/@liaplus/[email protected]/voice-plugin-accessibility.min.js"></script>
<!-- Initialize -->
<script>
LiaPlusVoice.init({ language: 'en-US' });
</script>npm Installation
npm install @liaplus/voice-plugin microsoft-cognitiveservices-speech-sdkimport LiaPlusVoice from '@liaplus/voice-plugin';
const plugin = LiaPlusVoice.init({
language: 'en-US',
position: 'bottom-right',
onCommand: (data) => console.log(data)
});✨ Features
- 🎤 100+ Voice Commands - Read, navigate, accessibility
- 🧠 Dynamic Page Analysis - Works on any website without config
- 🔍 Fuzzy Matching - "contact" finds "Contact Us"
- 📡 Offline Support - Basic commands work without internet
- 🌍 Multi-Language - English & Hindi with proper voices
- 📖 Full Screen Reader - With speed controls
- ♿ Accessibility Suite - Dyslexia font, ADHD mode, big cursor
- ⚡ Universal - No site-specific configuration needed
🎤 Voice Commands
Reading
"Read page" - Read entire page
"Read next" - Read next section
"Stop reading" - Stop
"Read faster/slower" - Speed controlDynamic Navigation (Works on ANY page!)
"Go to [heading]" - Navigate to any heading
"Click [link]" - Click any link
"List headings" - Hear all sections
"Describe page" - Page summaryAccessibility
"Dyslexia font" - Readable font
"ADHD mode" - Focus reading bar
"Big cursor" - Large pointer
"Zoom in/out" - Text size📖 API
Initialization
const plugin = LiaPlusVoice.init({
language: 'en-US', // or 'hi-IN'
position: 'bottom-right', // UI position
theme: 'auto', // light, dark, or auto
routes: { // Optional custom routes
'dashboard': '/dashboard'
},
onCommand: (data) => {
console.log('Command:', data);
},
onError: (error) => {
console.error('Error:', error);
}
});Methods
// Control listening
plugin.startListening();
plugin.stopListening();
// Change language
plugin.setLanguage('hi-IN');
// Process command programmatically
await plugin.processCommand('read page');
// Access sub-modules
plugin.accessibility.enableDyslexiaFont();
plugin.parser.parse();
plugin.reader.setSpeed(1.5);
// Cleanup
plugin.destroy();♿ Accessibility Features
const a11y = plugin.accessibility;
// Dyslexia Font
a11y.toggleDyslexiaFont();
// ADHD Focus Mode (reading bar)
a11y.toggleADHDMode();
// Big Cursor
a11y.toggleBigCursor();
// Text Size
a11y.setTextSize('large');
a11y.increaseTextSize();
// Line Height
a11y.setLineHeight('medium');
// Color Adjustments
a11y.setSaturation(150);
a11y.toggleInvertColors();
// Link Highlighting
a11y.toggleHighlightLinks();
// Animations
a11y.togglePauseAnimations();
// Images
a11y.toggleHideImages();
// Reset
a11y.resetAll();🌍 Multi-Language
English (en-US)
LiaPlusVoice.init({ language: 'en-US' });
// Voice: en-US-JennyNeuralHindi (hi-IN)
LiaPlusVoice.init({ language: 'hi-IN' });
// Voice: hi-IN-SwaraNeural
// Say: "पेज पढ़ो", "नीचे स्क्रॉल करो"🔧 TypeScript
Full TypeScript definitions included:
import LiaPlusVoice, {
VoicePluginOptions,
CommandResult,
PageStructure
} from '@liaplus/voice-plugin';
const options: VoicePluginOptions = {
language: 'en-US',
onCommand: (data: CommandResult) => {
console.log(data.action, data.response);
}
};
const plugin = LiaPlusVoice.init(options);📱 Browser Support
- ✅ Chrome/Edge 80+
- ✅ Safari 14.5+
- ✅ Firefox 90+
- ✅ Chrome Android
- ✅ iOS Safari
🔐 Privacy
- No data stored on servers
- Conversations are ephemeral
- No tracking or analytics
- All settings stored locally
- Azure Speech uses temporary tokens
📄 License
MIT © LiaPlus AI
🔗 Links
💡 Examples
E-commerce Site
LiaPlusVoice.init({
language: 'en-US',
routes: {
'products': '/shop',
'cart': '/cart',
'checkout': '/checkout'
}
});
// Say: "Go to products", "Click add to cart"Documentation Site
LiaPlusVoice.init({
language: 'en-US',
onCommand: (data) => {
if (data.action === 'go_to_heading') {
// Track navigation
analytics.track('voice_navigation', {
heading: data.parameters.text
});
}
}
});
// Say: "Go to installation", "Search API"Multilingual Site
const userLang = navigator.language.startsWith('hi') ? 'hi-IN' : 'en-US';
LiaPlusVoice.init({
language: userLang,
position: 'bottom-left'
});🆘 Troubleshooting
Plugin Not Loading
// Check dependencies
console.log(typeof SpeechSDK); // Should be 'object'
console.log(typeof LiaPlusVoice); // Should be 'object'Microphone Not Working
- Ensure HTTPS (required)
- Check browser permissions
- Close other apps using microphone
Commands Not Recognized
- Speak clearly at normal pace
- Check language setting
- Try simpler commands
- Enable online mode for AI
📈 Version History
1.0.0 (2026-02-06)
- Initial release
- Dynamic page analysis
- 100+ voice commands
- Offline support
- Multi-language (English/Hindi)
- Full accessibility suite
- TypeScript definitions
Made with ❤️ by LiaPlus AI
