Metadata-Version: 2.5
Name: juturna-nodes
Version: 0.2.0
Summary: Officially supported Juturna nodes
Project-URL: Homepage, https://github.com/meetecho/juturna_nodes
Project-URL: Documentation, https://meetecho.github.io/juturna/catalog/nodes/overview.html
Project-URL: Repository, https://github.com/meetecho/juturna_nodes
Project-URL: Issues, https://github.com/meetecho/juturna_nodes/issues
Project-URL: Changelog, https://github.com/meetecho/juturna_nodes/blob/main/CHANGELOG.md
Author-email: Antonio Bevilacqua <abevilacqua@meetecho.com>, Paolo Saviano <psaviano@meetecho.com>
Maintainer-email: Antonio Bevilacqua <abevilacqua@meetecho.com>, Paolo Saviano <psaviano@meetecho.com>
License-Expression: MIT
License-File: LICENSE
Keywords: audio,juturna,pipeline,real-time,rtp,streaming,transcription,video
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
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: Topic :: Multimedia
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: juturna>=3.0.0
Provides-Extra: all
Requires-Dist: av>=19.0.1; extra == 'all'
Requires-Dist: faster-whisper; extra == 'all'
Requires-Dist: juturna[warp]; extra == 'all'
Requires-Dist: onnxruntime>=1.32; extra == 'all'
Requires-Dist: pymongo>=4.16.0; extra == 'all'
Requires-Dist: requests; extra == 'all'
Requires-Dist: sherpa-onnx>=2.0.1; extra == 'all'
Requires-Dist: silero-vad; extra == 'all'
Requires-Dist: sounddevice>=0.5.6; extra == 'all'
Requires-Dist: ultralytics; extra == 'all'
Requires-Dist: watchdog<8,>=6; extra == 'all'
Requires-Dist: websockets; extra == 'all'
Provides-Extra: audio
Requires-Dist: av>=19.0.1; extra == 'audio'
Requires-Dist: faster-whisper; extra == 'audio'
Requires-Dist: requests; extra == 'audio'
Requires-Dist: sherpa-onnx>=2.0.1; extra == 'audio'
Requires-Dist: silero-vad; extra == 'audio'
Requires-Dist: sounddevice>=0.5.6; extra == 'audio'
Requires-Dist: websockets; extra == 'audio'
Provides-Extra: audio-file
Requires-Dist: av>=19.0.1; extra == 'audio-file'
Provides-Extra: audio-rtp
Requires-Dist: av>=19.0.1; extra == 'audio-rtp'
Provides-Extra: audio-writer
Provides-Extra: browser-input
Provides-Extra: browser-output
Provides-Extra: detection-events
Provides-Extra: detector-yolo
Requires-Dist: ultralytics; extra == 'detector-yolo'
Provides-Extra: detector-yolox
Requires-Dist: onnxruntime>=1.32; extra == 'detector-yolox'
Requires-Dist: requests; extra == 'detector-yolox'
Provides-Extra: dev
Requires-Dist: bandit==1.9.4; extra == 'dev'
Requires-Dist: conventional-pre-commit==4.4.0; extra == 'dev'
Requires-Dist: pre-commit==4.6.2; extra == 'dev'
Provides-Extra: dev-full
Requires-Dist: bandit==1.9.4; extra == 'dev-full'
Requires-Dist: conventional-pre-commit==4.4.0; extra == 'dev-full'
Requires-Dist: furo==2025.12.19; extra == 'dev-full'
Requires-Dist: pre-commit==4.6.2; extra == 'dev-full'
Requires-Dist: pytest-cov; extra == 'dev-full'
Requires-Dist: pytest==9.1.1; extra == 'dev-full'
Requires-Dist: ruff>=0.16.10; extra == 'dev-full'
Requires-Dist: sphinx-autoapi==3.8.1; extra == 'dev-full'
Requires-Dist: sphinx-autobuild==2025.8.25; extra == 'dev-full'
Requires-Dist: sphinx-design==0.7.0; extra == 'dev-full'
Requires-Dist: sphinx-new-tab-link==0.8.2; extra == 'dev-full'
Requires-Dist: sphinx<9.0,>6.0; extra == 'dev-full'
Requires-Dist: sphinxcontrib-apidoc==0.6.0; extra == 'dev-full'
Requires-Dist: sphinxcontrib-napoleon==0.7; extra == 'dev-full'
Provides-Extra: doc
Requires-Dist: furo==2025.12.19; extra == 'doc'
Requires-Dist: sphinx-autoapi==3.8.1; extra == 'doc'
Requires-Dist: sphinx-autobuild==2025.8.25; extra == 'doc'
Requires-Dist: sphinx-design==0.7.0; extra == 'doc'
Requires-Dist: sphinx-new-tab-link==0.8.2; extra == 'doc'
Requires-Dist: sphinx<9.0,>6.0; extra == 'doc'
Requires-Dist: sphinxcontrib-apidoc==0.6.0; extra == 'doc'
Requires-Dist: sphinxcontrib-napoleon==0.7; extra == 'doc'
Provides-Extra: file-watcher
Requires-Dist: watchdog<8,>=6; extra == 'file-watcher'
Provides-Extra: json-http
Provides-Extra: json-websocket
Requires-Dist: websockets; extra == 'json-websocket'
Provides-Extra: lint
Requires-Dist: ruff>=0.16.10; extra == 'lint'
Provides-Extra: mic-source
Requires-Dist: sounddevice>=0.5.6; extra == 'mic-source'
Provides-Extra: notifier-console
Provides-Extra: notifier-http
Requires-Dist: requests; extra == 'notifier-http'
Provides-Extra: notifier-mongo
Requires-Dist: pymongo>=4.16.0; extra == 'notifier-mongo'
Provides-Extra: notifier-udp
Provides-Extra: passthrough-identity
Provides-Extra: prompter-ollama
Requires-Dist: requests; extra == 'prompter-ollama'
Provides-Extra: speaker-sink
Requires-Dist: sounddevice>=0.5.6; extra == 'speaker-sink'
Provides-Extra: synthesizer-sherpa
Requires-Dist: requests; extra == 'synthesizer-sherpa'
Requires-Dist: sherpa-onnx>=2.0.1; extra == 'synthesizer-sherpa'
Provides-Extra: test
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest==9.1.1; extra == 'test'
Provides-Extra: transcriber-kroko
Requires-Dist: websockets; extra == 'transcriber-kroko'
Provides-Extra: transcriber-sherpa
Requires-Dist: requests; extra == 'transcriber-sherpa'
Requires-Dist: sherpa-onnx>=2.0.1; extra == 'transcriber-sherpa'
Provides-Extra: transcriber-whisper
Requires-Dist: faster-whisper; extra == 'transcriber-whisper'
Provides-Extra: vad-silero
Requires-Dist: silero-vad; extra == 'vad-silero'
Provides-Extra: video
Requires-Dist: av>=19.0.1; extra == 'video'
Requires-Dist: onnxruntime>=1.32; extra == 'video'
Requires-Dist: requests; extra == 'video'
Requires-Dist: ultralytics; extra == 'video'
Provides-Extra: video-capture
Requires-Dist: av>=19.0.1; extra == 'video-capture'
Provides-Extra: video-rtp
Requires-Dist: av>=19.0.1; extra == 'video-rtp'
Provides-Extra: warp
Requires-Dist: juturna[warp]; extra == 'warp'
Description-Content-Type: text/markdown

