Metadata-Version: 2.5
Name: jupyterlab_dictation_extension
Version: 0.8.61
Summary: Dictation for JupyterLab: speech to text from the audio extension's microphone, with a button in its status bar section, a toggle key binding and an on-screen cue
Project-URL: Homepage, https://github.com/stellarshenson/jupyterlab_dictation_extension
Project-URL: Bug Tracker, https://github.com/stellarshenson/jupyterlab_dictation_extension/issues
Project-URL: Repository, https://github.com/stellarshenson/jupyterlab_dictation_extension.git
Author-email: Stellars Henson <konrad.jelen@gmail.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: jupyter,jupyterlab,jupyterlab-extension
Classifier: Framework :: Jupyter
Classifier: Framework :: Jupyter :: JupyterLab
Classifier: Framework :: Jupyter :: JupyterLab :: 4
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Python: >=3.12
Requires-Dist: brotli<2,>=1.2
Requires-Dist: jupyter-server<3,>=2.21
Requires-Dist: jupyterlab-audio-extension<2,>=1.0.53
Requires-Dist: numpy<3,>=2.5
Requires-Dist: onnxruntime<2,>=1.32
Provides-Extra: dev
Requires-Dist: jupyter-builder<2,>=1.3; extra == 'dev'
Requires-Dist: jupyterlab<5,>=4.6; extra == 'dev'
Provides-Extra: test
Requires-Dist: coverage<8,>=7.17; extra == 'test'
Requires-Dist: pytest-asyncio<2,>=1.5; extra == 'test'
Requires-Dist: pytest-cov<8,>=7.1; extra == 'test'
Requires-Dist: pytest-jupyter[server]<1,>=0.11; extra == 'test'
Requires-Dist: pytest<10,>=9.2; extra == 'test'
Description-Content-Type: text/markdown

# jupyterlab_dictation_extension

