Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "fa4cfdc2.4bd3d",
- "type": "watson-speech-to-text",
- "z": "905b855.cdcd578",
- "name": "speechToTextBot",
- "continuous": true,
- "speakerlabels": false,
- "lang": "pt-BR",
- "langhidden": "pt-BR",
- "langcustom": "NoCustomisationSetting",
- "langcustomhidden": "",
- "band": "BroadbandModel",
- "bandhidden": "BroadbandModel",
- "password": "",
- "x": 721.2221965789795,
- "y": 126.66666412353516,
- "wires": [
- [
- "824d0c88.85e69"
- ]
- ]
- },
- {
- "id": "ca11512d.4de1b",
- "type": "http request",
- "z": "905b855.cdcd578",
- "name": "",
- "method": "GET",
- "ret": "txt",
- "url": "https://api.telegram.org/bot/getFile?file_id={{url}}",
- "tls": "",
- "x": 246.7777614593506,
- "y": 124.55557060241699,
- "wires": [
- [
- "634b908f.b4b5a"
- ]
- ]
- },
- {
- "id": "3793e1b0.4df95e",
- "type": "function",
- "z": "905b855.cdcd578",
- "name": "Prepare To Transcription",
- "func": "if(msg.transcription!=null){\n console.log(msg.transcription);\n}\nmsg.payload = msg.transcription;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 161.55555725097656,
- "y": 210,
- "wires": [
- [
- "863ed48e.0af648",
- "9a643186.917b4"
- ]
- ]
- },
- {
- "id": "1555b155.8d5d6f",
- "type": "debug",
- "z": "905b855.cdcd578",
- "name": "",
- "active": true,
- "console": "true",
- "complete": "true",
- "x": 813.6666717529297,
- "y": 465.4444580078125,
- "wires": []
- },
- {
- "id": "7af5fa42.0ca6a4",
- "type": "link in",
- "z": "905b855.cdcd578",
- "name": "Voice Input Flow",
- "links": [
- "fee85b54.5ff138"
- ],
- "x": 20,
- "y": 126.22222709655762,
- "wires": [
- [
- "cc03d98.9f37628"
- ]
- ]
- },
- {
- "id": "9e5a47b8.2f6588",
- "type": "function",
- "z": "905b855.cdcd578",
- "name": "",
- "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;",
- "outputs": "1",
- "noerr": 0,
- "x": 544.7777729034424,
- "y": 127.66668510437012,
- "wires": [
- [
- "fa4cfdc2.4bd3d"
- ]
- ]
- },
- {
- "id": "634b908f.b4b5a",
- "type": "json",
- "z": "905b855.cdcd578",
- "name": "",
- "x": 400.7777919769287,
- "y": 124.55557441711426,
- "wires": [
- [
- "9e5a47b8.2f6588"
- ]
- ]
- },
- {
- "id": "824d0c88.85e69",
- "type": "link out",
- "z": "905b855.cdcd578",
- "name": "Speech to Text OutPut",
- "links": [
- "8a2c4520.61a2c8"
- ],
- "x": 887.0000171661377,
- "y": 124.66668891906738,
- "wires": []
- },
- {
- "id": "8a2c4520.61a2c8",
- "type": "link in",
- "z": "905b855.cdcd578",
- "name": "Prepare Transcription IN",
- "links": [
- "824d0c88.85e69"
- ],
- "x": 21.44444751739502,
- "y": 210.66668128967285,
- "wires": [
- [
- "3793e1b0.4df95e"
- ]
- ]
- },
- {
- "id": "5909b767.ed4d98",
- "type": "watson-text-to-speech",
- "z": "905b855.cdcd578",
- "name": "",
- "lang": "pt-BR",
- "langhidden": "pt-BR",
- "langcustom": "NoCustomisationSetting",
- "langcustomhidden": "",
- "voice": "pt-BR_IsabelaVoice",
- "voicehidden": "",
- "format": "audio/ogg; codecs=opus",
- "password": "",
- "x": 168.6666717529297,
- "y": 469.4444580078125,
- "wires": [
- [
- "a6c3ca48.1af9a8"
- ]
- ]
- },
- {
- "id": "5e67bec8.594c4",
- "type": "function",
- "z": "905b855.cdcd578",
- "name": "Prepare To Reply",
- "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;",
- "outputs": 1,
- "noerr": 0,
- "x": 178.66668701171875,
- "y": 359.888916015625,
- "wires": [
- [
- "6196d7dd.737818"
- ]
- ]
- },
- {
- "id": "da3d335d.4ba5d",
- "type": "telegram sender",
- "z": "905b855.cdcd578",
- "name": "",
- "bot": "d809bdf6.6eed1",
- "x": 614.0000076293945,
- "y": 467.2222270965576,
- "wires": [
- [
- "1555b155.8d5d6f"
- ]
- ]
- },
- {
- "id": "6196d7dd.737818",
- "type": "link out",
- "z": "905b855.cdcd578",
- "name": "PrepareToReplyOut",
- "links": [
- "2657354b.1b00ba"
- ],
- "x": 364.22222900390625,
- "y": 358.77777099609375,
- "wires": []
- },
- {
- "id": "2657354b.1b00ba",
- "type": "link in",
- "z": "905b855.cdcd578",
- "name": "Text to Speech In",
- "links": [
- "6196d7dd.737818"
- ],
- "x": 41.66667175292969,
- "y": 471.4444580078125,
- "wires": [
- [
- "5909b767.ed4d98"
- ]
- ]
- },
- {
- "id": "a6c3ca48.1af9a8",
- "type": "function",
- "z": "905b855.cdcd578",
- "name": "Prepare To Sender",
- "func": "msg.additional_context.telegram.msg_payload_original.content = msg.speech;\nmsg.payload = msg.additional_context.telegram.msg_payload_original;\nreturn msg;",
- "outputs": "1",
- "noerr": 0,
- "x": 388.77777099609375,
- "y": 469.7778034210205,
- "wires": [
- [
- "da3d335d.4ba5d",
- "1595dc20.ebab84"
- ]
- ]
- },
- {
- "id": "cc03d98.9f37628",
- "type": "function",
- "z": "905b855.cdcd578",
- "name": "",
- "func": "msg.url = msg.originalMessage.voice.file_id;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 103.99999809265137,
- "y": 125.33332824707031,
- "wires": [
- [
- "ca11512d.4de1b"
- ]
- ]
- },
- {
- "id": "2096aff5.c55",
- "type": "function",
- "z": "905b855.cdcd578",
- "name": "Save History",
- "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;",
- "outputs": 1,
- "noerr": 0,
- "x": 549.5,
- "y": 283,
- "wires": [
- [
- "371c731a.c085ac"
- ]
- ]
- },
- {
- "id": "371c731a.c085ac",
- "type": "cloudant out",
- "z": "905b855.cdcd578",
- "name": "",
- "cloudant": "",
- "database": "history",
- "service": "",
- "payonly": false,
- "operation": "insert",
- "x": 783.5,
- "y": 279,
- "wires": []
- },
- {
- "id": "e3b231ea.9584a",
- "type": "debug",
- "z": "905b855.cdcd578",
- "name": "",
- "active": true,
- "console": "true",
- "complete": "true",
- "x": 583.5,
- "y": 207,
- "wires": []
- },
- {
- "id": "863ed48e.0af648",
- "type": "watson-conversation-v1",
- "z": "905b855.cdcd578",
- "name": "",
- "workspaceid": "",
- "multiuser": false,
- "context": true,
- "x": 391.5,
- "y": 214,
- "wires": [
- [
- "5e67bec8.594c4",
- "e3b231ea.9584a"
- ]
- ]
- },
- {
- "id": "9a643186.917b4",
- "type": "debug",
- "z": "905b855.cdcd578",
- "name": "",
- "active": true,
- "console": "true",
- "complete": "true",
- "x": 356.5,
- "y": 172,
- "wires": []
- },
- {
- "id": "1595dc20.ebab84",
- "type": "debug",
- "z": "905b855.cdcd578",
- "name": "",
- "active": true,
- "console": "true",
- "complete": "true",
- "x": 538.5,
- "y": 382,
- "wires": []
- },
- {
- "id": "d809bdf6.6eed1",
- "type": "telegram bot",
- "z": 0,
- "botname": "botman",
- "usernames": "",
- "chatids": ""
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment