ensemble-tts-annotation / QUICK_TEST.md
marcosremar
Add visual demo and animated GIF walkthrough
5bc720b

πŸš€ Quick Test Guide - Visual Walkthrough

Watch the Process (10 frames, 20 seconds)

GCP Testing Demo

What You Just Saw

Frame-by-Frame Breakdown:

  1. Frame 1: Open Google Cloud Shell

  2. Frame 2: Download test script

    curl -O https://huggingface.co/marcosremar2/ensemble-tts-annotation/raw/main/scripts/test/launch_gcp_spot.sh
    
  3. Frame 3: Make executable

    chmod +x launch_gcp_spot.sh
    
  4. Frame 4: Run script - finds cheapest instance

    • Scans: e2-micro, e2-small, e2-medium, e2-standard-2
    • Selects: e2-medium (~$0.01/hr)
  5. Frame 5: Create spot instance

    • Instance: ensemble-test-XXXXXX
    • Zone: us-central1-a
    • External IP assigned
  6. Frame 6: Install dependencies

    • Updates packages
    • Installs Python, git
    • Clones repository
    • Installs torch (CPU), transformers, librosa
  7. Frame 7: Run tests

    • Test imports
    • Test annotator creation
    • Test model structure
  8. Frame 8: Results βœ…

    • All tests PASS
    • Time: ~8 seconds
    • Cost: $0.002
  9. Frame 9: Cleanup

    • Delete instance command
    • Stop all charges
  10. Frame 10: Summary

    • Total cost: $0.002 (less than 1 cent!)
    • Total time: ~5 minutes
    • System validated βœ…

πŸ“‹ Quick Copy-Paste Commands

One-liner (All Steps):

curl -O https://huggingface.co/marcosremar2/ensemble-tts-annotation/raw/main/scripts/test/launch_gcp_spot.sh && chmod +x launch_gcp_spot.sh && ./launch_gcp_spot.sh

Individual Steps:

# Step 1: Download
curl -O https://huggingface.co/marcosremar2/ensemble-tts-annotation/raw/main/scripts/test/launch_gcp_spot.sh

# Step 2: Make executable
chmod +x launch_gcp_spot.sh

# Step 3: Run
./launch_gcp_spot.sh

πŸ’° Cost Breakdown

Item Cost Notes
Cloud Shell $0 Free tier
e2-medium spot $0.01/hr Only while running
Network egress $0 Minimal data transfer
Total ~$0.002 For ~12 min test

Less than 1 penny! πŸ’Έ


⏱️ Time Breakdown

Step Time Description
Setup 30s Download + make executable
Instance creation 1 min GCP provisions machine
Dependency install 2 min apt-get + pip install
Clone repo 30s Git clone from HuggingFace
Run test 10s Actual test execution
Cleanup 30s Delete instance
Total ~5 min Start to finish

βœ… What Gets Tested

Test 1: Imports

from ensemble_tts import EnsembleAnnotator  # βœ“

Test 2: Annotator Creation

annotator = EnsembleAnnotator(
    mode='quick',
    device='cpu',
    enable_events=False
)  # βœ“

Test 3: Model Structure

# Validates:
# - 2 models loaded (quick mode)
# - Correct weights: 0.6, 0.4
# - Names: emotion2vec, sensevoice

All tests must PASS βœ…


πŸ” Troubleshooting

"Permission denied"

chmod +x launch_gcp_spot.sh

"Project not set"

gcloud config set project YOUR_PROJECT_ID

"Quota exceeded"

Contact GCP support or use different region

Script fails

Check logs:

gcloud compute instances get-serial-port-output INSTANCE_NAME --zone=us-central1-a

πŸ“Š Expected Output

============================================================
TEST SUMMARY
============================================================
  imports:           βœ“ PASS
  create_annotator: βœ“ PASS
  model_structure:  βœ“ PASS

============================================================
βœ“ ALL LOCAL TESTS PASSED!
============================================================

Time: 8.2 seconds
Cost: $0.002

🎯 Next Steps After Test Passes

  1. Fine-tune models (optional):

    python scripts/training/finetune_emotion2vec.py
    
  2. Run full test (with model loading):

    python scripts/test/test_quick.py
    
  3. Annotate dataset:

    python scripts/ensemble/annotate_ensemble.py \
        --input marcosremar2/orpheus-tts-portuguese-dataset \
        --mode balanced \
        --device cuda
    

🎬 Want to Create Your Own Demo?

python scripts/demo/create_demo_gif.py

Generates:

  • demos/gcp_testing_demo.gif - Animated GIF
  • demos/frames/ - Individual frames (PNG)

Customize:

  • Edit create_demo_gif.py
  • Change colors, text, timing
  • Add more frames

πŸ“š More Resources


Ready to test? Open Cloud Shell now! πŸš€

πŸ‘‰ https://shell.cloud.google.com/