1
0
mirror of https://github.com/home-assistant/core.git synced 2025-05-14 02:49:15 +00:00

104 Commits

Author SHA1 Message Date
Paulus Schoutsen
9293afd95a Ensure legacy TTS providers are hidden if entity exists () 2025-05-01 21:41:29 +00:00
Paulus Schoutsen
5dab9ba01b
Allow streaming text into TTS ResultStream objects ()
Allow streaming messages into TTS ResultStream
2025-04-30 08:21:19 -04:00
Paulus Schoutsen
f980434046
Clean up Text-to-Speech () 2025-04-30 04:29:35 +02:00
Joost Lekkerkerker
dcc63a6f2e
Bump ruff to 0.10.0 ()
* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Update pyproject.toml

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Fix

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2025-03-14 12:32:50 +00:00
Paulus Schoutsen
55895df54d
Switch more TTS core to async generators ()
* Switch more TTS core to async generators

* Document a design choice

* robust

* Add more tests

* Update comment

* Clarify and document TTSCache variables
2025-03-13 13:24:44 -04:00
Paulus Schoutsen
0ba5711603
Add TTS token to TTS-END event () 2025-03-11 17:54:39 +01:00
Paulus Schoutsen
2cce1b024e
Migrate Assist Pipeline to use TTS stream ()
* Migrate Pipeline to use TTS stream

* Fix tests
2025-03-01 21:43:00 +01:00
Paulus Schoutsen
1a80934593
Move TTS entity to own file ()
* Move entity to own file

* Move entity tests
2025-02-28 20:40:13 +01:00
Paulus Schoutsen
70bb56e0fc
Text-to-Speech refactor ()
* Refactor TTS

* More cleanup

* Cleanup

* Consolidate more

* Inline another function

* Inline another function

* Improve cleanup
2025-02-28 12:36:12 -06:00
Erik Montnemery
af0a862aab
Clean up translations for mocked integrations inbetween tests ()
* Clean up translations for mocked integrations inbetween tests

* Adjust code, add test

* Fix docstring

* Improve cleanup, add test

* Fix test
2025-02-19 13:49:31 +01:00
epenet
d0a188b86d
Standardize homeassistant imports in component tests (m-z) () 2025-01-29 08:57:57 +01:00
G Johansson
5a7b6cd7a0
Remove asserting name in tts test (no entity platform) ()
* Ensure entity platform in tts tests

* Correct placement

* Remove name test

* Remove hass
2025-01-18 14:47:53 +01:00
epenet
c4e5b59326
Fix more flaky translation checks () 2024-11-28 13:41:30 +01:00
epenet
d6f4a79b46
Remove workaround for flaky translation tests () 2024-11-27 08:37:36 -06:00
Michael Hansen
d4071e7123
Hide TTS filename behind random token ()
* Hide TTS filename behind random token

* Clean up and fix test snapshots

* Fix tests

* Fix cloud tests
2024-11-24 20:52:21 -05:00
tronikos
4c0fb04f61
Make tts options of type list (such as profiles in google_cloud) work ()
* Allow tts options of type list such as profiles in google_cloud

* Update tests/components/tts/test_media_source.py

* Don't mix engine specific options with other options

* Fix test

* Update assist_pipeline snapshots

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-24 00:07:12 -07:00
Erik Montnemery
cff4e46694
Deduplicate TTS mocks () 2024-08-28 13:48:49 +02:00
Erik Montnemery
ef1d53c207
Include engine name in TTS WS responses () 2024-08-27 11:14:41 +02:00
Erik Montnemery
715f4bd2c3
Set deprecated flag on TTS engines replaced by entities in WS list () 2024-08-27 10:09:49 +02:00
Paulus Schoutsen
156948c496
Fix defaults for cloud STT/TTS ()
* Fix defaults for cloud STT/TTS

* Prefer entity over legacy provider

* Remove unrealistic tests

* Add tests which show cloud stt/tts entity is preferred

---------

Co-authored-by: Erik <erik@montnemery.com>
2024-08-26 19:39:09 +02:00
Erik Montnemery
f4528b288f
Fix overriding name in MockTTSEntity ()
* Fix overriding name in MockTTSEntity

