Só funciona no echo dot 3
Solução para quem quer a Alexa a falar tts em português de portugal com o amazon polly e o node-red
No ficheiro configuration.yaml
tts:
- platform: google_translate
language: 'pt'
- platform: amazon_polly
aws_access_key_id: xxxxxxxxxxxxxxx
aws_secret_access_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
region_name: eu-west-2
text_type: ssml
voice: Cristiano
Segue o floow para o fazerem com duas opções diferentes , é so alterar a entidade da vossa Alexa,
[
{
"id": "b3a0d93f.4cf13",
"type": "tab",
"label": "Flow 6",
"disabled": false,
"info": ""
},
{
"id": "9c0bce35.c0592",
"type": "api-call-service",
"z": "b3a0d93f.4cf13",
"name": "porta despensa",
"server": "5017a1ba.3741d8",
"version": 1,
"debugenabled": false,
"service_domain": "notify",
"service": "alexa_media",
"entityId": "",
"data": "{\"data\":{\"type\":\"announce\",\"method\":\"speak\"},\"message\":\"<voice name='Cristiano'><lang xml:lang='pt-PT'><amazon:auto-breaths frequency='high' volume='soft' duration='x-short'> A porta da despensa está aberta </amazon:auto-breaths></lang></voice>\",\"target\":[\"media_player.alexa_sala\",\"media_player.alexa_cozinha\"]}",
"dataType": "json",
"mergecontext": "",
"output_location": "payload",
"output_location_type": "msg",
"mustacheAltTags": false,
"x": 620,
"y": 200,
"wires": [
[]
]
},
{
"id": "6d770101.767bd8",
"type": "inject",
"z": "b3a0d93f.4cf13",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 420,
"y": 200,
"wires": [
[
"9c0bce35.c0592"
]
]
},
{
"id": "6b142c17.c0d924",
"type": "api-call-service",
"z": "b3a0d93f.4cf13",
"name": "porta entrada aberta",
"server": "5017a1ba.3741d8",
"version": 1,
"debugenabled": false,
"service_domain": "notify",
"service": "alexa_media",
"entityId": "",
"data": "{\"data\":{\"type\":\"announce\",\"method\":\"all\"},\"title\":\"aviso porta entrada aberta\",\"message\":\"<voice name='Cristiano'>a porta da entrada está aberta </voice>\",\"target\":[\"media_player.alexa_sala\"]}",
"dataType": "json",
"mergecontext": "",
"output_location": "payload",
"output_location_type": "msg",
"mustacheAltTags": false,
"x": 620,
"y": 280,
"wires": [
[]
]
},
{
"id": "344a57da.8df5c",
"type": "inject",
"z": "b3a0d93f.4cf13",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 420,
"y": 280,
"wires": [
[
"6b142c17.c0d924"
]
]
},
{
"id": "5017a1ba.3741d8",
"type": "server",
"z": "",
"name": "Hassio",
"legacy": false,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
}
]