[groq] Research: NotebookLM — create audio overview of SOUL.md as podcast (#293) (#357)
Some checks failed
Deploy Nexus / deploy (push) Failing after 9s
Some checks failed
Deploy Nexus / deploy (push) Failing after 9s
This commit was merged in pull request #357.
This commit is contained in:
18
app.js
18
app.js
@@ -2719,6 +2719,24 @@ document.getElementById('audio-toggle').addEventListener('click', () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Podcast toggle
|
||||
document.getElementById('podcast-toggle').addEventListener('click', async () => {
|
||||
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);
|
||||
} catch (err) {
|
||||
console.error('Failed to load or play SOUL.md:', err);
|
||||
alert('Could not load SOUL.md for audio playback.');
|
||||
}
|
||||
});
|
||||
|
||||
// === DEBUG MODE ===
|
||||
let debugMode = false;
|
||||
|
||||
|
||||
13
style.css
13
style.css
@@ -81,6 +81,19 @@ canvas {
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
#podcast-toggle {
|
||||
margin-left: 8px;
|
||||
background-color: var(--color-accent);
|
||||
color: var(--color-bg);
|
||||
padding: 4px 8px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
font-family: var(--font-body);
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
#export-session:hover {
|
||||
background-color: var(--color-primary);
|
||||
color: var(--color-bg);
|
||||
|
||||
Reference in New Issue
Block a user