[![GitHub Actions](https://github.com/stellarshenson/jupyterlab_dictation_extension/actions/workflows/build.yml/badge.svg)](https://github.com/stellarshenson/jupyterlab_dictation_extension/actions/workflows/build.yml)
[![npm version](https://img.shields.io/npm/v/@stellarshenson/jupyterlab-dictation-extension.svg)](https://www.npmjs.com/package/@stellarshenson/jupyterlab-dictation-extension)
[![PyPI version](https://img.shields.io/pypi/v/jupyterlab-dictation-extension.svg)](https://pypi.org/project/jupyterlab-dictation-extension/)
[![Total PyPI downloads](https://static.pepy.tech/badge/jupyterlab-dictation-extension)](https://pepy.tech/project/jupyterlab-dictation-extension)
[![JupyterLab 4](https://img.shields.io/badge/JupyterLab-4-orange.svg)](https://jupyterlab.readthedocs.io/en/stable/)
[![Brought To You By KOLOMOLO](https://img.shields.io/badge/Brought%20To%20You%20By-KOLOMOLO-00ffff?style=flat)](https://kolomolo.com)
[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-blue?style=flat)](https://www.paypal.com/donate/?hosted_button_id=B4KPBJDLLXTSA)

Dictation for JupyterLab: speak, and the transcribed text appears where you are typing. The extension takes the microphone audio that [jupyterlab_audio_extension](https://github.com/stellarshenson/jupyterlab_audio_extension) delivers to the server and transcribes it with a speech-to-text model.

## Features

- **Speech in, text out** - the transcribed text is written where the keyboard focus is while you speak, with no pause or stop needed: every word shows within 3 s of being spoken, first in the grey draft, then written once the words after it have decided its punctuation; full stops and capitals follow the sentences, not the pauses, and the mark after the last word comes with the next words or at stop
- **Grey draft** - words the model has heard but not yet made final show in grey about 1 s after they are spoken: after the caret in a notebook cell or file editor, and in a label at a terminal or a text field; the final text, with its punctuation, replaces them, and a draft is never written into the document, the shell or the field
- **Spoken punctuation** - say comma, full stop or period, question mark, exclamation mark, colon, semicolon, dash, open or close bracket, open or close quote, or new line, and the mark is written instead of the words; in a terminal a spoken new line presses Enter, and nothing else in the dictated text does
- **Status section button** - the dictation button sits in the status bar section of `jupyterlab_audio_extension`, right of the microphone, and shows with a three-bar waveform whether or not dictation runs, once the dictation server part answers and while its option below is on; a click turns the microphone on when it is off and starts dictation, a second click stops it; while dictation runs, the waveform takes the colour of the active microphone
- **Transcription card** - the gear at the end of the audio status section opens the audio settings panel, where dictation adds a Transcription card after the audio card: the model list with each model's name, licence and download size, and the language; a choice is saved to the dictation settings below, and the next start of dictation uses it
- **Download and Reset** - the card says for each model whether its files are on the server's disk; Download opens the initialisation dialog for a model that is not, without changing the chosen model, and Reset deletes the downloaded files and the self-test result of one that is, except the model dictation is running with
- **Toggle key binding** - press Ctrl+Shift+Space once to start dictation, press it again to stop
- **No top-bar button** - the top bar holds no dictation button and the View menu holds no dictation item; the status section button and the key start and stop dictation
- **Any-key stop** - any key press stops dictation; Enter stops it and still reaches the place you type, so a notebook cell gains its newline and a terminal runs its line, while every other stopping key is consumed
- **Configurable keys** - the binding is a JupyterLab shortcut, changed in Settings → Keyboard Shortcuts; the default binding works out of the box
- **Floating panel** - while dictation runs, a panel above the bottom edge of the work area, painted the theme's error red, shows a microphone, bars that follow your voice, the elapsed time and a stop button, and reads Stopped for 2 s at the stop; it is the only on-screen cue, with no line or button in the top bar; it moves to another edge rather than cover the line you write, the draft or the focused field, and a click on it outside the stop button's click area, which covers the panel's full 40 px height, reaches the text under it
- **One microphone path** - audio comes from `jupyterlab_audio_extension`; this extension does not open the microphone a second way

## Requirements

- JupyterLab >= 4.6
- `jupyterlab_audio_extension`, which captures the browser microphone and delivers the audio to the server
- `parec` (PulseAudio utilities) and `setpriv` (util-linux) on the server

## Speech models

The Transcription card and the settings offer two models; both transcribe English on the server's CPU.

The default model is [Underdog Bark 3.0 Clean](https://huggingface.co/ConwayResearch/Underdog-Bark-3.0-Clean/tree/6d34ed8639b2b9a33e764acf06748519bbb950cf) by Conway Research, in the ONNX conversion by codingSalafi ([codingSalafi/akoway-bark-3.0-clean-onnx](https://huggingface.co/codingSalafi/akoway-bark-3.0-clean-onnx/tree/4be3a531cc981843978fbb4ba20bf85de60091f3)), licensed under [CC BY 4.0](https://huggingface.co/codingSalafi/akoway-bark-3.0-clean-onnx/blob/4be3a531cc981843978fbb4ba20bf85de60091f3/LICENSE-NOTICE.txt). It runs through onnxruntime and leaves out filler words.

The second model is [NVIDIA Nemotron Speech Streaming EN 0.6B](https://huggingface.co/nvidia/nemotron-speech-streaming-en-0.6b), in the int8 ONNX export by Fangjun Kuang of sherpa-onnx ([csukuangfj2/sherpa-onnx-nemotron-speech-streaming-en-0.6b-560ms-int8-2026-04-25](https://huggingface.co/csukuangfj2/sherpa-onnx-nemotron-speech-streaming-en-0.6b-560ms-int8-2026-04-25/tree/52056fdc070914a48dcd68b31b44d6a6f5b85902)). It is licensed by NVIDIA Corporation under the [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/). It reads the audio as one continuous stream and keeps its state for the whole dictation, also through pauses.

- **Pinned revision** - each model's files download from one fixed revision, `4be3a531cc981843978fbb4ba20bf85de60091f3` for Bark and `52056fdc070914a48dcd68b31b44d6a6f5b85902` for Nemotron, never from a branch
- **First use** - the extension ships no weights; the first start of dictation with a model opens a dialog that names the model, its author, its licence and the download size, about 243 MB for Bark and 662 MB for Nemotron; the model downloads only after you click Accept licence and download
- **Self-test** - after the download the dialog loads the model and transcribes a LibriSpeech sample (CC BY 4.0); Start dictation shows once the transcript matches, and the dialog returns on every start until a self-test has passed

## Settings

In Settings → Settings Editor → @stellarshenson/jupyterlab-dictation-extension:

- **Speech model** (`model`) - the model from the extension's list; a model that has not passed initialisation opens the initialisation dialog on the next start
- **Language** (`language`) - the language you speak; English (`en`) is the only one for now
- **Dictation button in the audio status section** (`statusButton`) - on by default; off removes the status section button

## Command line

`jupyterlab-dictation` reaches the running lab's own server: `init` prints the model's licence and, with `--accept-licence`, downloads and self-tests the model; `config` prints or sets the settings above; `reset` deletes a model's files; `start` starts dictation in the JupyterLab tab that has the focus, and `stop` stops it. `jupyterlab-dictation --help` and `jupyterlab-dictation <command> --help` describe every flag, output and refusal.

## Agent Skill

`.agents/skills/jupyterlab-dictation-extension/SKILL.md` tells an AI assistant how to drive the `jupyterlab-dictation` CLI. It carries the rules `--help` cannot state; the command reference stays in `--help`.

The skill ships in the repository and in the wheel, at `<sys.prefix>/share/jupyter/agents/skills/jupyterlab-dictation-extension/SKILL.md`. One of the two links below makes it readable:

```bash
# After pip install, with the Python that runs the lab
mkdir -p ~/.agents/skills && ln -sfn "$(python -c 'import sys; print(sys.prefix)')/share/jupyter/agents/skills/jupyterlab-dictation-extension" ~/.agents/skills/jupyterlab-dictation-extension

# From a clone, into Claude Code
ln -sfn "$PWD/.agents/skills/jupyterlab-dictation-extension" ~/.claude/skills/jupyterlab-dictation-extension
```

## Install

To install the extension, execute:

```bash
pip install jupyterlab_dictation_extension
```

After installing into a running lab, restart JupyterLab, then reload its browser page. On a page loaded before the restart, the status section button and the Transcription card are absent and Ctrl+Shift+Space starts nothing.

## Uninstall

To remove the extension, execute:

```bash
pip uninstall jupyterlab_dictation_extension
```
