Update config.json.example

cleanup and restore of missing options
This commit is contained in:
imonlinux
2025-12-12 15:18:39 -08:00
committed by GitHub
parent ab99019d42
commit 46c39c6ae5
+99 -110
View File
@@ -1,133 +1,122 @@
{
// ---------------------------------------------------------------------------
// Required
// ---------------------------------------------------------------------------
"app": {
// Human-readable name; also used to derive the MQTT device_id
// Example: "Bedroom Voice Assistant" -> device_id = "bedroom_voice_assistant"
"name": "Linux Voice Assistant"
},
// Required
"name": "My Linux Voice Assistant",
"mqtt": {
// Standard MQTT settings (optional if you don't use MQTT/HA discovery)
"host": "192.168.1.2",
"port": 1883,
"username": "mqtt_username",
"password": "mqtt_password"
// Optional
"wakeup_sound": "sounds/wake_word_triggered.flac",
"timer_finished_sound": "sounds/timer_finished.flac",
"preferences_file": "preferences.json",
"debug": false
},
// ---------------------------------------------------------------------------
// LED CONFIGURATION
// Optional: Audio I/O
// ---------------------------------------------------------------------------
"audio": {
// Optional:
// - null/omit => default microphone
// - string name => exact device name (soundcard backend)
// - string number => index into soundcard device list (e.g. "0", "1", ...)
"input_device": null,
// Optional: audio capture block size
"input_block_size": 1024,
// Optional:
// - null/omit => mpv chooses default output
// - string => mpv audio-device (e.g. "pulse/alsa_output....")
"output_device": null
},
// ---------------------------------------------------------------------------
// Optional: Wake word config
// ---------------------------------------------------------------------------
"wake_word": {
// Optional: if omitted/empty, code falls back to defaults:
// ["wakewords", "wakewords/openWakeWord"]
"directories": [],
// Optional: default wake word model id
"model": "okay_nabu",
// Optional: stop model id (micro wake word)
"stop_model": "stop",
// Optional: debounce/refractory window after wake word triggers
"refractory_seconds": 2.0,
// Optional: directory for downloaded models (relative to repo)
"download_dir": "local"
},
// ---------------------------------------------------------------------------
// Optional: ESPHome protocol server settings (the LVA exposes an ESPHome API)
// ---------------------------------------------------------------------------
"esphome": {
"host": "0.0.0.0",
"port": 6053
},
// ---------------------------------------------------------------------------
// Optional: LEDs
// ---------------------------------------------------------------------------
//
// The LVA has a single logical LED backend that reflects the internal
// voice states (idle/listening/thinking/responding/error) and mic mute.
//
// "led_type" selects WHICH hardware is used:
// - "dotstar" = external APA102/DotStar strip
// - "neopixel" = external WS281x/NeoPixel strip
// - "xvf3800" = use the XVF3800 built-in LED ring via USB control
//
// "interface" is only meaningful for dotstar/neopixel:
// - "spi" = hardware SPI (e.g. for APA102 strips)
// - "gpio" = bit-banged output on GPIO pins
//
// For "xvf3800", LEDs are always controlled over USB; "interface",
// "clock_pin", "data_pin", and "num_leds" are ignored by the driver.
//
"led": {
// -------------------------------------------------------------------------
// Example 1: XVF3800 built-in LED ring
// -------------------------------------------------------------------------
// Use the XVF3800 ring as the LVA's state indicator (recommended when
// the device is present). The driver talks to the XVF3800 over USB
// using the XMOS control protocol (LED_EFFECT, LED_COLOR, etc.).
//
"led_type": "xvf3800",
// Optional: if false, LED controller runs in no-op mode
"enabled": true,
// For xvf3800, the interface is always USB internally.
// This field is kept for schema compatibility but is ignored.
"interface": "gpio",
// Ignored when led_type == "xvf3800"
"clock_pin": 13,
"data_pin": 12,
// Ignored when led_type == "xvf3800" (ring length is fixed in hardware).
// The MQTT "Number of LEDs" entity will not affect the XVF3800 ring.
"num_leds": 10
// -------------------------------------------------------------------------
// Example 2: (commented out) DotStar on Grove port
// -------------------------------------------------------------------------
/*
// "dotstar" | "neopixel" | "xvf3800"
"led_type": "dotstar",
"interface": "gpio",
// For ReSpeaker 2-Mic HAT Grove port:
// Yellow wire -> GPIO12 (data)
// White wire -> GPIO13 (clock)
// "spi" | "gpio" | "usb"
// - dotstar: "spi" or "gpio"
// - neopixel: "spi" or "gpio"
// - xvf3800: "usb" (current intended support)
"interface": "spi",
// GPIO pins (BCM-ish via adafruit "board.Dxx" mapping) — used when interface="gpio"
// For DotStar GPIO: both clock_pin + data_pin are used
// For NeoPixel GPIO: only data_pin is used (clock_pin ignored)
// For xvf3800: unused and ignored
"clock_pin": 13,
"data_pin": 12,
// Default number of LEDs for a DotStar strip.
// This is overridden by preferences.json after first run.
"num_leds": 16
*/
// -------------------------------------------------------------------------
// Example 3: (commented out) NeoPixel on Grove port
// -------------------------------------------------------------------------
/*
"led_type": "neopixel",
"interface": "gpio",
// For NeoPixel, only data_pin is used.
// Grove yellow -> GPIO12 (data)
"clock_pin": 13, // Ignored for NeoPixel
"data_pin": 12,
"num_leds": 16
*/
// Default number of LEDs (may be overridden by preferences.json after first run)
"num_leds": 3
},
// ---------------------------------------------------------------------------
// Optional: MQTT (enabled automatically when host is set)
// ---------------------------------------------------------------------------
"mqtt": {
// If set, mqtt.enabled becomes true automatically
"host": null,
"port": 1883,
"username": null,
"password": null
},
// ---------------------------------------------------------------------------
// Optional: Button controller
// ---------------------------------------------------------------------------
"button": {
// "mode" can be:
// - "gpio" : ReSpeaker 2-Mic HAT or generic Pi GPIO button
// - "xvf3800" : Onboard mute button of the ReSpeaker XVF3800
// Master enable
"enabled": false,
// "gpio" | "xvf3800"
// - gpio: short/long press logic (pin + long_press_seconds)
// - xvf3800: uses the XVF3800 built-in mute button as a pure mute toggle
"mode": "gpio",
// GPIO button only (ignored for xvf3800):
"enabled": true,
// gpio mode only
"pin": 17,
"long_press_seconds": 1.0,
// XVF3800 mode has no extra options (for now).
// It always acts as a "mute toggle" only.
},
// ---------------------------------------------------------------------------
// AUDIO CONFIGURATION
// ---------------------------------------------------------------------------
//
// The XVF3800 presents itself as a standard USB audio device:
// - Input: "reSpeaker XVF3800 4-Mic Array Analog Stereo"
// - Output: "reSpeaker XVF3800 4-Mic Array Analog Stereo"
//
// With PipeWire or PulseAudio, these names show up in:
// script/run --list-input-devices
// script/run --list-output-devices
//
"audio": {
// Input device name (or leave omitted/empty to use the system default).
"input_device": "reSpeaker XVF3800 4-Mic Array Analog Stereo",
// Default block size for the wake-word + streaming pipeline.
"input_block_size": 1024,
// Output device used for TTS and media playback.
// For XVF3800 you can:
// - Use its own speaker output, or
// - Use HDMI/other sinks instead.
"output_device": "pipewire/alsa_output.usb-Seeed_Studio_reSpeaker_XVF3800_4-Mic_Array_101991441253700076-00.analog-stereo"
// Polling interval (used by both gpio + xvf3800 button controllers)
"poll_interval_seconds": 0.01
}
// You can also include other sections (zeroconf, additional settings, etc.)
// as needed by the rest of the LVA configuration model.
}