Commit graph

10 commits

Author SHA1 Message Date
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