-
Notifications
You must be signed in to change notification settings - Fork 363
Expand file tree
/
Copy pathtts_lab_with_param_check.json
More file actions
133 lines (133 loc) · 2.6 KB
/
tts_lab_with_param_check.json
File metadata and controls
133 lines (133 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[{
"id": "37db8581.e886ea",
"type": "http in",
"z": "1489cc91.5952e3",
"name": "",
"url": "/talk/sayit",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 160,
"y": 755,
"wires": [
["8c9a4ce4.3d6da", "835ce3ce.b3bf5"]
]
}, {
"id": "8c9a4ce4.3d6da",
"type": "change",
"z": "1489cc91.5952e3",
"name": "Text to Payload",
"rules": [{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.text_to_say",
"tot": "msg"
}],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 373,
"y": 685,
"wires": [
["f6322248.c9834"]
]
}, {
"id": "f6322248.c9834",
"type": "watson-text-to-speech",
"z": "1489cc91.5952e3",
"name": "",
"lang": "en-GB",
"langhidden": "en-GB",
"langcustom": "NoCustomisationSetting",
"langcustomhidden": "",
"voice": "en-GB_KateVoice",
"voicehidden": "",
"format": "audio/wav",
"password": "",
"payload-response": false,
"default-endpoint": true,
"service-endpoint": "https://stream.watsonplatform.net/text-to-speech/api",
"x": 473,
"y": 756,
"wires": [
["c2744b78.56f868"]
]
}, {
"id": "c2744b78.56f868",
"type": "change",
"z": "1489cc91.5952e3",
"name": "Speech to Payload",
"rules": [{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "speech",
"tot": "msg"
}],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 683,
"wires": [
["2dfac931.573136"]
]
}, {
"id": "2dfac931.573136",
"type": "function",
"z": "1489cc91.5952e3",
"name": "Set Headers",
"func": "// Set the content type to audio wave\nmsg.headers = {'Content-Type': 'audio/wav'};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 740,
"y": 756,
"wires": [
["3c9b519b.eaa42e"]
]
}, {
"id": "3c9b519b.eaa42e",
"type": "http response",
"z": "1489cc91.5952e3",
"name": "",
"statusCode": "",
"headers": {},
"x": 927,
"y": 755,
"wires": []
}, {
"id": "66f76d9c.aa4434",
"type": "template",
"z": "1489cc91.5952e3",
"name": "Error",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<h1>Missing text_to_say query param!</h1>",
"output": "str",
"x": 720,
"y": 880,
"wires": [
["3c9b519b.eaa42e"]
]
}, {
"id": "835ce3ce.b3bf5",
"type": "function",
"z": "1489cc91.5952e3",
"name": "Determine whether text_to_say is null",
"func": "if (msg.payload.text_to_say) {\n return [msg, null];\n}\nreturn [null, msg];",
"outputs": 2,
"noerr": 0,
"x": 352,
"y": 875,
"wires": [
["8c9a4ce4.3d6da"],
["66f76d9c.aa4434"]
]
}]