Commit Graph
15 Commits
Author SHA1 Message Date
aryanhasgithub 4ee7bb04bc Add support for WebRTC Auto Gain and Noise Suppression (#250)
## WebRTC Auto Gain & Noise Suppression
 
This PR adds support for WebRTC Auto Gain and Noise Suppression as previously implemented in the Wyoming Satellite project.
 
### What's New
 
Two new entities have been created a number slider for gain and another one for noise suppression. The processing happens inside of the `webrtc.py` file and is implemented in the `__main__.py` file's `process_audio` function. The slider for gain has a limit of 0-31 and noise suppression has a limit of 0-4.
 
The Auto Gain and Noise Suppression persist through restarts and are saved as preferences. The values are dynamically chnged without needing a restart.
 
CLI flags called `--mic-auto-gain` and `--mic-noise-suppression` have also been added.
 
>  When both values are 0, WebRTC processing is bypassed entirely with no performance overhead.

Closes #25 
 
### Testing
 
When saving the audio recorded by LVA there is a noticeable increase. The following two files have been recorded with similar audio being played through them with these results (Gain-31 and NS-4):
 
| Metric | With AGC+NS | Without |
|---|---|---|
| Max amplitude | 0.329 | 0.054 |
| RMS amplitude | 0.008905 | 0.002862 |
| Volume adjustment needed | 3.034x | 13.479x |
| Rough frequency | 916 Hz | 705 Hz |
2026-04-09 00:43:11 +02:00
Florian Asche 1fc29241b4 Add linting scripts and pipeline (#201)
* Add linting scripts and pipeline
2026-03-05 01:58:39 +01:00
Florian Asche 80e0d6254e Fix: Suppress spurious end-file event when starting playback and tts.speak (#179)
* bugfix: supress first end of file event and only callback on second one
* add some notes on testing
* fixed tts.speak
* fix unduck after timer end
* use custom docker-entrypoint on dev container
* change mv to copy in the docs when using .env file
2026-02-26 01:31:18 +01:00
Omar Amin c4e444f8ca Refactor volume setting and add persistence
Refactor volume handling to use _apply_volume method and persist volume settings if server state is available.
2026-02-22 00:50:17 +02:00
Omar Amin 0d34e67823 Enhance volume management in entity.py
Added initial volume parameter and volume control methods.
2026-02-21 16:26:13 +02:00
Omar Amin 72dfc6db35 Merge branch 'main' into issue_128 2026-02-10 20:39:06 +02:00
Philipp Grafe 72c7d4dff4 media_player: handle STOP command correctly (fixes #128)
Home Assistant sends MEDIA_PLAYER_COMMAND_STOP when the queue is cleared.
The MediaPlayer entity did not handle this command, causing playback to
continue without media metadata and leaving the UI in an inconsistent state.

This change adds explicit handling for the STOP command:
- stop playback via the music player
- reset the media player state to IDLE

This aligns the behavior with the original player and Home Assistant’s
expected media player semantics.
2026-02-10 18:58:55 +01:00
Jamin Hitchcock 4b7242a1d3 Fix some format and linting issues 2026-02-02 04:15:17 +00:00
Omar Amin 0330fe4e62 Add media player command 2026-01-27 21:52:48 +02:00
Omar Amin 22ea0fa20b Fix the mute method 2026-01-27 18:55:36 +02:00
Omar Amin 6227cd7669 Update entity.py 2026-01-21 01:28:20 +02:00
Omar Amin e119ef0330 Fix the media player mute switch 2026-01-21 00:56:11 +02:00
Omar Amin d5f902ae77 Add mute switch functionality 2026-01-20 23:51:20 +02:00
Omar Amin f81a119239 Add thinking sound switch 2025-11-05 16:23:25 +02:00
Michael Hansen 4356633ed6 Rename to Linux Voice Assistant 2025-08-26 09:30:58 -05:00