[
    {
        "id": "ed5c22be.f24b8",
        "type": "tab",
        "label": "样例:百度TTS萤石摄像头播放",
        "disabled": false,
        "info": ""
    },
    {
        "id": "e295bd00.6875f",
        "type": "function",
        "z": "ed5c22be.f24b8",
        "name": "萤石appkey&appsecret",
        "func": "msg.headers={\n         'Content-Type':'application/x-www-form-urlencoded',\n}\nmsg.payload={\n    "appKey":"此处填写你的萤石云账号信息",\n    "appSecret":"此处填写你的萤石云账号信息"\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 390,
        "y": 120,
        "wires": [
            [
                "b6de2172.7894"
            ]
        ]
    },
    {
        "id": "b6de2172.7894",
        "type": "http request",
        "z": "ed5c22be.f24b8",
        "name": "",
        "method": "POST",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "https://open.ys7.com/api/lapp/token/get",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 620,
        "y": 120,
        "wires": [
            [
                "ada5c087.d9e7d"
            ]
        ]
    },
    {
        "id": "58b8501a.8f147",
        "type": "inject",
        "z": "ed5c22be.f24b8",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "00 02 * * 1",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 200,
        "y": 120,
        "wires": [
            [
                "e295bd00.6875f"
            ]
        ]
    },
    {
        "id": "ada5c087.d9e7d",
        "type": "change",
        "z": "ed5c22be.f24b8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "萤石token",
                "pt": "global",
                "to": "payload.data.accessToken",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 820,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "id": "ca58bc7e.c053c",
        "type": "baidu-tts",
        "z": "ed5c22be.f24b8",
        "server": "b7a5e998.62a508",
        "data": "",
        "spd": "5",
        "pit": "6",
        "vol": "13",
        "per": "0",
        "path": "",
        "x": 380,
        "y": 260,
        "wires": [
            [
                "57c2029.6a274fc"
            ]
        ]
    },
    {
        "id": "db13457a.010148",
        "type": "inject",
        "z": "ed5c22be.f24b8",
        "name": "输入TTS的文字",
        "props": [
            {
                "p": "data",
                "v": "谁人笑我太疯癫。此处填写想要TTS的文字",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "str",
        "x": 200,
        "y": 260,
        "wires": [
            [
                "ca58bc7e.c053c"
            ]
        ]
    },
    {
        "id": "57c2029.6a274fc",
        "type": "function",
        "z": "ed5c22be.f24b8",
        "name": "整理数据",
        "func": "msg.token=global.get('萤石token')\n\nmsg.headers = {}\nmsg.method = "POST"\nmsg.url = "https://open.ys7.com/api/lapp/voice/sendonce" ;\nmsg.headers["content-type"] = "multipart/form-data";\n\n\nmsg.payload  = {\n    accessToken: `${msg.token}`,\n    deviceSerial:'此处填写你的摄像头序列号',\n    voiceFile: {\n        value: msg.result.data,\n        options: {\n            filename: 'tts.mp3',\n        },\n    },\n};\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 580,
        "y": 260,
        "wires": [
            [
                "fa1e4c48.e86e"
            ]
        ]
    },
    {
        "id": "fa1e4c48.e86e",
        "type": "http request",
        "z": "ed5c22be.f24b8",
        "name": "摄像头播放",
        "method": "use",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "https://open.ys7.com/api/lapp/voice/sendonce",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 730,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "e5c3f635.5e07b8",
        "type": "comment",
        "z": "ed5c22be.f24b8",
        "name": "获取萤石云token",
        "info": "",
        "x": 360,
        "y": 80,
        "wires": []
    },
    {
        "id": "1204021c.a16b5e",
        "type": "comment",
        "z": "ed5c22be.f24b8",
        "name": "百度云tts萤石摄像头播放",
        "info": "",
        "x": 420,
        "y": 220,
        "wires": []
    },
    {
        "id": "b7a5e998.62a508",
        "type": "baidu-tts-server",
        "z": "",
        "name": "百度TTS配置样例",
        "appID": "此处填写你的百度云appID",
        "apiKey": "此处填写你的百度云API Key",
        "secretKey": "此处填写你的百度云Secret Key"
    }
]