1
0
mirror of https://github.com/home-assistant/core.git synced 2025-08-01 17:48:26 +00:00

15 Commits

Author SHA1 Message Date
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
3e62c6ae2f
Move core config functionality to its own module ()
* Move core config functionality to its own module

* Adjust test
2024-10-24 13:34:51 +02:00
epenet
ba54a19d4b
Simplify mock_tts_cache_dir_autouse fixture () 2024-08-13 18:01:06 +02:00
epenet
b13e78f3a3
Use service_calls fixture in microsoft tests () 2024-07-02 12:27:54 +02:00
epenet
fb1b0058ee
Fix consider-using-tuple pylint warnings in component tests ()
* Fix consider-using-tuple pylint warnings in component tests

* Apply su

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-06-12 15:50:27 +02:00
epenet
f178467b0e
Add type hints for TTS test fixtures () 2024-06-03 17:43:18 +02:00
epenet
98d24dd276
Improve typing for calls fixture in tests (m-z) ()
* Improve typing for `calls` fixture in tests (m-z)

* More

* More
2024-05-29 09:30:41 +02:00
J. Nick Koston
8f33bad4ef
Move legacy tts setup to use tracked tasks ()
* Move legacy tts setup to a tracked task

* comment

* fix test

* fix test

* fix more tests

* tweak
2024-03-18 13:11:22 +01:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] () 2024-03-08 14:55:15 +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
c0ffeeca7
c3a3ddcfa4
Standardize spelling of TTS and STT ()
* Standardize spelling of TTS and STT

* Apply suggestions from code review

* Update homeassistant/components/tts/media_source.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:19 -04:00
Dara Adib
e2daffc117
Fix exception handling in Microsoft TTS ()
pycsspeechtts uses the requests library, but Microsoft TTS previously
caught HTTPException from the standard library. This is changed to
catch requests.HTTPError and return `(None, None)` consistent with
other TTS integrations. This will properly raise HomeAssistantError
for display in the frontend.

Follow up to PR  which adds tests for Microsoft TTS.
2023-05-25 11:29:13 +02:00
Dara Adib
663f66a2b2
Scrape Microsoft TTS supported languages ()
* Update Microsoft TTS supported languages

`script.microsoft_tts` scrapes Microsoft Azure documentation for
the list of supported languages and saves them to
`homeassistant.generated.microsoft_tts` for use in the component.

This adds support for more TTS languages, like fa-ir (Persian).

* Improve xpath query for Microsoft TTS languages

* Remove asserts for Microsoft TTS languages

* Add more tests for Microsoft TTS languages
2023-05-25 10:46:34 +02:00
Erik Montnemery
68379dd55a
Improve TTS cache dir mocking () 2023-05-24 21:00:35 +02:00
Dara Adib
3bd6dea63b
Add tests for Microsoft TTS ()
* Add tests for Microsoft TTS

* Update requirements_test_all

* Update tests/components/microsoft/__init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 08:25:03 +02:00