🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@vox-ai-app/voice

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vox-ai-app/voice

ONNX wake-word detection, voice window, and voice lifecycle for Vox

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

@vox-ai-app/voice

ONNX-based wake word detection, keyboard shortcut registration, and voice overlay window for Vox.

Install

npm install @vox-ai-app/voice

Peer dependencies: electron >= 28, @picovoice/pvrecorder-node >= 1.0.0, onnxruntime-web >= 1.18.0

Requirements

  • macOS (pvrecorder + ONNX wake word models)
  • Microphone permission (requested automatically on first use)
  • ONNX models at resources/voice/ in the app package:
    • melspectrogram.onnx
    • embedding_model.onnx
    • computer.onnx

Usage

import {
  initVoiceService,
  destroyVoiceService,
  setLogger,
  setOnWakeWordDetected
} from '@vox-ai-app/voice'

setLogger(logger)
setOnWakeWordDetected(() => {
  // wake word detected — open chat, start listening, etc.
  showChatWindow()
})

await initVoiceService({
  onActivate: () => showChatWindow() // also called on keyboard shortcut
})

// on app quit
await destroyVoiceService()

onActivate handles both wake word detection and the keyboard shortcut (Cmd+Alt+V, falling back to Cmd+Shift+Space). If omitted, only the setOnWakeWordDetected callback fires on wake word.

Voice Window

An always-on-top transparent overlay (400×140px, top-right corner) for displaying voice state.

import { createVoiceWindow, getVoiceWindow, destroyVoiceWindow } from '@vox-ai-app/voice'

createVoiceWindow() // creates the window, loads voice.html
getVoiceWindow() // returns BrowserWindow | null
destroyVoiceWindow() // destroys it

Wake word control

import { pauseWakeWord, resumeWakeWord } from '@vox-ai-app/voice'

pauseWakeWord() // pause detection while user is speaking
resumeWakeWord() // resume after response

Worker entry point

The wake word worker runs in a worker_threads Worker. Register it as a separate entry point in your build config:

// electron.vite.config.js
export default {
  main: {
    build: {
      rollupOptions: {
        input: {
          index: 'src/main/index.js',
          'voice.worker': 'node_modules/@vox-ai-app/voice/src/worker.js'
        }
      }
    }
  }
}

License

MIT

FAQs

Package last updated on 05 Apr 2026

Did you know?

Socket

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.

Install

Related posts