PageSourceSearch

https://shizenlearn.com/assets/web-Dwq32IuK.js

js shizenlearn.com collected 2026-10-02 01:47:47 UTC 1,777 bytes, 1 lines download raw bytes

1import{cU as p}from"./index-4BgFHtDy.js";import"./react-vendor-CR6PEHFZ.js";import"./charts-B4FZmgI2.js";import"./motion-CJOt5odT.js";import"./sentry-vendor-TOuwz_QY.js";class y extends p{constructor(){super(),this.speechSynthesis=null,"speechSynthesis"in window&&(this.speechSynthesis=window.speechSynthesis,window.addEventListener("beforeunload",()=>{this.stop()}))}async speak(t){this.speechSynthesis||this.throwUnsupportedError(),await this.stop();const o=this.speechSynthesis,e=this.createSpeechSynthesisUtterance(t);return new Promise((i,n)=>{e.onend=()=>{i()},e.onerror=s=>{n(s)},o.speak(e)})}async stop(){this.speechSynthesis||this.throwUnsupportedError(),this.speechSynthesis.cancel()}async getSupportedLanguages(){return{languages:this.getSpeechSynthesisVoices().map(i=>i.lang).filter((i,n,s)=>s.indexOf(i)==n)}}async getSupportedVoices(){return{voices:this.getSpeechSynthesisVoices()}}async isLanguageSupported(t){return{supported:(await this.getSupportedLanguages()).languages.includes(t.lang)}}async openInstall(){this.throwUnimplementedError()}createSpeechSynthesisUtterance(t){const o=this.getSpeechSynthesisVoices(),e=new SpeechSynthesisUtterance,{text:i,lang:n,rate:s,pitch:r,volume:h,voice:c}=t;return c&&(e.voice=o[c]),h&&(e.volume=h>=0&&h<=1?h:1),s&&(e.rate=s>=.1&&s<=10?s:1),r&&(e.pitch=r>=0&&r<=2?r:2),n&&(e.lang=n),e.text=i,e}getSpeechSynthesisVoices(){return this.speechSynthesis||this.throwUnsupportedError(),(!this.supportedVoices||this.supportedVoices.length<1)&&(this.supportedVoices=this.speechSynthesis.getVoices()),this.supportedVoices}throwUnsupportedError(){throw this.unavailable("SpeechSynthesis API not available in this browser.")}throwUnimplementedError(){throw this.unimplemented("Not implemented on web.")}}export{y as TextToSpeechWeb};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.