╔══════════════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ AIVA DEMO RECORDING - COMPLETE WORKFLOW ║ ║ ║ ╚══════════════════════════════════════════════════════════════════════════════════════╝ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ PHASE 1: SETUP │ └─────────────────────────────────────────────────────────────────────────────────────┘ ┌─────────────────┐ │ test_setup.py │ ──┬──> ✅ Python 3.8+ │ (validate) │ ├──> ✅ requests, python-docx └─────────────────┘ ├──> ❌ ffmpeg (INSTALL NEEDED) ├──> ✅ Demo script .docx ├──> ✅ Output directory ├──> ✅ Telnyx API key └──> ✅ Disk space ↓ ┌─────────────────────────┐ │ sudo apt-get install │ │ ffmpeg │ └─────────────────────────┘ ↓ [READY TO RUN] ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ PHASE 2: EXECUTION │ └─────────────────────────────────────────────────────────────────────────────────────┘ ┌──────────────────┐ OR ┌──────────────────┐ │ QUICK_START.sh │ ─────────────> │ record_demo.py │ │ (automated) │ │ (manual) │ └──────────────────┘ └──────────────────┘ │ ↓ ┌───────────────────────────────────┐ │ STEP 1: Read Demo Script │ ├───────────────────────────────────┤ │ Source: .docx file │ │ Fallback: Embedded text │ │ Output: Script string (~75s) │ └───────────────────────────────────┘ │ ↓ ┌───────────────────────────────────┐ │ STEP 2: Call Telnyx TTS API │ ├───────────────────────────────────┤ │ POST /v2/text-to-speech │ │ Voice: eucalyptus │ │ Format: WAV (22.05kHz) │ │ Time: ~5-10 seconds │ └───────────────────────────────────┘ │ ↓ ┌───────────────────────────────────┐ │ STEP 3: Save Raw Audio │ ├───────────────────────────────────┤ │ File: demo_raw.wav │ │ Size: ~2-3 MB │ │ Format: 22.05kHz mono WAV │ └───────────────────────────────────┘ │ ↓ ┌───────────────────────────────────┐ │ STEP 4: Normalize Volume │ ├───────────────────────────────────┤ │ Tool: ffmpeg loudnorm filter │ │ Target: -16 LUFS │ │ Output: demo_normalized.wav │ └───────────────────────────────────┘ │ ↓ ┌───────────────────────────────────┐ │ STEP 5: Trim Silence │ ├───────────────────────────────────┤ │ Tool: ffmpeg silenceremove │ │ Threshold: -50dB │ │ Output: demo_trimmed.wav │ └───────────────────────────────────┘ │ ┌─────────────┴─────────────┐ │ │ ↓ ↓ ┌───────────────────────────┐ ┌───────────────────────────┐ │ STEP 6a: Convert to Opus │ │ STEP 6b: Convert to MP3 │ ├───────────────────────────┤ ├───────────────────────────┤ │ Tool: ffmpeg libopus │ │ Tool: ffmpeg libmp3lame │ │ Bitrate: 32 kbps VBR │ │ Bitrate: 48 kbps CBR │ │ Compression: Level 10 │ │ Channels: Mono │ │ Output: demo.opus │ │ Output: demo.mp3 │ │ Size: ~300KB │ │ Size: ~450KB │ └───────────────────────────┘ └───────────────────────────┘ │ │ └─────────────┬─────────────┘ ↓ ┌───────────────────────────────────┐ │ STEP 7: Verification │ ├───────────────────────────────────┤ │ Check: File sizes │ │ Check: Duration │ │ Check: Quality │ │ Report: Pass/Fail │ └───────────────────────────────────┘ │ ↓ [AUDIO FILES READY] ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ PHASE 3: DEPLOYMENT │ └─────────────────────────────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────┐ │ OUTPUT FILES │ ├─────────────────────────────────────────────────────────────┤ │ ✅ demo.opus (Primary - WebM/Opus, ~300KB) │ │ ✅ demo.mp3 (Fallback - MP3, ~450KB) │ └─────────────────────────────────────────────────────────────┘ │ ↓ ┌─────────────────────────────────────────────────────────────┐ │ MANUAL DEPLOYMENT STEPS │ ├─────────────────────────────────────────────────────────────┤ │ 1. Listen to both files (quality check) │ │ 2. Upload to website: /assets/audio/ │ │ 3. Update hero page HTML with