Skill: suhas12345685-pro/virtual-voice-ai (version 1.0.0)

--- name: voice-pipeline description: Wires a real microphone through an AI brain (STT → LLM → TTS) and routes the output to a virtual audio cable so apps like Google Meet hear the processed voice. Use when building a real-time voice interception layer in a Node.js project. requires: env: - DEEPGRAM_API_KEY - LLM_PROVIDER - LLM_API_KEY - LLM_MODEL - TTS_PROVIDER - TTS_API_KEY - VIRTUAL_CABLE_NAME system: - ffmpeg (must be in PATH) - VB-Audio Cable (Windows) or BlackHole 2ch (macOS) --- # Voice Pipeline Skill Guide the user through building a real-time audio interception pipeline in Node.js. The pipeline: Mic → ffmpeg resample → Deepgram STT → LLM → Sentence chunker → TTS → PCM decode → VB-Cable. ## Capabilities 1. **OS Prep**: Walk through virtual audio driver install and ffmpeg setup. 2. **Device Discovery**: Run `scripts/01_list_devices.js` to find the exact VB-Cable name. 3. **Step-by-step build**: Execute scripts 01–07 in order, stress-testing each before proceeding. 4. **Kill switch**: Export a `stop()` function the host app calls to instantly halt the pipeline. 5. **Env wiring**: Write required keys to the project's `.env` file. ## Critical Rules - Never use `naudiodon` or `electron` — both are incompatible with a portable Node.js skill. - Always resample to 16kHz mono PCM before sending to Deepgram. - Never stream raw LLM tokens to TTS — buffer to sentence boundaries first. - TTS output (MP3) must be decoded to PCM before writing to VB-Cable. - The kill switch must be IPC-based, not `globalShortcut` (Electron-only). ## Execution Order Run each script independently to stress-test before wiring together. ``` Step 1 → OS prep (no code, see references/step_by_step.md) Step 2 → scripts/package.json + npm install Step 3 → node scripts/01_list_devices.js Step 4 → node scripts/02_capture_resample.js Step 5 → node scripts/03_deepgram_ws.js Step 6 → node scripts/04_llm_stream.js + scripts/05_sentence_chunker.js Step 7 → node scripts/06_tts_ws.js + scripts/07_pcm_write.js ``` ## Progressive Loading For architecture diagram and signal flow: read `references/architecture.md`. For full corrected step-by-step: read `references/step_by_step.md`. For all required env vars: read `references/env_schema.md`.

path: readme.md
content: # voice-pipeline

A Node.js skill that intercepts your real microphone, runs it through an AI brain (Speech-to-Text → LLM → Text-to-Speech), and routes the processed voice output to a virtual audio cable — so any meeting app (Google Meet, Zoom, Teams) hears the AI voice instead.

## What it does

```
Real Mic → ffmpeg (resample) → Deepgram STT → LLM → Sentence Chunker → TTS → PCM Decode → VB-Cable → Meeting App
```

## Requirements

- Node.js 18+
- ffmpeg installed and in PATH
- VB-Audio Cable (Windows) or BlackHole 2ch (macOS)
- API keys: Deepgram, an LLM provider (Groq/OpenAI/etc), a TTS provider (ElevenLabs/Cartesia)

## Usage

> "Set up the voice pipeline skill in my project"
> "Run step 3 of the voice pipeline"
> "My Deepgram transcripts aren't appearing, debug the pipeline"
> "Wire the kill switch into my app"

## Install

Add to your project's `.env`:

```env
DEEPGRAM_API_KEY=
LLM_PROVIDER=groq
LLM_API_KEY=
LLM_MODEL=llama3-8b-8192
TTS_PROVIDER=elevenlabs
TTS_API_KEY=
VIRTUAL_CABLE_NAME=CABLE Input
```

## Skill files

| File | Purpose |
|---|---|
| `scripts/01_list_devices.js` | Find your VB-Cable device name |
| `scripts/02_capture_resample.js` | Mic capture + 16kHz resample |
| `scripts/03_deepgram_ws.js` | STT WebSocket |
| `scripts/04_llm_stream.js` | LLM token stream |
| `scripts/05_sentence_chunker.js` | Buffer tokens to sentence boundaries |
| `scripts/06_tts_ws.js` | TTS WebSocket |
| `scripts/07_pcm_write.js` | Decode + write to VB-Cable |

Security scan verdicts — ClawScan: suspicious | static analysis: suspicious | VirusTotal: clean | SkillSpector: suspicious (HIGH)