Configuration Reference

November 5, 2025 ยท View on GitHub

Complete configuration guide for amplifier-app-voice.

Configuration File

Location: ~/.config/amplifier-voice/config.yaml

Format: YAML

Full Example

# OpenAI Realtime API settings
openai:
  api_key: ${OPENAI_API_KEY}  # Or literal key (not recommended)
  model: gpt-4o-realtime-preview-2024-12-17
  voice: alloy
  temperature: 0.7
  max_response_tokens: null  # null = unlimited

# Audio input/output settings
audio:
  input_device: null   # null = system default microphone
  output_device: null  # null = system default speakers
  sample_rate: 24000   # OpenAI Realtime requirement
  buffer_size: 1024    # Audio buffer size in frames
  max_recording_duration: 30  # Maximum seconds per recording

# Terminal UI settings
ui:
  show_transcripts: true        # Display conversation text
  show_audio_levels: false      # Show mic level meter (future)
  show_timestamps: false        # Show message timestamps
  theme: dark                   # dark or light

Configuration Sections

OpenAI Settings

OptionTypeDefaultDescription
api_keystr$OPENAI_API_KEYOpenAI API key (use env var)
modelstrgpt-4o-realtime-preview-2024-12-17Model to use
voicestralloyVoice selection (alloy, echo, shimmer, marin, cedar)
temperaturefloat0.7Response randomness (0.0-1.0)
max_response_tokensint|nullnullOptional output limit

Audio Settings

OptionTypeDefaultDescription
input_deviceint|nullnullMicrophone device index
output_deviceint|nullnullSpeaker device index
sample_rateint24000Sample rate (must be 24000 for OpenAI)
buffer_sizeint1024Audio buffer size in frames
max_recording_durationint30Max seconds per recording

Device indices: Run python -m amplifier_app_voice.audio.utils --list-devices to see available devices.

UI Settings

OptionTypeDefaultDescription
show_transcriptsbooltrueDisplay conversation text
show_audio_levelsboolfalseShow mic level meter
show_timestampsboolfalseShow message timestamps
themestrdarkTerminal theme (dark or light)

Configuration Priority

Settings are loaded in order (later overrides earlier):

  1. Default values (hardcoded in app)
  2. Config file (~/.config/amplifier-voice/config.yaml)
  3. Environment variables (e.g., OPENAI_API_KEY)
  4. Command-line flags (e.g., --voice marin)

Example

# config.yaml
openai:
  voice: alloy
# Environment
export OPENAI_API_KEY="sk-..."

# Command line
amplifier-voice --voice marin

Result: voice = marin (CLI override wins)

Environment Variables

VariableDescription
OPENAI_API_KEYOpenAI API key (recommended over config file)
AMPLIFIER_VOICE_CONFIGOverride config file location

Command-Line Options

amplifier-voice --help

Available options:

  • --voice TEXT - Voice selection
  • --temperature FLOAT - Response randomness
  • --model TEXT - Model override
  • --input-device INTEGER - Microphone device index
  • --output-device INTEGER - Speaker device index
  • --config PATH - Config file location
  • --debug - Enable debug logging

Creating Config File

Option 1: Manual

mkdir -p ~/.config/amplifier-voice
cat > ~/.config/amplifier-voice/config.yaml << 'EOF'
openai:
  api_key: ${OPENAI_API_KEY}
  voice: alloy

audio:
  input_device: null
  output_device: null
EOF

Option 2: Copy Example

mkdir -p ~/.config/amplifier-voice
cp examples/config.yaml ~/.config/amplifier-voice/config.yaml
# Edit as needed

See Also