* Improve Voip pipeline stability
It appears the pipeline is being unexpectedly cancelled in some
instances. In order to mitigate this issue hang ups will be detected
using a separate task rather than relying on timeouts in the STT read
method. Also reading STT events will be retried once if it is cancelled.
The pipeline will also catch and log any CancelledErrors to help with
further debugging.
* Update Voip tests
* Remove unnecessary changes
Remove unnecessary logging and cancelled error handling in wyoming STT.
* Remove comment about clearing system prompt
The test no longer checks for clearing the system prompt. Since that
logic exists completely in the assist_satellite component I think it is
reasonable to only test that logic in the unit tests for that component.
* Re-raise cancellation
Re-raise CancelledError if the current task is cancelling in the check hangup task
Co-authored-by: J. Nick Koston <nick@koston.org>
* Re-raise CancelledError in pipeline as well
* Fix formatting issue
* Remove unnecessary logging
* Add MockResultStream import to tests
This was presumably missed while merging
* Cancel check hangup task on disconnect
* Add myself as codeowner for VoIP
* Update CODEOWNERS
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Allow specifying SIP username for outgoing calls
Allow configuring a SIP username to be sent in outgoing call requests to
identify the home assistant source endpoint.
* Remove advanced options section
* Add test for removing user
* Allow unsetting SIP user
Make previous SIP user value a suggested value rather than default to
allow unsetting by submitting an empty value in the form.
* Remove unnecessary checks
Remove user check from main flow and remove none or empty check.
* Clear extra system prompt on start_conversation error
* Update homeassistant/components/assist_satellite/entity.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add start_conversation service to Assist Satellite
* Fix tests
* Implement start_conversation in voip
* Update homeassistant/components/assist_satellite/entity.py
---------
Co-authored-by: Michael Hansen <mike@rhasspy.org>
* Use SIP URI for VoIP device identifier
Use the SIP URI instead of just host/IP address to identify VoIP
devices. This will allow calls initiating from Home Assistant to the
device as well as allows devices connecting through a PBX to be uniquely
identified.
* Add tests
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Force root import of references from other components
* Improve
* Adjust
* Tweak exceptions
* Another
* Another
* Another
* Another
* Another
* Another
* Another
* Another
* Another
* Another
* Another
* Another
* Adjust
* More
* Ignore violations in test
* Improve
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use webrtc-noise-gain instead of webrtcvad package
* Switching to ProcessedAudioChunk
* Refactor VAD and fix tests
* Add vad no chunking test
* Add test that runs audio enhancements
* Change to "finished speaking detection"
* Add select entity to ESPHome for finished speaking detection
* Fix entity name
* Use vad select in stt stream
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add VAD sensitivity option to VoIP devices
* Use select entitiy for VAD sensitivity
* Add sensitivity to tests
* Add to assist pipeline tests
* Update homeassistant/components/assist_pipeline/select.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Update tests/components/voip/test_voip.py
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>