Fix audio click at end of speech synthesis
Append trailing spaces so the audio session stays open briefly before closing, preventing the hardware click/pop on webkit/macOS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1166,7 +1166,7 @@ const App = () => {
|
|||||||
if (!window.speechSynthesis) return;
|
if (!window.speechSynthesis) return;
|
||||||
window.speechSynthesis.cancel();
|
window.speechSynthesis.cancel();
|
||||||
const lang = strongsNum?.startsWith('H') ? 'he-IL' : 'el-GR';
|
const lang = strongsNum?.startsWith('H') ? 'he-IL' : 'el-GR';
|
||||||
const utt = new SpeechSynthesisUtterance(word);
|
const utt = new SpeechSynthesisUtterance(word + ' ');
|
||||||
utt.lang = lang;
|
utt.lang = lang;
|
||||||
// prefer a matching voice if available
|
// prefer a matching voice if available
|
||||||
const voices = window.speechSynthesis.getVoices();
|
const voices = window.speechSynthesis.getVoices();
|
||||||
|
|||||||
Reference in New Issue
Block a user