CopyPastor

Detecting plagiarism made easy.

Score: 0.9527672177269345; Reported for: String similarity Open both answers

Possible Plagiarism

Reposted on 2024-05-14
by Junaid Shaikh

Original Post

Original - Posted on 2024-05-14
by Junaid Shaikh



            
Present in both answers; Present only in the new answer; Present only in the old answer;

just do `window.speechSynthesis.getVoices()` to get the list of supported languages by the browser.
const supportedVoices = window.speechSynthesis.getVoices().map((voice) => { return voice.lang })
in react you can do

useEffect(() => { if ('speechSynthesis' in window) { window.speechSynthesis.onvoiceschanged = () => { const supportedVoices = window.speechSynthesis.getVoices().map((voice) => { return voice.lang }) setSupportedLanguages(supportedVoices) } } }, [])
just do `window.speechSynthesis.getVoices()` to get the list of supported languages by the browser.
const supportedVoices = window.speechSynthesis.getVoices().map((voice) => { return voice.lang })

in react you can do
useEffect(() => { if ('speechSynthesis' in window) { window.speechSynthesis.onvoiceschanged = () => { const supportedVoices = window.speechSynthesis.getVoices().map((voice) => { return voice.lang }) setSupportedLanguages(supportedVoices) } } }, [])

        
Present in both answers; Present only in the new answer; Present only in the old answer;