Skip to main content

dora-gradio

Project description

Dora Gradio UI Interface

A versatile UI interface for Dora-rs that provides text, audio, and video input capabilities using Gradio.

Features

  • Text Input: Direct text input through a chat-like interface
  • Audio Input: Real-time audio streaming in 16kHz format
  • Video Input: WebRTC camera streaming at 640x480
  • Multiple Output Channels:
    • text: For direct text messages
    • audio: For raw audio stream
    • image: For camera feed
  • Clean Interface: Simple and intuitive UI with tabbed sections
  • Auto Port Management: Automatically handles port conflicts

Installation

Using pip:

python -m venv .venv
source .venv/bin/activate
pip install -e .

Usage

1. Web Interface

The interface will be available at: http://localhost:7860

2. As a Dora Node

Create a YAML configuration:

nodes:
  - id: ui
    build: pip install -e .
    path: dora-gradio
    outputs:
      - text     # Text from chat interface
      - audio    # Raw audio stream
      - image    # Camera feed
    env:
      VIRTUAL_ENV: path to your venv   # comment this if not using venv

Run with Dora:

dora run demo.yml

3. Integration Examples

Video Processing Pipeline

nodes:
  - id: ui
    build: pip install -e .
    path: dora-gradio
    outputs:
      - image    # Camera feed

  - id: video_processor
    build: pip install -e path/to/processor
    path: video-processor
    inputs:
      video: ui/image

Audio Processing Pipeline

nodes:
  - id: ui
    build: pip install -e .
    path: dora-gradio
    outputs:
      - audio    # Raw audio stream

  - id: audio_processor
    build: pip install -e path/to/processor
    path: audio-processor
    inputs:
      audio: ui/audio

4. Demo Example

Here's a complete demo pipeline using the UI with visualization and audio processing:

nodes:
  - id: ui
    build: pip install -e .
    path: dora-gradio
    outputs:
      - text     # Text messages
      - audio    # Raw audio stream
      - image    # Camera feed

  - id: plot
    build: pip install dora-rerun
    path: dora-rerun
    inputs:
      text_input: ui/text
      audio: ui/audio
      image: ui/image

  - id: dora-vad
    build: pip install -e path/to/dora-vad
    path: dora-vad
    inputs:
      audio: ui/audio

  - id: dora-distil-whisper
    build: pip install -e path/to/dora-distil-whisper
    path: dora-distil-whisper
    inputs:
      audio: ui/audio

This demo showcases:

  • Real-time visualization with dora-rerun
  • Voice Activity Detection with dora-vad
  • Speech processing with dora-distil-whisper

Interface Features

Camera Tab

  • Real-time WebRTC video streaming
  • Fixed 640x480 resolution
  • BGR8 color format
  • Automatic timestamp synchronization

Audio and Text Input Tab

  • Chat-like interface for text input
  • Real-time audio streaming (16kHz, mono)
  • Status indicators for streaming state
  • Immediate output through respective channels

Controls

  • Send Text button for chat messages
  • Stop Server button for graceful shutdown

System Requirements

  • Python ≥ 3.10
  • Required ports:
    • 7860 (Gradio interface)

Known Limitations

  • Fixed video resolution (640x480)
  • Fixed audio sample rate (16kHz)
  • Requires port 7860 to be available

License

dora-gradio's code are released under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dora_gradio-0.3.13.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dora_gradio-0.3.13-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file dora_gradio-0.3.13.tar.gz.

File metadata

  • Download URL: dora_gradio-0.3.13.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for dora_gradio-0.3.13.tar.gz
Algorithm Hash digest
SHA256 0b36be1522a76f6936873164776289a4ac3d06da8e02368fc29af2cb2967ef1f
MD5 db5318d6d46f1dfe31c974ef08ead496
BLAKE2b-256 1e9b3cb9d1782bbae171d0d8b7053d3a573452124c3fd9b035f7ad670c097665

See more details on using hashes here.

File details

Details for the file dora_gradio-0.3.13-py3-none-any.whl.

File metadata

File hashes

Hashes for dora_gradio-0.3.13-py3-none-any.whl
Algorithm Hash digest
SHA256 5124e65c6d43290bc047b8c7f71c8d3b2a46d248c3d2e7abcb0fcf82c1d4c62f
MD5 18e812ab10a8fae99885c5d639d47edf
BLAKE2b-256 2a5dbb1266b47e9e6dcf950fed919c86f5c6e081aeee77b2b8f9f50d2ecdee66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page