mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
TTS ID3 support (#5773)
* Add support for writing ID3 tags to the file for improved display in media players * Lint and async fixes * Use mutagen instead of taglib * Fix tests * Add fallback for album * Requested changes * move import * Fix album name * Change default options handling * Move to member function / minor fix * fix style * fix lint * change mutagen handling * fix lint / add name to bytesio * Update __init__.py * Fix test, some cleanups * Add mutagen exeption handling, fix tests * fix mutagen taging
This commit is contained in:
committed by
Pascal Vizeli
parent
063c0e8f44
commit
45507cd9d1
@@ -341,6 +341,10 @@ class TestTTS(object):
|
||||
assert len(calls) == 1
|
||||
req = requests.get(calls[0].data[ATTR_MEDIA_CONTENT_ID])
|
||||
_, demo_data = self.demo_provider.get_tts_audio("bla", 'en')
|
||||
demo_data = tts.SpeechManager.write_tags(
|
||||
"265944c108cbb00b2a621be5930513e03a0bb2cd_en_-_demo.mp3",
|
||||
demo_data, self.demo_provider,
|
||||
"I person is on front of your door.", 'en', None)
|
||||
assert req.status_code == 200
|
||||
assert req.content == demo_data
|
||||
|
||||
@@ -351,6 +355,7 @@ class TestTTS(object):
|
||||
config = {
|
||||
tts.DOMAIN: {
|
||||
'platform': 'demo',
|
||||
'language': 'de',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,6 +372,10 @@ class TestTTS(object):
|
||||
assert len(calls) == 1
|
||||
req = requests.get(calls[0].data[ATTR_MEDIA_CONTENT_ID])
|
||||
_, demo_data = self.demo_provider.get_tts_audio("bla", "de")
|
||||
demo_data = tts.SpeechManager.write_tags(
|
||||
"265944c108cbb00b2a621be5930513e03a0bb2cd_de_-_demo.mp3",
|
||||
demo_data, self.demo_provider,
|
||||
"I person is on front of your door.", 'de', None)
|
||||
assert req.status_code == 200
|
||||
assert req.content == demo_data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user