# 🚀 Windows Quick Start Guide

**Get SecondVoice running on Windows in 5 steps!**

---

## 💡 Choose Your Compiler

You have **two options**:

| Option | Size | Install Time | Recommended For |
|--------|------|--------------|----------------|
| **MinGW** (GCC) | ~500 MB | 5-10 min | ⭐ **Most users** |
| Visual Studio (MSVC) | 10-20 GB | 30-60 min | Professional devs |

**Recommendation**: Use **MinGW** - it's 20x smaller and works perfectly!

---

## ⚡ Option A: MinGW (Recommended - 500MB)

### One-Click Setup

Open **PowerShell as Administrator**:

```powershell
cd "E:\Users\Alexis Trouvé\Documents\Projets\secondvoice"
.\setup_mingw.bat
```

This installs everything automatically. Then:

```powershell
# Restart PowerShell
copy .env.example .env
notepad .env  # Add API keys
.\build_mingw.bat --release
cd build\mingw-release
.\SecondVoice.exe
```

**Done!** See [WINDOWS_MINGW.md](WINDOWS_MINGW.md) for details.

---

## ⚡ Option B: Visual Studio (10-20GB)

### 1. Install Visual Studio 2022 Community (Free)
👉 https://visualstudio.microsoft.com/downloads/

During installation, select:
- ✅ **Desktop development with C++**

### 2. Install vcpkg
Open **PowerShell as Administrator**:
```powershell
cd C:\
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
setx VCPKG_ROOT "C:\vcpkg"
```

**⚠️ Important**: Close and reopen PowerShell after setting `VCPKG_ROOT`

---

## 🔧 Build SecondVoice (1-2 minutes)

### 1. Clone the project
```powershell
cd "E:\Users\Alexis Trouvé\Documents\Projets"
git clone <repository-url> secondvoice
cd secondvoice
```

### 2. Create your API keys file
```powershell
copy .env.example .env
notepad .env
```

Add your keys:
```
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
```

### 3. Build!
```powershell
build.bat --release
```

**First build takes 5-10 minutes** (downloads dependencies).

---

## ▶️ Run SecondVoice

```powershell
cd build\windows-release\Release
SecondVoice.exe
```

**That's it!** 🎉

---

## 🎯 What to Expect

1. **ImGui window opens** with "SecondVoice - Live Translation"
2. **Recording starts** automatically
3. **Speak Chinese** into your microphone
4. **Transcription appears** in blue (中文)
5. **Translation appears** in green (FR)
6. **Click "STOP RECORDING"** when done
7. **Audio saved** to `recordings/` folder

---

## ⚙️ Quick Configuration

Edit `config.json` to customize:

```json
{
  "audio": {
    "chunk_duration_seconds": 10  // Lower = faster updates (5-30s)
  },
  "whisper": {
    "model": "gpt-4o-mini-transcribe",  // Or "gpt-4o-transcribe" for best quality
    "prompt": "Add your context here (names, topics, etc.)"
  }
}
```

---

## 🐛 Troubleshooting

### "VCPKG_ROOT not set"
```powershell
setx VCPKG_ROOT "C:\vcpkg"
# Restart PowerShell
```

### "cl.exe not found"
Open **Visual Studio Developer Command Prompt** instead of regular PowerShell.

### "No audio device found"
1. Check microphone is connected
2. Go to **Settings → Sound → Input**
3. Test your microphone

### Build fails with dependency errors
```powershell
build.bat --clean --release
```

---

## 📊 Costs

- **Whisper API**: $0.006/minute (~$0.36/hour)
- **Claude API**: ~$0.04/hour
- **Total**: **~$0.40/hour** of recording

Very affordable for the value! 💰

---

## 📚 Need More Help?

- **Full Windows guide**: `docs/build_windows.md`
- **General docs**: `docs/next_steps.md`
- **Whisper upgrade**: `docs/whisper_upgrade.md`

---

## 🎉 You're Ready!

Test it with:
1. **Sample Chinese audio** (YouTube, recordings)
2. **Real conversation** with Chinese speakers
3. **Important meeting** where you need translation

Good luck with your first meeting! 🚀

---

*Quick start version - Last updated: 20 novembre 2025*