# juturna-nodes

The officially supported node collection for
[Juturna](https://github.com/meetecho/juturna), the Python library for building
real-time, modular data pipelines.

Juturna pipelines are graphs of nodes: sources produce data (audio and video
streams, HTTP requests, files, ...), processing nodes transform it
(transcription, voice activity detection, object detection, ...), and sinks
deliver the results (HTTP endpoints, databases, UDP sockets, ...). This
package provides a set of ready-to-use nodes, maintained by the Juturna team,
that install into the `juturna.nodes` namespace.

## Installation

`juturna-nodes` requires Python 3.12 or newer, and installs the Juturna core
library as a dependency. The base package installs none of the node
dependencies: every node has its own optional extra, named after the node
folder with dashes (`audio-rtp` for `AudioRtp`, `detector-yolox` for
`DetectorYolox`), so a node is always installed the same way:

```bash
pip install "juturna-nodes[audio-rtp]"
```

The extra of a node that needs nothing beyond the core installs no package.
The [Available nodes](#available-nodes) tables list the extra of each node,
and `pyproject.toml` lists the packages each extra installs.

Three groups install several extras at once:

| Group   | Extras                                                                 |
| ------- | ---------------------------------------------------------------------- |
| `audio` | `audio-file`, `audio-rtp`, `mic-source`, `speaker-sink`, `transcriber-sherpa`, `synthesizer-sherpa`, `transcriber-whisper`, `transcriber-kroko`, `vad-silero`, `audio-writer` |
| `video` | `video-rtp`, `video-capture`, `detector-yolo`, `detector-yolox`, `detection-events` |
| `all`   | `audio`, `video`, `warp` and the extras of every other node            |

The `detector-yolo` extra (and so the `video` and `all` groups) installs
`ultralytics`, which is distributed under the AGPL-3.0 license.

```bash
pip install "juturna-nodes[audio-rtp,transcriber-whisper]"
pip install "juturna-nodes[all]"
```

To install from source:

```bash
git clone https://github.com/meetecho/juturna_nodes.git
cd juturna_nodes
pip install -e ".[all]"
```

## Available nodes

### Sources

| Node            | Description                                                 | Extra |
| --------------- | ----------------------------------------------------------- | ----- |
| `AudioFile`     | Read an audio file, and chunk it into audio messages        | `audio-file` |
| `AudioRtp`      | Consume an RTP audio stream                                 | `audio-rtp` |
| `VideoRtp`      | Consume an RTP video stream                                 | `video-rtp` |
| `VideoCapture`  | Read video from a file or a webcam                          | `video-capture` |
| `FileWatcher`   | Watch a filesystem location, and emit filesystem events     | `file-watcher` |
| `JsonHTTP`      | Receive JSON content from `POST` requests on an HTTP server | `json-http` |
| `JsonWebsocket` | Expose a websocket server, and receive data from it         | `json-websocket` |
| `BrowserInput`  | Receive messages from the web page hosting a pipeline       | `browser-input` |
| `MicSource`     | Capture audio from a microphone, with push-to-talk          | `mic-source` |

### Processing

| Node                  | Description                                          | Extra      |
| --------------------- | ---------------------------------------------------- | ---------- |
| `VadSilero`           | Voice activity detection with the Silero VAD model   | `vad-silero` |
| `TranscriberWhisper`  | Transcribe audio with Whisper models                 | `transcriber-whisper` |
| `TranscriberKroko`    | Transcribe audio with a Kroko server (experimental)  | `transcriber-kroko` |
| `TranscriberSherpa`   | Transcribe audio with sherpa-onnx streaming models   | `transcriber-sherpa` |
| `PrompterOllama`      | Ask a model served by Ollama                         | `prompter-ollama` |
| `SynthesizerSherpa`   | Synthesize speech from text with sherpa-onnx         | `synthesizer-sherpa` |
| `DetectorYolo`        | Detect and annotate objects in frames with YOLO      | `detector-yolo` |
| `DetectorYolox`       | Detect objects in frames with YOLOX on ONNX Runtime  | `detector-yolox` |
| `DetectionEvents`     | Turn the detections of frames into JSON events       | `detection-events` |
| `PassthroughIdentity` | Forward input messages after a delay (for testing)   | `passthrough-identity` |
| `Warp`                | Run a node remotely, over gRPC                       | `warp`     |

### Sinks

| Node            | Description                                  | Extra |
| --------------- | -------------------------------------------- | ----- |
| `NotifierHTTP`  | Send messages to an HTTP endpoint            | `notifier-http` |
| `NotifierMongo` | Store messages in a MongoDB collection       | `notifier-mongo` |
| `NotifierUDP`   | Send messages to a UDP socket                | `notifier-udp` |
| `NotifierConsole` | Print messages on the terminal             | `notifier-console` |
| `AudioWriter`   | Write audio messages to a WAV file           | `audio-writer` |
| `SpeakerSink`   | Play audio messages on a speaker             | `speaker-sink` |
| `BrowserOutput` | Send messages to the web page hosting it     | `browser-output` |

Every node folder in `src/juturna/nodes/` includes a `config.toml` file with
the node arguments and their default values, and a `README.md` file with
further details.

## Usage

Installed nodes are used in a pipeline configuration by class name. The node
`configuration` overrides the default arguments of the node:

```json
{
  "version": "3.0.0",
  "pipeline": {
    "name": "live_transcription",
    "id": "transcription_01",
    "folder": "./running_pipelines",
    "nodes": [
      {
        "name": "0_src",
        "type": "AudioRtp",
        "configuration": { "port": 8888 }
      },
      {
        "name": "1_vad",
        "type": "VadSilero",
        "configuration": {}
      },
      {
        "name": "2_transcriber",
        "type": "TranscriberWhisper",
        "configuration": { "model_name": "small", "language": "en" }
      },
      {
        "name": "3_dst",
        "type": "NotifierHTTP",
        "configuration": { "endpoint": "http://localhost:8080/transcripts" }
      }
    ],
    "links": [
      { "from": "0_src", "to": "1_vad" },
      { "from": "1_vad", "to": "2_transcriber" },
      { "from": "2_transcriber", "to": "3_dst" }
    ]
  }
}
```

The pipeline can be validated and launched with the Juturna CLI:

```bash
juturna validate -c live_transcription.json
juturna launch -c live_transcription.json
```

Alternatively, `juturna create` interactively builds a pipeline configuration,
listing all the installed nodes.

Nodes can also be imported directly, for instance to use them in code or to
extend them:

```python
from juturna.nodes import AudioRtp, NotifierHTTP
```

Nodes are imported lazily, so importing a node only requires the dependencies
of that node.

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the
development setup, the code quality checks, and a guide to writing and
submitting a new node.

To report a security vulnerability, please follow the process described in
[SECURITY.md](SECURITY.md), and do not open a public issue.

## License

`juturna-nodes` is released under the [MIT License](LICENSE).
Copyright © Meetecho s.r.l.
