mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Migrate tts services to support translations (#96412)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
7021daf9fb
commit
021aaa9994
@ -1,88 +1,58 @@
|
||||
# Describes the format for available TTS services
|
||||
|
||||
say:
|
||||
name: Say a TTS message
|
||||
description: Say something using text-to-speech on a media player.
|
||||
fields:
|
||||
entity_id:
|
||||
name: Entity
|
||||
description: Name(s) of media player entities.
|
||||
required: true
|
||||
selector:
|
||||
entity:
|
||||
domain: media_player
|
||||
message:
|
||||
name: Message
|
||||
description: Text to speak on devices.
|
||||
example: "My name is hanna"
|
||||
required: true
|
||||
selector:
|
||||
text:
|
||||
cache:
|
||||
name: Cache
|
||||
description: Control file cache of this message.
|
||||
default: false
|
||||
selector:
|
||||
boolean:
|
||||
language:
|
||||
name: Language
|
||||
description: Language to use for speech generation.
|
||||
example: "ru"
|
||||
selector:
|
||||
text:
|
||||
options:
|
||||
name: Options
|
||||
description:
|
||||
A dictionary containing platform-specific options. Optional depending on
|
||||
the platform.
|
||||
advanced: true
|
||||
example: platform specific
|
||||
selector:
|
||||
object:
|
||||
|
||||
speak:
|
||||
name: Speak
|
||||
description: Speak something using text-to-speech on a media player.
|
||||
target:
|
||||
entity:
|
||||
domain: tts
|
||||
fields:
|
||||
media_player_entity_id:
|
||||
name: Media Player Entity
|
||||
description: Name(s) of media player entities.
|
||||
required: true
|
||||
selector:
|
||||
entity:
|
||||
domain: media_player
|
||||
message:
|
||||
name: Message
|
||||
description: Text to speak on devices.
|
||||
example: "My name is hanna"
|
||||
required: true
|
||||
selector:
|
||||
text:
|
||||
cache:
|
||||
name: Cache
|
||||
description: Control file cache of this message.
|
||||
default: true
|
||||
selector:
|
||||
boolean:
|
||||
language:
|
||||
name: Language
|
||||
description: Language to use for speech generation.
|
||||
example: "ru"
|
||||
selector:
|
||||
text:
|
||||
options:
|
||||
name: Options
|
||||
description:
|
||||
A dictionary containing platform-specific options. Optional depending on
|
||||
the platform.
|
||||
advanced: true
|
||||
example: platform specific
|
||||
selector:
|
||||
object:
|
||||
|
||||
clear_cache:
|
||||
name: Clear TTS cache
|
||||
description: Remove all text-to-speech cache files and RAM cache.
|
||||
|
60
homeassistant/components/tts/strings.json
Normal file
60
homeassistant/components/tts/strings.json
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"services": {
|
||||
"say": {
|
||||
"name": "Say a TTS message",
|
||||
"description": "Says something using text-to-speech on a media player.",
|
||||
"fields": {
|
||||
"entity_id": {
|
||||
"name": "Entity",
|
||||
"description": "Media players to play the message."
|
||||
},
|
||||
"message": {
|
||||
"name": "Message",
|
||||
"description": "The text you want to convert into speech so that you can listen to it on your device."
|
||||
},
|
||||
"cache": {
|
||||
"name": "Cache",
|
||||
"description": "Stores this message locally so that when the text is requested again, the output can be produced more quickly."
|
||||
},
|
||||
"language": {
|
||||
"name": "Language",
|
||||
"description": "Language to use for speech generation."
|
||||
},
|
||||
"options": {
|
||||
"name": "Options",
|
||||
"description": "A dictionary containing integration-specific options."
|
||||
}
|
||||
}
|
||||
},
|
||||
"speak": {
|
||||
"name": "Speak",
|
||||
"description": "Speaks something using text-to-speech on a media player.",
|
||||
"fields": {
|
||||
"media_player_entity_id": {
|
||||
"name": "Media player entity",
|
||||
"description": "Media players to play the message."
|
||||
},
|
||||
"message": {
|
||||
"name": "[%key:component::tts::services::say::fields::message::name%]",
|
||||
"description": "[%key:component::tts::services::say::fields::message::description%]"
|
||||
},
|
||||
"cache": {
|
||||
"name": "[%key:component::tts::services::say::fields::cache::name%]",
|
||||
"description": "[%key:component::tts::services::say::fields::cache::description%]"
|
||||
},
|
||||
"language": {
|
||||
"name": "[%key:component::tts::services::say::fields::language::name%]",
|
||||
"description": "[%key:component::tts::services::say::fields::language::description%]"
|
||||
},
|
||||
"options": {
|
||||
"name": "[%key:component::tts::services::say::fields::options::name%]",
|
||||
"description": "[%key:component::tts::services::say::fields::options::description%]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"clear_cache": {
|
||||
"name": "Clear TTS cache",
|
||||
"description": "Removes all cached text-to-speech files and purges the memory."
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user