Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Tonetta Server

This repo contains all the files that Tonetta's processing server is currently running.

scp -r -i C:\Users\jdjoh\.ssh\tonetta [email protected]:~/joeyMain [email protected]:~/serverFiles .

Deploying to a new server

1. Clone the repo

The repo is private. First add your server's SSH public key as a deploy key on GitHub (repo → Settings → Deploy keys), then:

git clone [email protected]:TonettaSupport/ServerBackup.git
cd ServerBackup

2. Add your .env file

Create a .env file in the ServerBackup directory:

nano .env

Add:

SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_service_key

3. Start the server

chmod +x run_server.sh && ./run_server.sh

This will automatically create a virtual environment, install all dependencies, configure audio, and launch the server in the background.

To monitor logs:

tail -f server.log

To stop the server:

pkill -f newmain.py

Hardware Requirements

The server runs two Whisper models simultaneously: a tiny model for low-latency live transcription and a larger model for final post-call transcription. The branch you deploy determines the final model size.

Model Config by Branch

Branch Live Model Final Model Notes
main tiny small (default) or $WHISPER_MODEL_PATH Stable, lower resource usage
Better-Transcription tiny large-v3-turbo Higher accuracy, needs more RAM/VRAM

All models run in int8 quantized mode on CPU, or float16 if a CUDA GPU is detected.


CPU-Only (Current Default)

Both branches force DEVICE = "cpu" by default for stability. Here's what you need to run without lag:

Branch / Config Min RAM Recommended RAM Min CPUs Notes
main (tiny + small) 4 GB 6–8 GB 4 vCPUs Comfortable on budget VPS
Better-Transcription (tiny + large-v3-turbo) 8 GB 12–16 GB 8 vCPUs Slower than realtime below 8 vCPUs
Custom large-v3 via env var 12 GB 16+ GB 8 vCPUs Highest accuracy, highest cost

Transcription speed note: On CPU with int8, small processes audio at roughly 3–5x realtime (fast). large-v3-turbo runs at ~1–2x realtime on a strong CPU — meaning a 10-minute call may take 5–10 minutes to finish transcribing. Plan queue capacity accordingly. The 30-minute call hard cap skips transcription entirely to avoid timeout.


GPU-Accelerated (Recommended for Better-Transcription)

Set DEVICE = "cuda" in newmain.py (line 48) to enable GPU mode. Models switch to float16 automatically.

Model Loaded VRAM Required Recommended GPU Speed vs Realtime
tiny (live) ~0.5 GB Any NVIDIA GPU ~30x faster
small ~1.5 GB GTX 1060 6GB+ ~10–15x faster
large-v3-turbo ~5–6 GB RTX 3060 12GB / RTX 4000 Ada 20GB ~5–8x faster
large-v3 ~8–10 GB RTX 3090 / A100 40GB ~4–6x faster
tiny + large-v3-turbo (both loaded) ~6–7 GB RTX 3080 10GB+ —

The RTX 4000 Ada (20 GB VRAM) deployed on the production server handles tiny + large-v3-turbo comfortably with headroom to spare.


Minimum Viable Setup (no lag, CPU-only, main branch)

  • CPU: 4 vCPUs
  • RAM: 6 GB
  • Disk: 5 GB free (Whisper model cache + audio temp files)
  • OS: Ubuntu 20.04+ with PulseAudio (required for system audio capture)
  • Python: 3.10+
  • ffmpeg: Required for audio mixing

Recommended Setup (Better-Transcription branch, GPU)

  • GPU: NVIDIA RTX 3080 10GB or better (VRAM is the bottleneck, not CUDA cores)
  • CPU: 8 vCPUs
  • RAM: 16 GB system RAM
  • Disk: 15 GB free
  • CUDA: 11.8+ with matching PyTorch build

Other Services

These run alongside Whisper and add minor overhead:

  • FastAPI + Uvicorn — negligible, ~100 MB RAM
  • librosa (pitch/WPM analysis) — CPU-bound, spikes briefly per call, ~200–400 MB RAM during processing
  • OpenAI API (GPT-4o for /practice, TTS-1 for speech) — cloud calls, no local GPU needed
  • Supabase — cloud DB, no local resources

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages