!function(){var t,e,n,i,o,s,r,a,u={495:function(){},7147:function(){},1418:function(){},8741:function(){},8386:function(){},3342:function(){},1969:function(t,e,n){"use strict";var i=n(7431),o=n(9078);o.OBj.allowLocalModels=!1;class s{static async getInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===this.instance&&(this.instance=(0,o.EUT)(this.task,this.model,{quantized:this.quantized,progress_callback:t,revision:this.model.includes("/whisper-medium")?"no_attentions":"main"})),this.instance}constructor(t,e,n){this.tokenizer=t,this.model=e,this.quantized=n}}(0,i._)(s,"task",null),(0,i._)(s,"model",null),(0,i._)(s,"quantized",null),(0,i._)(s,"instance",null),self.addEventListener("message",async t=>{let e=t.data,n=await a(e.audio,e.model,e.multilingual,e.quantized,e.subtask,e.language);null!==n&&self.postMessage({status:"complete",task:"automatic-speech-recognition",data:n})});class r extends s{}(0,i._)(r,"task","automatic-speech-recognition"),(0,i._)(r,"model",null),(0,i._)(r,"quantized",null);let a=async(t,e,n,i,o,s)=>{let a=e.startsWith("distil-whisper/")||e.startsWith("huuquyet"),u=e;a||n||(u+=".en"),(r.model!==u||r.quantized!==i)&&(r.model=u,r.quantized=i,null!==r.instance&&((await r.getInstance()).dispose(),r.instance=null));let c=await r.getInstance(t=>{self.postMessage(t)}),l=c.processor.feature_extractor.config.chunk_length/c.model.config.max_source_positions,f=[{tokens:[],finalised:!1}];return await c(t,{top_k:0,do_sample:!1,chunk_length_s:a?20:30,stride_length_s:a?3:5,language:s,task:o,return_timestamps:!0,force_full_sequences:!1,callback_function:function(t){f[f.length-1].tokens=[...t[0].output_token_ids];let e=c.tokenizer._decode_asr(f,{time_precision:l,return_timestamps:!0,force_full_sequences:!1});self.postMessage({status:"update",task:"automatic-speech-recognition",data:e})},chunk_callback:function(t){let e=f[f.length-1];Object.assign(e,t),e.finalised=!0,t.is_last||f.push({tokens:[],finalised:!1})}}).catch(t=>(self.postMessage({status:"error",task:"automatic-speech-recognition",data:t}),null))}}},c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var n=c[t]={exports:{}},i=!0;try{u[t](n,n.exports,l),i=!1}finally{i&&delete c[t]}return n.exports}l.m=u,l.x=function(){var t=l.O(void 0,[165,132,193,72,360],function(){return l(1969)});return l.O(t)},t=[],l.O=function(e,n,i,o){if(n){o=o||0;for(var s=t.length;s>0&&t[s-1][2]>o;s--)t[s]=t[s-1];t[s]=[n,i,o];return}for(var r=1/0,s=0;s=o&&Object.keys(l.O).every(function(t){return l.O[t](n[u])})?n.splice(u--,1):(a=!1,o