diff --git a/app.js b/app.js index 5cf3b44..73e293f 100644 --- a/app.js +++ b/app.js @@ -2720,17 +2720,24 @@ document.getElementById('audio-toggle').addEventListener('click', () => { }); // Podcast toggle -document.getElementById('podcast-toggle').addEventListener('click', async () => { +document.getElementById('podcast-toggle').addEventListener('click', () => { try { - const response = await fetch('SOUL.md'); - if (!response.ok) throw new Error('Failed to load SOUL.md'); - const text = await response.text(); - const utterance = new SpeechSynthesisUtterance(text); - utterance.lang = 'en-US'; - utterance.rate = 0.9; - utterance.pitch = 0.9; - utterance.volume = 1.0; - speechSynthesis.speak(utterance); + fetch('SOUL.md') + .then(response => { + if (!response.ok) throw new Error('Failed to load SOUL.md'); + return response.text(); + }) + .then(text => { + const utterance = new SpeechSynthesisUtterance(text); + utterance.lang = 'en-US'; + utterance.rate = 0.9; + utterance.pitch = 0.9; + speechSynthesis.speak(utterance); + }) + .catch(err => { + console.error('Failed to load or play SOUL.md:', err); + alert('Could not load SOUL.md for audio playback.'); + }); } catch (err) { console.error('Failed to load or play SOUL.md:', err); alert('Could not load SOUL.md for audio playback.'); diff --git a/style.css b/style.css index e2e8e43..d2d1d55 100644 --- a/style.css +++ b/style.css @@ -95,7 +95,7 @@ canvas { } #podcast-toggle:hover { - background-color: #0066cc; + background-color: var(--color-primary); } #export-session:hover {