jbjares2

Untitled

Jun 26th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.95 KB | None | 0 0
  1. [
  2. {
  3. "id": "fa4cfdc2.4bd3d",
  4. "type": "watson-speech-to-text",
  5. "z": "905b855.cdcd578",
  6. "name": "speechToTextBot",
  7. "continuous": true,
  8. "speakerlabels": false,
  9. "lang": "pt-BR",
  10. "langhidden": "pt-BR",
  11. "langcustom": "NoCustomisationSetting",
  12. "langcustomhidden": "",
  13. "band": "BroadbandModel",
  14. "bandhidden": "BroadbandModel",
  15. "password": "",
  16. "x": 721.2221965789795,
  17. "y": 126.66666412353516,
  18. "wires": [
  19. [
  20. "824d0c88.85e69"
  21. ]
  22. ]
  23. },
  24. {
  25. "id": "ca11512d.4de1b",
  26. "type": "http request",
  27. "z": "905b855.cdcd578",
  28. "name": "",
  29. "method": "GET",
  30. "ret": "txt",
  31. "url": "https://api.telegram.org/bot/getFile?file_id={{url}}",
  32. "tls": "",
  33. "x": 246.7777614593506,
  34. "y": 124.55557060241699,
  35. "wires": [
  36. [
  37. "634b908f.b4b5a"
  38. ]
  39. ]
  40. },
  41. {
  42. "id": "3793e1b0.4df95e",
  43. "type": "function",
  44. "z": "905b855.cdcd578",
  45. "name": "Prepare To Transcription",
  46. "func": "if(msg.transcription!=null){\n console.log(msg.transcription);\n}\nmsg.payload = msg.transcription;\nreturn msg;",
  47. "outputs": 1,
  48. "noerr": 0,
  49. "x": 161.55555725097656,
  50. "y": 210,
  51. "wires": [
  52. [
  53. "863ed48e.0af648",
  54. "9a643186.917b4"
  55. ]
  56. ]
  57. },
  58. {
  59. "id": "1555b155.8d5d6f",
  60. "type": "debug",
  61. "z": "905b855.cdcd578",
  62. "name": "",
  63. "active": true,
  64. "console": "true",
  65. "complete": "true",
  66. "x": 813.6666717529297,
  67. "y": 465.4444580078125,
  68. "wires": []
  69. },
  70. {
  71. "id": "7af5fa42.0ca6a4",
  72. "type": "link in",
  73. "z": "905b855.cdcd578",
  74. "name": "Voice Input Flow",
  75. "links": [
  76. "fee85b54.5ff138"
  77. ],
  78. "x": 20,
  79. "y": 126.22222709655762,
  80. "wires": [
  81. [
  82. "cc03d98.9f37628"
  83. ]
  84. ]
  85. },
  86. {
  87. "id": "9e5a47b8.2f6588",
  88. "type": "function",
  89. "z": "905b855.cdcd578",
  90. "name": "",
  91. "func": "\nmsg.path = msg.payload.result.file_path;\nmsg.payload = \"https://api.telegram.org/file/botxxx/voice/\"+msg.path.substring(6, msg.path.length);\nreturn msg;",
  92. "outputs": "1",
  93. "noerr": 0,
  94. "x": 544.7777729034424,
  95. "y": 127.66668510437012,
  96. "wires": [
  97. [
  98. "fa4cfdc2.4bd3d"
  99. ]
  100. ]
  101. },
  102. {
  103. "id": "634b908f.b4b5a",
  104. "type": "json",
  105. "z": "905b855.cdcd578",
  106. "name": "",
  107. "x": 400.7777919769287,
  108. "y": 124.55557441711426,
  109. "wires": [
  110. [
  111. "9e5a47b8.2f6588"
  112. ]
  113. ]
  114. },
  115. {
  116. "id": "824d0c88.85e69",
  117. "type": "link out",
  118. "z": "905b855.cdcd578",
  119. "name": "Speech to Text OutPut",
  120. "links": [
  121. "8a2c4520.61a2c8"
  122. ],
  123. "x": 887.0000171661377,
  124. "y": 124.66668891906738,
  125. "wires": []
  126. },
  127. {
  128. "id": "8a2c4520.61a2c8",
  129. "type": "link in",
  130. "z": "905b855.cdcd578",
  131. "name": "Prepare Transcription IN",
  132. "links": [
  133. "824d0c88.85e69"
  134. ],
  135. "x": 21.44444751739502,
  136. "y": 210.66668128967285,
  137. "wires": [
  138. [
  139. "3793e1b0.4df95e"
  140. ]
  141. ]
  142. },
  143. {
  144. "id": "5909b767.ed4d98",
  145. "type": "watson-text-to-speech",
  146. "z": "905b855.cdcd578",
  147. "name": "",
  148. "lang": "pt-BR",
  149. "langhidden": "pt-BR",
  150. "langcustom": "NoCustomisationSetting",
  151. "langcustomhidden": "",
  152. "voice": "pt-BR_IsabelaVoice",
  153. "voicehidden": "",
  154. "format": "audio/ogg; codecs=opus",
  155. "password": "",
  156. "x": 168.6666717529297,
  157. "y": 469.4444580078125,
  158. "wires": [
  159. [
  160. "a6c3ca48.1af9a8"
  161. ]
  162. ]
  163. },
  164. {
  165. "id": "5e67bec8.594c4",
  166. "type": "function",
  167. "z": "905b855.cdcd578",
  168. "name": "Prepare To Reply",
  169. "func": "if(msg.payload.output.text[0]!=null){\n console.log(msg.payload.output.text[0]);\n}\nmsg.payload = msg.payload.output.text[0];\nreturn msg;",
  170. "outputs": 1,
  171. "noerr": 0,
  172. "x": 178.66668701171875,
  173. "y": 359.888916015625,
  174. "wires": [
  175. [
  176. "6196d7dd.737818"
  177. ]
  178. ]
  179. },
  180. {
  181. "id": "da3d335d.4ba5d",
  182. "type": "telegram sender",
  183. "z": "905b855.cdcd578",
  184. "name": "",
  185. "bot": "d809bdf6.6eed1",
  186. "x": 614.0000076293945,
  187. "y": 467.2222270965576,
  188. "wires": [
  189. [
  190. "1555b155.8d5d6f"
  191. ]
  192. ]
  193. },
  194. {
  195. "id": "6196d7dd.737818",
  196. "type": "link out",
  197. "z": "905b855.cdcd578",
  198. "name": "PrepareToReplyOut",
  199. "links": [
  200. "2657354b.1b00ba"
  201. ],
  202. "x": 364.22222900390625,
  203. "y": 358.77777099609375,
  204. "wires": []
  205. },
  206. {
  207. "id": "2657354b.1b00ba",
  208. "type": "link in",
  209. "z": "905b855.cdcd578",
  210. "name": "Text to Speech In",
  211. "links": [
  212. "6196d7dd.737818"
  213. ],
  214. "x": 41.66667175292969,
  215. "y": 471.4444580078125,
  216. "wires": [
  217. [
  218. "5909b767.ed4d98"
  219. ]
  220. ]
  221. },
  222. {
  223. "id": "a6c3ca48.1af9a8",
  224. "type": "function",
  225. "z": "905b855.cdcd578",
  226. "name": "Prepare To Sender",
  227. "func": "msg.additional_context.telegram.msg_payload_original.content = msg.speech;\nmsg.payload = msg.additional_context.telegram.msg_payload_original;\nreturn msg;",
  228. "outputs": "1",
  229. "noerr": 0,
  230. "x": 388.77777099609375,
  231. "y": 469.7778034210205,
  232. "wires": [
  233. [
  234. "da3d335d.4ba5d",
  235. "1595dc20.ebab84"
  236. ]
  237. ]
  238. },
  239. {
  240. "id": "cc03d98.9f37628",
  241. "type": "function",
  242. "z": "905b855.cdcd578",
  243. "name": "",
  244. "func": "msg.url = msg.originalMessage.voice.file_id;\nreturn msg;",
  245. "outputs": 1,
  246. "noerr": 0,
  247. "x": 103.99999809265137,
  248. "y": 125.33332824707031,
  249. "wires": [
  250. [
  251. "ca11512d.4de1b"
  252. ]
  253. ]
  254. },
  255. {
  256. "id": "2096aff5.c55",
  257. "type": "function",
  258. "z": "905b855.cdcd578",
  259. "name": "Save History",
  260. "func": "msg.payload.context = {context: msg.payload.context, step:1, id:msg.payload.context.conversation_id,msgId:msg._msgid,intent:msg.payload.intent,confidence:msg.payload.intents[0].confidence,input:msg.payload.input.text,output:msg.payload.output.text[0]}\nreturn msg;",
  261. "outputs": 1,
  262. "noerr": 0,
  263. "x": 549.5,
  264. "y": 283,
  265. "wires": [
  266. [
  267. "371c731a.c085ac"
  268. ]
  269. ]
  270. },
  271. {
  272. "id": "371c731a.c085ac",
  273. "type": "cloudant out",
  274. "z": "905b855.cdcd578",
  275. "name": "",
  276. "cloudant": "",
  277. "database": "history",
  278. "service": "",
  279. "payonly": false,
  280. "operation": "insert",
  281. "x": 783.5,
  282. "y": 279,
  283. "wires": []
  284. },
  285. {
  286. "id": "e3b231ea.9584a",
  287. "type": "debug",
  288. "z": "905b855.cdcd578",
  289. "name": "",
  290. "active": true,
  291. "console": "true",
  292. "complete": "true",
  293. "x": 583.5,
  294. "y": 207,
  295. "wires": []
  296. },
  297. {
  298. "id": "863ed48e.0af648",
  299. "type": "watson-conversation-v1",
  300. "z": "905b855.cdcd578",
  301. "name": "",
  302. "workspaceid": "",
  303. "multiuser": false,
  304. "context": true,
  305. "x": 391.5,
  306. "y": 214,
  307. "wires": [
  308. [
  309. "5e67bec8.594c4",
  310. "e3b231ea.9584a"
  311. ]
  312. ]
  313. },
  314. {
  315. "id": "9a643186.917b4",
  316. "type": "debug",
  317. "z": "905b855.cdcd578",
  318. "name": "",
  319. "active": true,
  320. "console": "true",
  321. "complete": "true",
  322. "x": 356.5,
  323. "y": 172,
  324. "wires": []
  325. },
  326. {
  327. "id": "1595dc20.ebab84",
  328. "type": "debug",
  329. "z": "905b855.cdcd578",
  330. "name": "",
  331. "active": true,
  332. "console": "true",
  333. "complete": "true",
  334. "x": 538.5,
  335. "y": 382,
  336. "wires": []
  337. },
  338. {
  339. "id": "d809bdf6.6eed1",
  340. "type": "telegram bot",
  341. "z": 0,
  342. "botname": "botman",
  343. "usernames": "",
  344. "chatids": ""
  345. }
  346. ]
Advertisement
Add Comment
Please, Sign In to add comment