# Configuration Reference

API keys and default behavior are configured only in your user configuration file (`config.toml`), not via environment variables.

**Config file location:**
- macOS: `~/Library/Application Support/SuperVoxtral/config.toml`
- Linux: `${XDG_CONFIG_HOME:-~/.config}/supervoxtral/config.toml`
- Windows: `%APPDATA%/SuperVoxtral/config.toml`

**Useful commands:**
- `svx config init`: Creates `config.toml` with sensible defaults (zero-footprint mode).
- `svx config open`: Opens the config directory.
- `svx config show`: Displays the current configuration.

Example `config.toml` generated by `svx config init`:

```toml
# SuperVoxtral - User configuration
#
# Basics:
# - This configuration controls the default behavior of `svx record`.
# - The parameters below override the binary's built-in defaults.
# - You can override a few options at runtime via the CLI:
#   --prompt / --prompt-file (set a one-off prompt for this run)
#   --log-level (debugging)
#   --outfile-prefix (one-off output naming)
#
# Output persistence:
# - Set keep_* = true to create and save files to project
#   directories (recordings/, transcripts/, logs/).
# - false (default): use temp files/console only (no disk
#   footprint in project dir).
#
# Authentication:
# - API keys are defined in provider-specific sections in this file.
[providers.mistral]
# api_key = ""

[defaults]
# Provider to use (currently supported: "mistral")
provider = "mistral"

# File format sent to the provider: "wav" | "mp3" | "opus"
# Recording is always WAV; conversion is applied if "mp3" or "opus"
format = "opus"

# Model for audio transcription (dedicated endpoint)
model = "voxtral-mini-latest"

# Model for text transformation via LLM (applied after transcription when a prompt is used)
chat_model = "mistral-small-latest"

# Language hint (may help the provider)
language = "fr"

# Context bias: up to 100 words/phrases to help recognize specific vocabulary
# (proper nouns, technical terms, brand names, etc.)
# context_bias = ["SuperVoxtral", "Mistral AI", "Voxtral"]
context_bias = []

# Speaker diarization (identify speakers in transcription)
diarize = true

# Auto-chunking for long recordings (seconds)
# Recordings longer than chunk_duration are split into overlapping chunks
chunk_duration = 300   # 5 minutes
chunk_overlap = 30     # 30s overlap between chunks

# Loopback device for dual audio capture (mic + system audio)
# See docs/capturing-system-audio.md for setup instructions
# loopback_device = "BlackHole 2ch"

# Audio input device (leave commented to use system default)
#device = ""

# Output persistence:
# - keep_raw_audio: true saves the raw WAV recording to recordings/
keep_raw_audio = false
# - keep_compressed_audio: true saves the compressed file (opus/mp3) to recordings/
keep_compressed_audio = false
# - keep_transcript_files: false prints/copies only (no
#   transcripts/ dir), true saves to transcripts/
keep_transcript_files = false
# - keep_log_files: false console only (no logs/ dir), true
#   saves to logs/app.log
keep_log_files = false

# Automatically copy the transcribed text to the system clipboard
copy = true

# Log level: "DEBUG" | "INFO" | "WARNING" | "ERROR"
log_level = "INFO"

[prompt.default]
# Default user prompt source:
# - Option 1: Use a file (recommended)
file = "~/.config/supervoxtral/prompt/user.md"
#
# - Option 2: Inline prompt (less recommended for long text)
# text = "Please transcribe the audio and provide a concise summary in French."

[prompt.test]
# Example additional prompt
# file = "/path/to/another_prompt.md"
# text = "Summarize the meeting in bullet points."
```
