diff --git a/uncloseai.js b/uncloseai.js index 27f5fca..f0466e2 100644 --- a/uncloseai.js +++ b/uncloseai.js @@ -81,6 +81,9 @@ function extractWebpageContent() { // Function to read text using TTS async function speakText(text, voice = 'alloy', rate = 0.9) { try { + // Preprocess the text using Hermes to get spoken tokens + const spokenText = await processContentWithHermes(text); + const response = await fetch(TTS_API_URL, { method: 'POST', headers: { @@ -90,7 +93,7 @@ async function speakText(text, voice = 'alloy', rate = 0.9) { body: JSON.stringify({ model: 'tts-1', voice: voice, - input: text + input: spokenText }) });