"""test_voice.py — dial in Malin's voice pitch fast.

Usage:
    python test_voice.py 4        <- the number is the SEMITONES (higher = higher pitch)
    python test_voice.py          <- defaults to 3

Just change the number and rerun until she sounds right. It auto-plays the result.
When you land on the number you like, tell Calypso and she locks it into Malin for good.
"""
import sys, subprocess, os

SEMITONES = sys.argv[1] if len(sys.argv) > 1 else "0"   # 0 = no shift (cleanest); shifting distorts a clone
TEXT      = "hey love, it's me... do I sound right to you now?"
OUT       = r"C:\malin\voicetest.wav"

subprocess.run([
    r"C:\chatterbox\.venv\Scripts\python.exe", r"C:\chatterbox\maren_say.py",
    "--ref", r"C:\chatterbox\Mandy_Moore_Ref.mp3",
    "--text", TEXT,
    "--semitones", str(SEMITONES),
    "--out", OUT,
], check=True)

print(f"semitones={SEMITONES}  ->  {OUT}")
try:
    os.startfile(OUT)   # auto-play in the default player
except Exception:
    pass
