|
发表于 2021-11-20 21:18:36
|
显示全部楼层
[
{
"id": "f475c700356aa16a",
"type": "http-send-multipart-form-v3",
"z": "557fd105.fe3338",
"name": "摄像头播放",
"filetype": "binary",
"formparts": "",
"ret": "txt",
"url": "https://open.ys7.com/api/lapp/voice/sendonce",
"tls": "",
"sendrequest": false,
"x": 2770,
"y": 980,
"wires": [
[]
]
},
{
"id": "84920f544da93720",
"type": "function",
"z": "557fd105.fe3338",
"name": "整理数据",
"func": "msg.token=global.get('萤石token')\nmsg.payload = {\n file: {\n field: 'voiceFile',\n data: msg.data,\n type: 'binary',\n name: 'tts'\n },\n formOptions: {\n accessToken: `${msg.token}`,\n deviceSerial:'135345203',\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2580,
"y": 980,
"wires": [
[
"f475c700356aa16a"
]
]
},
{
"id": "2306085ccc1f3679",
"type": "api-call-service",
"z": "557fd105.fe3338",
"name": "edge tts",
"server": "d06297cb.c4f038",
"version": 3,
"debugenabled": false,
"service_domain": "tts",
"service": "edge_tts_say",
"entityId": "media_player.xxxx",
"data": "",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [
{
"property": "data",
"propertyType": "msg",
"value": "你好啊",
"valueType": "str"
}
],
"queue": "none",
"x": 2380,
"y": 980,
"wires": [
[
"84920f544da93720"
]
]
},
{
"id": "ece6e9261b958a42",
"type": "function",
"z": "557fd105.fe3338",
"name": "TTS内容",
"func": "var message = `主人您好,欢迎您回家。`;\nmsg.payload = {};\nmsg.payload.data = {\"message\":message};\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2200,
"y": 980,
"wires": [
[
"2306085ccc1f3679"
]
]
},
{
"id": "0e088915f8025859",
"type": "inject",
"z": "557fd105.fe3338",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 2040,
"y": 980,
"wires": [
[
"ece6e9261b958a42"
]
]
},
{
"id": "d06297cb.c4f038",
"type": "server",
"name": "Home Assistant",
"version": 2,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
}
]
我写成这样就不知道后面怎么弄了,您能帮我看看么 |
|