jupyterlab_voice_capture_extension
Capture microphone audio in the JupyterLab browser tab and stream it to a server-side FIFO, so terminal applications running inside the container - notably Claude Code voice mode - can record from a microphone the container itself has no access to.
The container has no capture device; the browser does. This extension bridges that gap: the browser captures the mic, ships the audio over an authenticated websocket to a Jupyter server handler, and the handler writes raw PCM to a named pipe. A separate, out-of-scope plumbing layer (PulseAudio module-pipe-source + SoX) turns that pipe into the system default audio source.
How it works
- Capture - a microphone toggle in the status bar calls
getUserMedia; the AudioContext resamples to 16 kHz; an AudioWorklet downmixes to mono and encodes signed 16-bit little-endian PCM off the UI thread - Transport - 20 ms PCM frames (640 bytes) are sent as binary websocket messages to
…/jupyterlab-voice-capture-extension/stream, which lives under the Jupyter base URL and inherits Jupyter token auth - no new port is opened - Sink - the server handler writes each frame, in order, to a FIFO (default
/run/voice/pulseaudio.fifo); the PulseAudio reader creates the pipe (module-pipe-sourcerefuses a pre-existing one), so the handler attaches as writer, waits for the pipe to appear, and tolerates a not-yet-attached reader without blocking the server
Chain: browser mic → AudioWorklet (16 kHz mono s16le) → websocket → server handler → FIFO → (PulseAudio + SoX, out of scope) → terminal app.
Requirements
- JupyterLab >= 4.6.0
- A secure context (https or
localhost) - browsers only expose the microphone over a secure origin
Install
pip install jupyterlab-voice-capture-extension
Dependencies
- Python:
jupyter_serverandtraitlets, installed automatically with the package - System (only for the full voice chain into a terminal app): PulseAudio + SoX. Provision and verify them with the bundled CLI:
jupyterlab_voice_capture install # apt packages + /run/voice dir + client.conf + Jupyter config line (does NOT start the daemon)
jupyterlab_voice_capture start -d # start the PulseAudio daemon + pipe-source + voicedrain loopback that keeps it reading (run after install and each restart)
jupyterlab_voice_capture validate # check every component, print what to fix (--json for machine output)
jupyterlab_voice_capture stop # kill the PulseAudio daemon
See docs/jupyterlab-enable-claude-voice.md for the full setup and troubleshooting.
Usage
- Click the microphone icon in the status bar (or run Toggle Voice Capture from the command palette) to start capture
- On the first start the browser asks for microphone permission; the status label moves Disconnected → Connecting → Connected, the icon glows green while streaming, and the browser shows its active-microphone indicator
- Click again to stop - capture tracks are released and the browser indicator clears
- In the Error state (blinking icon) a click disconnects and returns the control to Disconnected; click once more to start capture again
- Only one tab streams at a time: starting capture in a second tab takes over and stops the first
Configuration
The sink FIFO path defaults to /run/voice/pulseaudio.fifo and is overridable via Jupyter server config:
c.VoiceCapture.sink_path = "/run/voice/pulseaudio.fifo"
Settings → Voice Capture has one option, Auto-connect on startup (autoConnect, default off): when enabled, capture starts automatically as JupyterLab loads instead of waiting for a click.
Uninstall
pip uninstall jupyterlab-voice-capture-extension
Troubleshoot
If you see the frontend extension but it is not working, check that the server extension is enabled:
jupyter server extension list
If the server extension is installed and enabled but you do not see the frontend extension, check the frontend extension is installed:
jupyter labextension list
Contributing
If you would like to contribute to this extension, please refer to the Contributing Guide.
Metadata
Release files for jupyterlab-voice-capture-extension 1.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyterlab_voice_capture_extension-1.0.17.tar.gz | 378.3 kB | Without provenance | Details for jupyterlab_voice_capture_extension-1.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyterlab_voice_capture_extension-1.0.17-py3-none-any.whl | Python 3 | none | any | Details for jupyterlab_voice_capture_extension-1.0.17-py3-none-any.whl |
Total release size: 439.7 kB
Release files / jupyterlab_voice_capture_extension-1.0.17.tar.gz
| Download URL | jupyterlab_voice_capture_extension-1.0.17.tar.gz |
|---|---|
| Size | 378.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af16bbdf3ca585f5a5eba3b584702666c041484bb1a482b180a293a049a37f0c
|
|
BLAKE2b-256 checksum How to use checksums |
40fdecb93fd30bfa84505c387aa7e4940a0aca325fe907f18f9c8deed460d87a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / jupyterlab_voice_capture_extension-1.0.17-py3-none-any.whl
| Download URL | jupyterlab_voice_capture_extension-1.0.17-py3-none-any.whl |
|---|---|
| Size | 61.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0d346cde253850bde80c2f78c721a0a4714dd82c42898c3bdf3c7fbbc28e83f
|
|
BLAKE2b-256 checksum How to use checksums |
f1db1ee0f94dc3d953179d068b1ce2edd8e2b57caa8e24e11d2ff0f3db9e759e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for jupyterlab-voice-capture-extension 1.0.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.