Skip to content

voice.setVoiceFilter

Heewon123 edited this page Sep 29, 2017 · 4 revisions

음성 필터 설정 API

gigagenie.voice.setVoiceFilter

기가지니의 Keyword Spotting(예: 기가지니) 이후 발화된 내용중에서 App 에서 전달받고자 하는 단어를 설정한다. 음성 인식 결과는 대화SDK를 거치지 않고 이벤트 수신을 통해 전달한다. 권한을 가진 appid만 호출 가능하다.

※ 설정한 단어가 첫 번째 단어로 인식될 때만 이벤트로 전달한다.
   예: [‘정답’] 으로 등록했을 경우 ‘정답 1번’은 수신, ‘1번 정답’은 수신 안됨

  • gigagenie.voice.setVoiceFilter

  • options 은 다음과 같이 설정한다.

    • options.keyword : String Array, Mandatory 로 Keyword를 설정한다.

  • 사용 예

//callback 방식
var options={};
options.keyword=[”정답”,”힌트”];
gigagenie.voice.setVoiceFilter(options,function(result_cd,result_msg,extra){
    if(result_cd===200){
        console.log("Keyword setting is success.");
    };
});
//promise 방식
var options={};
options.callnumber=[”정답”,”힌트”];
gigagenie.voice.setVoiceFilter(options).then(function(extra){
    console.log("Keyword setting is success.");
}).catch(function(result_cd,result_msg,extra){

})

활용 예제는 (GiGA Genie Quiz)에서 확인 가능합니다

UserGuide

Clone this wiki locally