Skip to content
JagguDada01Public

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

PolyVoice Live

PolyVoice Live is a desktop application for live, bidirectional voice translation across VoIP apps. It combines an Electron shell, a React UI, a FastAPI backend, streaming audio routing, speech-to-text, translation, text-to-speech, and meeting intelligence tools.

What It Does

  • Captures microphone and system audio
  • Detects speech and streams it to the backend
  • Transcribes and translates in near real time
  • Plays translated speech back through virtual audio devices
  • Tracks meeting context, summaries, action items, and searchable history
  • Supports demo, local development, Docker deployment, and benchmarking

Requirements

  • Python 3.12+
  • Node.js 20+
  • uv
  • Docker and Docker Compose if you want containerized deployment

Quick Start

  1. Copy the example environment file:
cp .env.example .env
  1. Start the full local stack:
bash scripts/run_local.sh

This script:

  • Creates .env if it does not exist
  • Syncs backend dependencies with uv
  • Installs frontend dependencies if needed
  • Starts the FastAPI backend
  • Starts the Vite renderer
  • Starts the Electron build/watch processes
  1. Open the app:
  • Frontend dev server: http://127.0.0.1:5173
  • Backend API: http://127.0.0.1:8000

Manual Local Setup

If you want to run each part yourself:

Backend

cd backend
uv sync --extra dev
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000

Frontend Renderer

cd frontend
npm install
npm run dev:renderer

Electron Shell

In separate terminals:

cd frontend
npm run dev:electron:watch
cd frontend
npm run dev:electron:run

Configuration

The main settings live in .env.

Useful values:

  • POLYVOICE_API_PORT=8000
  • VITE_API_BASE_URL=http://127.0.0.1:8000
  • VITE_AUDIO_WS_URL=ws://127.0.0.1:8000/ws/audio
  • POLYVOICE_ENABLE_DEMO_MODE=true

Important runtime directories:

  • Backend state: backend/.state/
  • Model files: models/
  • Local cache: .cache/

Build Desktop App

Create a production desktop build:

cd frontend
npm run dist

If macOS code signing gets in the way during local packaging, use the unsigned build:

cd frontend
npm run dist:unsigned

The frontend build output is written to frontend/release/.

Docker Deployment

Build and run the container stack:

docker compose -f docker/docker-compose.yml up --build

Exposed services:

  • Backend: http://localhost:8000
  • Frontend: http://localhost:8080
  • Prometheus: http://localhost:9090
  • Grafana: http://localhost:3000
  • Model server: http://localhost:9000

Tests

Backend

cd backend
uv run --with pytest --with pytest-asyncio --with fastapi --with pydantic --with pydantic-settings --with reportlab pytest

Python Syntax Check

python3 -m compileall backend/app

Frontend Build

cd frontend
npm run build:renderer
npm run build:electron

Frontend Package Build

cd frontend
npm run dist

Benchmarks

Run the benchmark scripts from the repository root:

python scripts/benchmark/latency_benchmark.py
python scripts/benchmark/cpu_gpu_benchmark.py --mode cpu
python scripts/benchmark/stress_test.py
python scripts/benchmark/memory_profile.py

Repository Layout

  • backend/: FastAPI backend and core services
  • frontend/: Electron + React desktop app
  • docker/: Dockerfiles, Compose files, and monitoring configs
  • docs/: architecture, deployment, quick start, and reference docs
  • scripts/: local-run and benchmark scripts
  • models/: local model artifacts and assets
  • tests/: repo-level tests and supporting fixtures

Troubleshooting

  • If uv is missing, install it before running scripts/run_local.sh
  • If npm is missing, install Node.js 20+ first
  • If the app opens but no audio routes, check your virtual audio devices in .env
  • If Docker startup fails, confirm Docker Desktop or Docker Engine is running
  • If Electron packaging fails on macOS, try npm run dist:unsigned

Documentation

Notes

The app is designed to prefer AMD/ROCm where available, with fallbacks to other runtimes when needed.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages