Commit Graph

36 Commits (460c05dc43b43e42a2a513462c976128dc612928)

Author SHA1 Message Date
Joost Lekkerkerker 2ef0521d3d
Use is in enum comparison in config flow tests U-Z (#114677)
* Use right enum expression U-Z

* Fix
2024-04-02 23:09:56 +02:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
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>
2024-03-26 00:02:16 +01:00
Sid ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 87165c0d6e
Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
Michael Hansen f0deae319e
Use correct service name with Wyoming satellite + local wake word detection (#111870)
* Use correct service name with satellite + local wake word detection

* Don't load platforms for satellite services

* Update homeassistant/components/wyoming/data.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Fix ruff error

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-29 13:09:38 -05:00
Michael Hansen f6622ea8e0
Add speech-to-text cooldown for local wake word (#108806)
* Deconflict based on wake word

* Undo test

* Make wake up key a string, rename error

* Update snapshot

* Change to "wake word phrase" and normalize

* Move normalization into the wake provider

* Working on describe

* Use satellite info to resolve wake word phrase

* Add test for wake word phrase

* Match phrase with model name in wake word provider

* Check model id

* Use one constant wake word cooldown

* Update homeassistant/components/assist_pipeline/error.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Fix wake word tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-26 20:35:19 -05:00
J. Nick Koston d99a7e2825
Fix race in wyoming test (#110766)
reverts #110751 and replaces it with a change to wait for the
assist_pipeline.async_pipeline_from_audio_stream to be called
which will actually solve the problem and unblock #110743
2024-02-17 08:24:21 +01:00
J. Nick Koston 5adb9240c5
Wait for client to be created in wyoming tests (#110751)
* Add missing async_block_till_done in wyoming tests

* better fix

* better fix

* better fix

* better fix
2024-02-16 22:48:47 +01:00
Michael Hansen cffd95a015
Pause Wyoming satellite on mute (#108322)
Pause satellite on mute
2024-01-23 20:37:25 -05:00
Michael Hansen db81f4d046
Wyoming satellite ping and bugfix for local wake word (#108164)
* Refactor with ping

* Fix tests

* Increase test coverage
2024-01-16 15:43:30 -06:00
Michael Hansen aaccf19013
Rename "satellite enabled" to "mute" (#105619) 2023-12-13 09:09:22 +01:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Michael Hansen 80607f7750
Disconnect before reconnecting to satellite (#105500)
Disconnect before reconnecting
2023-12-11 11:18:46 -05:00
Michael Hansen 43daeb2630
Set device id and forward errors to Wyoming satellites (#105266)
* Set device id and forward errors

* Fix tests
2023-12-07 19:44:43 -06:00
Michael Hansen e9f8e7ab50
Add Wyoming satellite audio settings (#105261)
* Add noise suppression level

* Add auto gain and volume multiplier

* Always use mock TTS dir in Wyoming tests

* More tests
2023-12-07 17:02:55 -05:00
Michael Hansen a9381d2590
Add Wyoming satellite (#104759)
* First draft of Wyoming satellite

* Set up homeassistant in tests

* Move satellite

* Add devices with binary sensor and select

* Add more events

* Add satellite enabled switch

* Fix mistake

* Only set up necessary platforms for satellites

* Lots of fixes

* Add tests

* Use config entry id as satellite id

* Initial satellite test

* Add satellite pipeline test

* More tests

* More satellite tests

* Only support single device per config entry

* Address comments

* Make a copy of platforms
2023-12-04 15:13:15 -05:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Michael Hansen ae516ffbb5
Automatically convert TTS audio to MP3 on demand (#102814)
* Add ATTR_PREFERRED_FORMAT to TTS for auto-converting audio

* Move conversion into SpeechManager

* Handle None case for expected_extension

* Only use ATTR_AUDIO_OUTPUT

* Prefer MP3 in pipelines

* Automatically convert to mp3 on demand

* Add preferred audio format

* Break out preferred format

* Add ATTR_BLOCKING to allow async fetching

* Make a copy of supported options

* Fix MaryTTS tests

* Update ESPHome to use "wav" instead of "raw"

* Clean up tests, remove blocking

* Clean up rest of TTS tests

* Fix ESPHome tests

* More test coverage
2023-11-06 15:26:00 -05:00
Michael Hansen 257686fcfe
Dynamic wake word loading for Wyoming (#101827)
* Change supported_wake_words property to async method

* Add test

* Add timeout + test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-10-11 10:21:32 -07:00
Michael Hansen af8367a8c6
Send Wyoming Detect message during wake word detection (#100968)
* Send Detect message with desired wake word

* Add tests

* Fix test
2023-09-26 19:24:02 -05:00
Erik Montnemery 734c4e8e32
Rename WakeWord.ww_id to WakeWord.id (#100903)
* Rename WakeWord.ww_id to WakeWord.wake_word_id

* Revert unrelated changes

* Rename to id

* Correct rebase
2023-09-26 19:12:16 +02:00
Erik Montnemery d76c5ed351
Use wake word settings in assist pipeline runs (#100864) 2023-09-25 12:58:10 -04:00
Michael Hansen 7ea2998b55
Add wake word integration (#96380)
* Add wake component

* Add wake support to Wyoming

* Add helper function to assist_pipeline (not complete)

* Rename wake to wake_word

* Fix platform

* Use send_event and clean up

* Merge wake word into pipeline

* Add wake option to async_pipeline_from_audio_stream

* Add start/end stages to async_pipeline_from_audio_stream

* Add wake timeout

* Remove layer in wake_output

* Use VAD for wake word timeout

* Include audio metadata in wake-start

* Remove unnecessary websocket command

* wake -> wake_word

* Incorporate feedback

* Clean up wake_word tests

* Add wyoming wake word tests

* Add pipeline wake word test

* Add last processed state

* Fix tests

* Add tests for wake word

* More tests for the codebot
2023-08-07 22:22:16 -04:00
Michael Hansen 8ad37d7640
Send language to Wyoming STT (#97344) 2023-08-01 10:05:01 +02:00
Michael Hansen afdded58ee
Wyoming Piper 1.1 (#96490)
* Add voice/speaker options to Piper TTS

* Use description if available

* Fix tests

* Clean up if
2023-07-14 08:56:27 -04:00
Erik Montnemery 68379dd55a
Improve TTS cache dir mocking (#93468) 2023-05-24 21:00:35 +02:00
Franck Nijhof ac21f69ad0
Add add-on discovery URL and title to Wyoming integration (#92129) 2023-04-27 19:51:26 +02:00
Franck Nijhof 565b26e884
Fix tts add-on discovery for Wyoming (#92064) 2023-04-26 08:04:46 -05:00
Erik Montnemery 64cbc91697
Use addon uuid as wyoming config entry unique id (#92008) 2023-04-25 21:04:11 +02:00
Erik Montnemery 792ea92e55
Remove fuzzy language matching from stt and tts (#92002)
* Remove fuzzy language matching from stt and tts

* Update tests
2023-04-25 17:54:42 +02:00
Erik Montnemery 63f3767a29
Include UUID in hassio discovery data (#91970) 2023-04-25 09:48:47 +02:00
Paulus Schoutsen a203149133
Allow entity names for STT entities (#91932)
* Allow entity names for STT entities

* Fix tests
2023-04-23 23:06:34 -04:00
Michael Hansen b6f2b29a99
Wyoming tts (#91712)
* Add tts entity

* Add tts entity and tests

* Re-add name to TextToSpeechEntity

* Fix linting

* Fix ruff linting

* Support voice attr (unused)

* Remove async_get_text_to_speech_entity

* Move name property to Wyoming TTS entity

* Fix id

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-23 13:06:56 -05:00
Franck Nijhof fd3aa5338c
Add Supervisor add-on discovery to Wyoming integration (#91761) 2023-04-20 20:38:39 +02:00
Michael Hansen 85d57a046c
Add wyoming integration with stt (#91579)
* Add wyoming integration with stt/tts

* Forward config entry setup

* Use SpeechToTextEntity

* Add strings to config flow

* Move connection into config flow

* Add tests

* On load/unload used platforms

* Tweaks

* Add unload test

* Fix stt

* Add missing file

* Add test for no services

* Improve coverage

* Finish test coverage

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-19 06:10:59 -04:00