splitstream-node
v0.2.1
Published
Cross-platform audio capture and transcription client.
Readme
Splitstream
Splitstream is a cross-platform audio capture and Deepgram transcription client for developers who want real-time speech processing from both microphone and system audio.
Built in Rust 🦀 for compatibility and performance.
🚀 Features
- 🖥️ MacOS, Windows, and Linux support (see roadmap)
- 🎙️ Capture and transcribe microphone and system audio simultaneously in real time
- 🧠 Built-in intuitive event emission system for compatibility and ease-of-development
- 🔇 Built-in acoustic echo cancellation
- 🔌 Plug-and-play with any Node project including Electron
📦 Installation
Install via npm or your favorite package manager:
npm i splitstream-nodeyarn add splitstream-nodepnpm add splitstream-nodebun add splitstream-node🧪 Example Usage
// File: test.ts
import { createSplitstream } from "splitstream-node";
console.log("🚀 Starting Splitstream test for 60 seconds...");
// Create Splitstream instance
const split = createSplitstream({
deepgram_api_key: "your_deepgram_key",
splitstream_api_key: "your_splitstream_key",
model: "nova-3",
echo_cancellation: true,
interim_results: true,
diarization: true,
});
console.log("🚀 Starting Splitstream test for 60 seconds...");
// Listen and print transcripts, errors, and exit events
split.on("transcript", (transcript) => {
console.log(
`${transcript.source}: ${transcript.channel.alternatives[0].transcript}`
);
});
split.on("stderr", (line) => console.log("stderr:", line));
split.on("exit", (code) => console.log("exit:", code));
// Stop after 60 seconds
setTimeout(() => {
console.log("⏹️ stopping after 60 seconds...");
split.stop();
}, 60000);Then, simply run in your console or Terminal:
node test.ts⚠️ macOS VSCode Permission Heads-Up
To see system audio transcription on MacOS during testing, you must run Splitstream from the MacOS Terminal, not VSCode’s integrated console. MacOS silently blocks system audio capture requests from VSCode’s terminal, meaning only microphone audio will actually be recorded. Use MacOS' native Terminal instead.
🗺️ OS Roadmap
| Platform | Status | Notes | | -------- | -------------- | --------------------------------------------------------- | | macOS | ✅ Finished | Fully functional with system audio + mic capture | | Windows | 🚧 In Progress | Core audio input working, system audio tap in development | | Linux | 🕒 Planned | Capture API design under review |
🧰 API Cheat Sheet
| Method / Event | Description |
| ---------------------------- | ------------------------------------------------- |
| createSplitstream(options) | Initializes a new Splitstream capture session. |
| split.on("transcript", cb) | Emits real-time transcript events per channel. |
| split.on("stderr", cb) | Emits stderr output from the native binary. |
| split.on("exit", cb) | Fires when the capture process exits. |
| split.stop() | Gracefully stops audio capture and transcription. |
📄 License
Node.js interface — MIT License Native binary — proprietary license
© 2025 Secretary Corporation, all rights reserved.
