"use strict";const e=require("../../../../common/vendor.js"),t=class t{constructor(){this.isUseCache=!0,this.convertCache=new Map}static getInstance(){return t.instance||(t.instance=new t),t.instance}async get(t){if(this.isUseCache){const e=this.convertCache.get(t.ID);if(void 0!==e)return e}const s=e.Jt.getMessageModel(t.ID);if(!s)return Promise.reject("message not found");const c=await e.Qt.convertVoiceToText({message:s});let{data:{result:n}={}}=c;return n?this.convertCache.set(s.ID,n):n="",n}clear(){this.convertCache.clear()}disableCache(){this.isUseCache=!1}enableCache(){this.isUseCache=!0}};t.instance=void 0;const s=t.getInstance();exports.convertor=s;
