Metadata-Version: 2.4
Name: ipyannote
Version: 0.6.1
Summary: Interactive pyannote widgets
Author-email: Hervé BREDIN <herve@pyannote.ai>
Requires-Python: >=3.10
Requires-Dist: anywidget>=0.9.13
Requires-Dist: numpy>=1.0.0
Requires-Dist: pyannote-core>=5.0.0
Requires-Dist: pyannote-metrics>=3.2.1
Requires-Dist: scipy>=1.14.1
Provides-Extra: io
Requires-Dist: torchcodec; extra == 'io'
Provides-Extra: wer
Requires-Dist: meeteval>=0.4.3; extra == 'wer'
Description-Content-Type: text/markdown

# ipyannote

## Installation

```sh
pip install ipyannote
```

or with [uv](https://github.com/astral-sh/uv):

```sh
uv add ipyannote
```

## Development

We recommend using [uv](https://github.com/astral-sh/uv) for development.
It will automatically manage virtual environments and dependencies for you.

```sh
uv run jupyter lab example.ipynb
```

Alternatively, create and manage your own virtual environment:

```sh
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
jupyter lab example.ipynb
```

The widget front-end code bundles it's JavaScript dependencies. After setting up Python,
make sure to install these dependencies locally:

```sh
npm install
```

While developing, you can run the following in a separate terminal to automatically
rebuild JavaScript as you make changes:

```sh
npm run dev
```

Open `example.ipynb` in JupyterLab, VS Code, or your favorite editor
to start developing. Changes made in `js/` will be reflected
in the notebook.


## Keyboard and gamepad shortcuts

The `Waveform` widget supports both keyboard shortcuts and standard gamepads.
Click the waveform to give it focus before using either.

Gamepad bindings follow the [W3C standard gamepad layout](https://w3c.github.io/gamepad/#remapping),
which maps actions to button *positions*. Physical labels, however, differ by
manufacturer: this table uses **Xbox-style labels** (A/B/X/Y). If you use a
Nintendo-style controller, A and B (as well as X and Y) are physically swapped.
The gamepad notation below uses 🕹️ for an analog stick, <kbd>⊙</kbd> for a stick
click, <kbd>↔</kbd> for left/right axis, <kbd>↕</kbd> for up/down axis, and
<kbd>✜</kbd> for the D-pad.

### Playback

| Feature | Mouse | Keyboard | Gamepad |
|:---|:---:|:---:|:---:|
| Toggle play/pause | — | <kbd>Space</kbd> | <kbd>L 🕹️</kbd> <kbd>⊙</kbd> |
| Scrub playback | — | <kbd>↔</kbd> | <kbd>L 🕹️</kbd> <kbd>↔</kbd> |
| Scrub playback faster | — | <kbd>Shift</kbd>+<kbd>↔</kbd> | <kbd>L 🕹️</kbd> <kbd>↔</kbd> + <kbd>A</kbd>|
| Zoom in/out | <kbd>Ctrl</kbd>+🖱️ scroll | <kbd>Z</kbd> / <kbd>Shift</kbd>+<kbd>Z</kbd> | <kbd>R 🕹️</kbd> <kbd>↕</kbd> |
| Loop on selection or selected region | — | <kbd>L</kbd> | <kbd>B</kbd> |
| Toggle beep sound on region in/out | — | <kbd>B</kbd> | — |
| Toggle gap visualization | — | <kbd>G</kbd> | — |
| Toggle action HUD | — | <kbd>H</kbd> | — |

### Selection

| Feature | Mouse | Keyboard | Gamepad |
|:---|:---:|:---:|:---:|
| Toggle selection | 🖱️<sub>L</sub> + drag | <kbd>S</kbd> | <kbd>R 🕹️</kbd> <kbd>⊙</kbd> |
| Edit selection start | — | <kbd>←</kbd> / <kbd>→</kbd> | <kbd>L 🕹️</kbd> <kbd>↔</kbd> |
| Edit selection end | — | <kbd>Shift</kbd>+<kbd>←</kbd> / <kbd>Shift</kbd>+<kbd>→</kbd> | <kbd>R 🕹️</kbd> <kbd>↔</kbd> |
| Remove the selection | — | <kbd>Escape</kbd> | <kbd>A</kbd> |

### Regions

| Feature | Mouse | Keyboard | Gamepad |
|:---|:---:|:---:|:---:|
| Create a region | 🖱️<sub>L</sub>×2 | <kbd>Enter</kbd> | <kbd>X</kbd> |
| Split region | — | <kbd>Shift</kbd>+<kbd>Enter</kbd> | <kbd>R₂</kbd> |
| Delete selected region | — | <kbd>Delete</kbd> or <kbd>Shift</kbd>+<kbd>Backspace</kbd> | <kbd>Y</kbd> |
| Select region | 🖱️<sub>L</sub> on region | — | <kbd>L₂</kbd> |
| Select previous/next region | — | <kbd>Tab</kbd> / <kbd>Shift</kbd>+<kbd>Tab</kbd> | <kbd>L₁</kbd>/<kbd>R₁</kbd> |
| Edit selected region start | — | <kbd>↔</kbd> | <kbd>L 🕹️</kbd> <kbd>↔</kbd> |
| Edit selected region end | — | <kbd>Shift</kbd>+<kbd>↔</kbd> | <kbd>R 🕹️</kbd> <kbd>↔</kbd> |
| Unselect region | — | <kbd>Escape</kbd> | <kbd>A</kbd> |

### Labels

| Feature | Mouse | Keyboard | Gamepad |
|:---|:---:|:---:|:---:|
| Cycle next/previous label for selected region | — | <kbd>></kbd> / <kbd><</kbd> | <kbd>✜</kbd> <kbd>↕</kbd> |
