import{C as o,D as s,E as c,M as i,I as a,J as p,P as l}from"./index-CoQ-x5A8.js";import{Q as h}from"./QPage-CqzvAwRn.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";const d={name:"TestWebSpeechApi",data(){return{transcript:"",recognition:null}},methods:{startRecognition(){const e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e){this.transcript="Speech Recognition not supported in this browser!";return}this.recognition=new e,this.recognition.lang="en-EN",this.recognition.interimResults=!1,this.recognition.maxAlternatives=1,this.recognition.onresult=t=>{this.transcript=t.results[0][0].transcript},this.recognition.onerror=t=>{this.transcript="Error: "+t.error},this.recognition.start()}}},m={class:"q-pa-md"},u={class:"q-mt-md"};function _(e,t,f,w,n,r){return s(),o(h,{class:"flex flex-center"},{default:c(()=>[i("div",m,[a(p,{onClick:r.startRecognition,label:"Start",color:"primary"},null,8,["onClick"]),i("p",u,"Result: "+l(n.transcript),1)])]),_:1})}const b=g(d,[["render",_]]);export{b as default};
