## Summary
- add optional microphone constraints for echo cancellation, noise
suppression, automatic gain control, and channel count
- request configured values as non-mandatory `ideal` constraints
- expose privacy-safe microphone capabilities, requested constraints,
and applied settings in card diagnostics
- document the new configuration and add schema, microphone manager, and
diagnostics tests
## Motivation
The card currently calls `getUserMedia()` with `audio: true`. This
leaves echo cancellation, noise suppression, automatic gain control, and
channel count implicit.
Browser and device behavior differs. Explicit processing defaults can
regress microphone gain or amplify noise on some devices. This change
therefore keeps all processing constraints optional and configurable.
## Configuration
```yaml
live:
microphone:
constraints:
echo_cancellation: true
noise_suppression: true
auto_gain_control: false
channel_count: 1
```
Configured values use `ideal` constraints. A browser can ignore
unsupported values. Card diagnostics show the browser capabilities, the
requested constraints, and the reported applied settings.
## Backward compatibility
- existing configurations still use `audio: true`
- no audio-processing defaults are added
- explicit `false` values are preserved
- diagnostic output excludes device and group identifiers
## Validation
- focused microphone, schema, and diagnostics tests: 46 passed
- full test suite: 7,177 passed
- lint passed
- format check passed
- typecheck passed
- unused-code check passed
- production build passed
The optional constraints were also tested successfully with an iOS Home
Assistant Companion client and a go2rtc-based full-duplex intercom. This
is a client microphone-processing change only. It does not add backend
audio denoise.
---------
Co-authored-by: dermotduffy <dermot.duffy@gmail.com>
Getting Started
Installation
-
HACS is highly recommended to install the card -- it works for all Home Assistant variants. If you don't have HACS installed, start there -- then come back to these instructions.
-
Find the card in HACS:
Home Assistant > HACS > Frontend > "Explore & Add Integrations" > Advanced Camera Card
- Click
Download this repository with HACS.
See Advanced Installation for other installation resources, or Rolling Back to rollback to prior versions.
Adding your card
- On a Home Assistant dashboard, choose:
[Three dots menu] > Edit dashboard
- Click
+ Add Cardshown on the bottom of the screen - Choose
Custom: Advanced Camera Cardfrom the list
Initial configuration
Minimal camera configuration
type: custom:advanced-camera-card
cameras:
- camera_entity: camera.office
Minimal folder configuration
type: custom:advanced-camera-card
folders:
- type: ha
Video scrubbing configuration
type: custom:advanced-camera-card
cameras:
- camera_entity: camera.office
profiles:
- scrubbing
Multi-camera grid configuration
type: custom:advanced-camera-card
cameras:
- camera_entity: camera.office
- camera_entity: camera.kitchen
live:
display:
mode: grid
See Configuration for full details on supported configuration options.