(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b2cdc"],{2657:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"row rest"},[s("div",{staticClass:"rest aside-bg"}),s("VoiceSnb",{staticClass:"left-container"}),t._m(0),s("div",{staticClass:"rest"})],1)},r=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("article",{staticClass:"right-container"},[s("hgroup",[s("h1",{attrs:{id:"credential1"}},[t._v("Credential 추가")])]),s("h2",{staticClass:"api-url"},[t._v("POST http://localhost:8009/credential")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Message")]),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "name": "sample_credential",\n "credential": {\n "type": "service_account",\n "project_id": "damda-XXXX",\n "private_key_id": "...",\n "private_key": "--BEGIN PRIVATE KEY--...--END PRIVATE KEY--\\n",\n "client_email": "...",\n "client_id": "...",\n "auth_uri": "https://accounts.google.com/o/oauth2/auth",\n "token_uri": "https://oauth2.googleapis.com/token",\n "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",\n "client_x509_cert_url": "..."\n }\n}')])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v("{}")])])])])]),s("hgroup",[s("h1",{attrs:{id:"credential2"}},[t._v("Credential 삭제")])]),s("h2",{staticClass:"api-url"},[t._v("POST http://localhost:8009/credential/{name}")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Parameters")]),s("table",{staticClass:"simple-table object"},[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Type")]),s("th",[t._v("Description")]),s("th",[t._v("Required")])]),s("tr",[s("td",[t._v("name")]),s("td",[t._v("String")]),s("td",[t._v("credential 이름")]),s("td",[t._v("O")])])])])]),s("tr",[s("th",[t._v("Response")]),s("td",{staticStyle:{width:"800px"}},[s("pre",[s("code",{staticClass:"hljs"},[t._v("{}")])])])])]),s("hgroup",[s("h1",{attrs:{id:"text1"}},[t._v("음성 Text 입력 + Text/TTS 출력")])]),s("h2",{staticClass:"api-url"},[t._v("POST http://localhost:8009/nlu/dialogflow/text/{response_type}")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Parameters")]),s("table",{staticClass:"simple-table object"},[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Type")]),s("th",[t._v("Description")]),s("th",[t._v("Required")])]),s("tr",[s("td",[t._v("response_type")]),s("td",[t._v("String")]),s("td",[t._v("text | tts")]),s("td",[t._v("O")])])]),s("h3",[t._v("Message")]),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "project_id": "XXX-1234",\n "session_id": "123456",\n "language_code": "ko",\n "text": "된장찌개 레시피 알려줘",\n "credential": "sample_credential" # credential 이름\n}')])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "intent": "Recipe Search Intent",\n "parameters": {\n "food": "된장찌개"\n },\n "response_text": "레시피를 알려드릴게요.",\n "response_file": "123456_output.wav"\n}')])]),s("table",{staticClass:"simple-table object"},[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Type")]),s("th",[t._v("Description")]),s("th",[t._v("Optional")])]),s("tr",[s("td",[t._v("intent")]),s("td",[t._v("String")]),s("td",[t._v("인텐트")]),s("td",[t._v("X")])]),s("tr",[s("td",[t._v("parameters")]),s("td",[t._v("Dict")]),s("td",[t._v("파리미터")]),s("td",[t._v("X")])]),s("tr",[s("td",[t._v("response_text")]),s("td",[t._v("String")]),s("td",[t._v("응답 메시지")]),s("td",[t._v("X")])]),s("tr",[s("td",[t._v("response_file")]),s("td",[t._v("String")]),s("td",[t._v("response_type이 tts일 경우에만 있음")]),s("td",[t._v("O")])])])])])]),s("hgroup",[s("h1",{attrs:{id:"text2"}},[t._v("음성 STT 입력 + Text/TTS 출력")])]),s("h2",{staticClass:"api-url"},[t._v("POST http://localhost:8009/nlu/dialogflow/text/{response_type}")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Parameters")]),s("table",{staticClass:"simple-table object"},[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Type")]),s("th",[t._v("Description")]),s("th",[t._v("Required")])]),s("tr",[s("td",[t._v("response_type")]),s("td",[t._v("String")]),s("td",[t._v("text | tts")]),s("td",[t._v("O")])])]),s("h3",[t._v("Message")]),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "project_id": "XXX-1234",\n "session_id": "123456",\n "language_code": "ko",\n "credential": "sample_credential",\n "rate": 48000 # 44100, default: 48000, rate는 optional한 값입니다.\n}')])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "intent": "Recipe Search Intent",\n "parameters": {\n "food": "된장찌개"\n },\n "response_text": "레시피를 알려드려요."\n}')])]),s("table",{staticClass:"simple-table object"},[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Type")]),s("th",[t._v("Description")]),s("th",[t._v("Optional")])]),s("tr",[s("td",[t._v("intent")]),s("td",[t._v("String")]),s("td",[t._v("인텐트")]),s("td",[t._v("X")])]),s("tr",[s("td",[t._v("parameters")]),s("td",[t._v("Dict")]),s("td",[t._v("파리미터")]),s("td",[t._v("X")])]),s("tr",[s("td",[t._v("response_text")]),s("td",[t._v("String")]),s("td",[t._v("응답 메시지")]),s("td",[t._v("X")])]),s("tr",[s("td",[t._v("response_file")]),s("td",[t._v("String")]),s("td",[t._v("response_type이 tts일 경우에만 있음")]),s("td",[t._v("O")])])])])])]),s("hgroup",[s("h1",{attrs:{id:"text3"}},[t._v("음성 Stream 입력 + Text 출력")])]),s("h2",{staticClass:"api-url"},[t._v("ws://localhost:8009/nlu/dialogflow/stream/text")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Message")]),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "project_id": "XXX-1234",\n "session_id": "123456",\n "language_code": "ko",\n "credential": "sample_credential",\n "rate": 48000 # 44100, default: 48000, rate는 optional한 값입니다.\n}')])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v("{response_type: 'intermediate_transcript', text: '된장'}\n{response_type: 'intermediate_transcript', text: '된장찌개'}\n{response_type: 'intermediate_transcript', text: '된장찌개'}\n{response_type: 'intermediate_transcript', text: '된장찌개 레시피'}\n{response_type: 'intermediate_transcript', text: '된장찌개 레시피 알려'}\n{response_type: 'intermediate_transcript', text: '된장찌개 레시피 알려 줘'}\n{response_type: 'intermediate_transcript', text: '된장찌개 레시피 알려 줘'}\n{response_type: 'intermediate_transcript', text: '된장찌개 레시피 알려 줘'}\n{response_type: 'intermediate_transcript', text: ''}\n{response_type: 'query_result',\n result: {\n intent: \"Recipe Search Intent\",\n parameters: {food: '된장찌개'},\n response_text: \"레시피를 알려드릴게요.\"\n }\n}")])]),t._v(" response_type"),s("br"),t._v(" 1) intermediate_transcript: 중간 발화의 stt 결과를 반환"),s("br"),t._v(" 2) query_result: 발화가 끝난 후 NLU 결과를 반환 (인텐트, 파라미터, 응답 메시지)"),s("br")])]),s("tr",[s("th",[t._v("호출 예시")]),s("td",[t._v(" javascript"),s("br"),s("pre",[s("code",{staticClass:"hljs"},[t._v('var deployMonitorSocket = new WebSocket(\n "ws://localhost:8008/nlu/dialogflow/stream/text"\n);\ndeployMonitorSocket.onopen = function (event) {\n var msg = JSON.stringify({\n \'project_id\': "damda-XXXX",\n \'session_id\': "123456",\n "credential": "/path-to-credential/XXX.json"\n });\n deployMonitorSocket.send(msg);\n};\ndeployMonitorSocket.onmessage = function (event) {\n data = JSON.parse(event.data);\n console.log(data);\n}')])])])])]),s("hgroup",[s("h1",{attrs:{id:"record"}},[t._v("녹음")])]),s("h2",{staticClass:"api-url"},[t._v("POST http://localhost:8009/audio/record")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Message1")]),t._v(": 음성 파일을 기본 폴더에 저장합니다. "),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_name": "test.wav"\n}')])]),s("h3",[t._v("Message2")]),t._v(": 음성 파일을 특정 경로에 저장합니다. "),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_path": "/Users/jimin/Desktop/hi.wav"\n}')])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_name": "test.wav"\n}')])]),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_path": "/Users/jimin/Desktop/hi.wav"\n}')])])])])]),s("hgroup",[s("h1",{attrs:{id:"play"}},[t._v("재생")])]),s("h2",{staticClass:"api-url"},[t._v("POST http://localhost:8009/audio/play")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Message1")]),t._v(": 음성 파일을 기본 폴더에 있는 음성파일을 재생합니다. "),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_name": "test.wav"\n}')])]),s("h3",[t._v("Message2")]),t._v(": 특정 경로의 음성파일을 재생합니다. "),s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_path": "/Users/jimin/Desktop/hi.wav"\n}')])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v("{}")])]),s("pre",[s("code",{staticClass:"hljs"},[t._v("{}")])])])])]),s("hgroup",[s("h1",{attrs:{id:"delete"}},[t._v("음성파일 삭제")])]),s("h2",{staticClass:"api-url"},[t._v("DELETE http://localhost:8009/audio/record/{file_name}")]),s("table",{staticClass:"simple-table cell1-nowrap object"},[s("tr",[s("th",[t._v("Request")]),s("td",[s("h3",[t._v("Parameters")]),s("table",{staticClass:"simple-table object"},[s("tr",[s("th",[t._v("Name")]),s("th",[t._v("Type")]),s("th",[t._v("Description")]),s("th",[t._v("Required")])]),s("tr",[s("td",[t._v("file_name")]),s("td",[t._v("String")]),s("td",[t._v("기본 폴더에 있는 음성 파일 중 제거할 음성파일의 이름"),s("br"),t._v(" 예시) test.wav")]),s("td",[t._v("O")])])])])]),s("tr",[s("th",[t._v("Response")]),s("td",[s("pre",[s("code",{staticClass:"hljs"},[t._v('{\n "file_name": "test.wav"\n}')])])])])])])}],n=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("nav",{staticClass:"snb aside-bg"},[s("div",{staticClass:"menu"},[s("ul",{staticClass:"snb-item"},[s("li",[s("a",{attrs:{href:"#credential1"}},[t._v("Credential 추가")])]),s("li",[s("a",{attrs:{href:"#credential2"}},[t._v("Credential 삭제")])]),s("li",[s("a",{attrs:{href:"#text1"}},[t._v("음성 Text + Text/TTS 출력")])]),s("li",[s("a",{attrs:{href:"#text2"}},[t._v("음성 STT + Text/TTS 출력")])]),s("li",[s("a",{attrs:{href:"#text3"}},[t._v("음성 Stream + Text 출력")])]),s("li",[s("a",{attrs:{href:"#record"}},[t._v("녹음")])]),s("li",[s("a",{attrs:{href:"#play"}},[t._v("재생")])]),s("li",[s("a",{attrs:{href:"#delete"}},[t._v("음성파일 삭제")])])])])])}],l=s("2877"),_={},o=Object(l["a"])(_,n,i,!1,null,null,null),c=o.exports,d={components:{VoiceSnb:c},data:function(){return{isOpenErrorCodeList:!1}},methods:{showErrorCodeList:function(){this.isOpenErrorCodeList=!0,this.$refs.errorCodeList.classList.remove("hide")},hideErrorCodeList:function(){this.isOpenErrorCodeList=!1,this.$refs.errorCodeList.classList.add("hide"),location.hash="#errorCodeList"}}},p=d,v=Object(l["a"])(p,a,r,!1,null,null,null);e["default"]=v.exports}}]); //# sourceMappingURL=chunk-2d0b2cdc.03205f38.js.map