Skip to content

Commit

Permalink
Remove dummy utterance (issue #40)
Browse files Browse the repository at this point in the history
Don't assume the browser always implements SpeechSynthesisUtterance.
  • Loading branch information
haukex committed Feb 12, 2025
1 parent 80c374a commit ee83f27
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/popups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ function initSelectionTools() {
const result_table = document.getElementById('result-table')
assert( sel_tools && sel_tools_search && sel_tools_feedback && sel_tools_speak && sel_tools_close && result_table )

let utterance = new SpeechSynthesisUtterance('This is an example of speech synthesis.')
utterance.lang = 'en'
let utterance :SpeechSynthesisUtterance
sel_tools_speak.addEventListener('click', event => {
event.preventDefault()
if (!canSpeak) return // this shouldn't happen
Expand Down

0 comments on commit ee83f27

Please sign in to comment.