Files
JiboSDK/node_modules/jibo/lib/asr/speaker-recognizer.js
2026-03-22 03:21:45 +02:00

1 line
1.6 KiB
JavaScript

"use strict";var t=function(t){return t&&t.__esModule?t["default"]:t},e=function(){function t(t,e){for(var r in e){var n=e[r];n.configurable=!0,n.value&&(n.writable=!0)}Object.defineProperties(t,e)}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),r=function u(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e);if(void 0===n){var o=Object.getPrototypeOf(t);return null===o?void 0:u(o,e,r)}if("value"in n&&n.writable)return n.value;var i=n.get;if(void 0!==i)return i.call(r)},n=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.__proto__=e)},o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=t(require("./recognizer")),a=function(t){function i(){var t=void 0===arguments[0]?{}:arguments[0];o(this,i),t.enrollTD?t.path="sensory_spkr_enroll_td":t.enrollTI?t.path="sensory_spkr_enroll_ti":t.authTD?t.path="sensory_spkr_id_td":t.authTI&&(t.path="sensory_spkr_id_ti"),r(Object.getPrototypeOf(i.prototype),"constructor",this).call(this,t)}return n(i,t),e(i,{toString:{value:function(){return this.pack()}},pack:{value:function(){var t={name:this.name,path:this.path,bargein:this.bargein,nbest:this.nbest,speaker_name:this.authenticateSpeaker,incremental:this.incremental,audio_tail_length:1};return t=JSON.stringify(t)}},onResult:{value:function(t){var e={speakerIds:t.speaker_ids,speakerIdStatus:t.speaker_idstatus};this.emit("result",e)}}}),i}(i);module.exports=a;