* Fix
2024-08-26 15:28:55 +02:00
Erik Montnemery
cafd953f87
Add test showing we prefer tts entity over legacy tts provider () 2024-08-26 11:10:58 +02:00
epenet
ad26db7dc8
Replace pylint broad-exception-raised rule with ruff () 2024-08-02 12:24:03 +02:00
Sid
e2141dc208
Add _attr class attributes to TextToSpeechEntity () 2024-07-07 16:21:04 +02:00
J. Nick Koston
e8ef2c2822
Fix blocking I/O in tts tests () 2024-07-04 05:21:01 +01:00
epenet
f178467b0e
Add type hints for TTS test fixtures () 2024-06-03 17:43:18 +02:00
epenet
9204ccfa17
Use is in ConfigEntryState enum comparison in tests (N-Z) () 2024-04-05 17:37:00 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ()
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
00ec7f11f0
Enable Ruff rule PT007 ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Erik Montnemery
dd9fdac51e
Remove unused tts fixture () 2024-03-14 22:25:10 -10:00
Joost Lekkerkerker
7ae852e5ed
Enable ISC ruff rule () 2024-03-14 10:43:03 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] () 2024-03-08 19:16:21 +01:00
J. Nick Koston
09b65f14b9
Index entities by domain for entity services () 2024-01-02 15:28:58 +01:00
Jan-Philipp Benecke
fbfe434e8b
Migrate tag & tts tests to use freezegun () 2023-12-11 09:09:23 +01:00
Erik Montnemery
84e74e4c74
Reverse component path ()
* Reverse component path

* Update translations helper

* Fix

* Revert incorrect change of PLATFORM_FORMAT

* Fix use of PLATFORM_FORMAT in tts

* Fix ios
2023-12-05 08:43:58 +01:00
Michael Hansen
ae516ffbb5
Automatically convert TTS audio to MP3 on demand ()
* 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
Erik Montnemery
b254218dd6
Remove base_url configuration option from tts () 2023-06-21 11:20:33 +02:00
Erik Montnemery
334dacc322
Change Entity.name default to UNDEFINED ()
* Change Entity.name default to UNDEFINED

* Update typing

* Update Pylint plugin

* Update TTS test
2023-06-15 11:09:53 +02:00
Erik Montnemery
30d9d7d905
Minor adjustment of tts typing () 2023-05-24 21:02:55 +02:00
Erik Montnemery
68379dd55a
Improve TTS cache dir mocking () 2023-05-24 21:00:35 +02:00
Bram Kragten
75f8ea48f4
Add tts get engine ws command ()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-11 10:51:00 +02:00
Erik Montnemery
792ea92e55
Remove fuzzy language matching from stt and tts ()
* Remove fuzzy language matching from stt and tts

* Update tests
2023-04-25 17:54:42 +02:00
Erik Montnemery
9a0de43f98
Add name to tts voices ()
* Add name to tts voices

* Add new file
2023-04-21 20:41:14 -04:00
Martin Hjelmare
1a18dc7425
Add tts entity ()
* Add tts entity

* Allow passing engine id to url view

* Update async_resolve_engine

* Add and update more tests

* Fix assist pipeline tests temporarily

* Move fixtures

* Update notify platform

* Complete legacy tests

* Update media source tests

* Update async_get_text_to_speech_languages

* Address comment

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-20 22:55:46 -04:00
Erik Montnemery
79de27a4a9
Include matching languages in WS tts/engine/list ()
* Include matching languages in WS tts/engine/list

* Allow specifying country
2023-04-20 08:56:50 -04:00
Erik Montnemery
f3e6d6dfc0
Add async_get_supported_voices to tts.Provider ()
* Add async_get_supported_voices to tts.Provider

* Update WS API
2023-04-19 13:47:49 +02:00
Michael Hansen
f96515b90a
Use language util in stt/tts ()
* Use language util in stt/tts

* Test language util in stt/tts

* Fix common in TTS

* Update snapshot
2023-04-17 23:23:43 -04:00
Erik Montnemery
e32dacc62d
Add WS API to tts ()
* Add WS API to tts

* Use language util, change from entity_id to engine_id

* Fix rebase mistake
2023-04-17 22:52:19 +02:00
Martin Hjelmare
9bd12f6503
Move legacy tts ()
* Move legacy tts

* Add error log on unknown platform

* Add legacy tests and delint all tests

* Consolidate log format

* Add more legacy tests

* Test default legacy provider attributes

* Remove test generated files

* Clean up after merge conflict
2023-04-17 13:01:50 -04:00
epenet
9e1a670e6e
Fail CI on lingering timers (part 2) ()
* Fail CI on lingering timers (part 2)

* Improve error message

* Adjust tts
2023-04-13 17:03:52 +02:00