Splitstream is an audio capture SDK for macOS that records system and microphone audio simultaneously for transcription. This starter app shows how to use it within an Electron environment.
Before running this project, make sure you have:
- MacOS 14.2 or above
- Node.js v18 or above
- A valid Splitstream API Key
- A valid Deepgram API Key
git clone https://github.com/sam-brainstream/electron-splitstream-starter.git
cd electron-splitstream-starternpm installIn the root directory, create a file named .env and add your API keys as environment variables:
DEEPGRAM_API_KEY="your_deepgram_api_key_here"
SPLITSTREAM_API_KEY="your_splitstream_api_key_here"These values are automatically loaded into
main.js, but if by chance you runnpm run build, you'll have to replace theprocess.envinmain.jsand manually define them instead.
Run the following command in your Terminal to start the Electron app.
npm run start
If you are running npm run start inside of VSCode, the system transcripts will not show up unless you manually give VSCode permission!
To avoid this problem, simply run the application inside of your Terminal:
Initializes Electron, loads the .env variables, and starts Splitstream when the window finishes loading.
import { createSplitstream } from "splitstream-node";- Streams audio from your Mac’s input/output.
- Sends real-time transcripts from Deepgram.
- Emits
transcriptevents to the renderer.
Safely exposes a listener to the renderer via Electron’s contextBridge:
contextBridge.exposeInMainWorld("electronAPI", {
onTranscript: (callback) =>
ipcRenderer.on("transcript", (_event, value) => callback(value)),
});Listens for transcripts and adds them to the DOM:
window.electronAPI.onTranscript((text) => {
const line = document.createElement("div");
line.textContent = text;
container.appendChild(line);
container.scrollTop = container.scrollHeight;
});-
No transcripts showing?
- Verify your
.envkeys are valid. - Check the terminal output for “Missing environment variables”.
- Make sure you're running it in your Terminal, not VSCode's integrated terminal.
- Verify your
This project is provided for demonstration purposes.
Splitstream is proprietary software owned by the author — licensing terms apply.

