diff --git a/public/src/page-reader.js b/public/src/page-reader.js index d83b1cb..01bd46e 100644 --- a/public/src/page-reader.js +++ b/public/src/page-reader.js @@ -14,9 +14,9 @@ export async function readPageWithHermes(button = null) { const processedContent = await processContentWithHermes(content); - // Get voice preference from settings (format: "model:voice", e.g., "tts-1:onyx") + // Get voice preference from settings (format: "model:voice", e.g., "tts-1-qwen:onyx") let voice = "alloy"; - let model = "tts-1"; + let model = "tts-1-qwen"; try { const savedVoice = localStorage.getItem("uncloseai_selected_voice"); if (savedVoice && savedVoice.includes(":")) { diff --git a/public/src/tts-modal.js b/public/src/tts-modal.js index 06fb3fb..303538d 100644 --- a/public/src/tts-modal.js +++ b/public/src/tts-modal.js @@ -294,8 +294,8 @@ export function openTTSModal() { const selectedValue = document.querySelector('input[name="tts-voice"]:checked').value; const speed = parseFloat(speedSlider.value); - // Parse model:voice format (e.g., "tts-1:alloy" or legacy "alloy") - let model = 'tts-1'; + // Parse model:voice format (e.g., "tts-1-qwen:alloy" or legacy "alloy") + let model = 'tts-1-qwen'; let voice = selectedValue; if (selectedValue.includes(':')) { diff --git a/public/src/tts.js b/public/src/tts.js index 0bdb657..a10686e 100644 --- a/public/src/tts.js +++ b/public/src/tts.js @@ -23,7 +23,7 @@ function cleanTextForTTS(text) { } // Function to read text using TTS - for Read Page button (uses Hermes) -export async function speakText(text, voice = "alloy", rate = 0.9, model = "tts-1") { +export async function speakText(text, voice = "alloy", rate = 0.9, model = "tts-1-qwen") { try { // Preprocess the text using Hermes to get spoken tokens const spokenText = await extractSpokenTokens(text); @@ -61,7 +61,7 @@ export async function speakText(text, voice = "alloy", rate = 0.9, model = "tts- } // Direct TTS function for modal - no Hermes preprocessing -export async function speakTextDirect(text, voice = "alloy", rate = 0.9, model = "tts-1") { +export async function speakTextDirect(text, voice = "alloy", rate = 0.9, model = "tts-1-qwen") { try { // Clean text with simple JavaScript instead of Hermes const cleanedText = cleanTextForTTS(text); @@ -251,7 +251,7 @@ export async function generateTitleForTTS(text) { } // Handle TTS from element (for modal usage - uses direct TTS without Hermes) -export async function handleTTS(text, voice = "alloy", rate = 0.9, model = "tts-1") { +export async function handleTTS(text, voice = "alloy", rate = 0.9, model = "tts-1-qwen") { try { const result = await speakTextDirect(text, voice, rate, model); return result; diff --git a/public/src/ui.js b/public/src/ui.js index b2ba880..ff22695 100644 --- a/public/src/ui.js +++ b/public/src/ui.js @@ -214,7 +214,7 @@ async function speakChatText(text, voice = "alloy", rate = 1.0) { Authorization: `Bearer ${API_KEY}`, }, body: JSON.stringify({ - model: "tts-1", + model: "tts-1-qwen", voice: voice, input: text, }), diff --git a/public/src/uncloseai-embed-modal.js b/public/src/uncloseai-embed-modal.js index 9837a7a..c3a05f3 100644 --- a/public/src/uncloseai-embed-modal.js +++ b/public/src/uncloseai-embed-modal.js @@ -42,8 +42,8 @@ function parseVoiceSelection(selectedValue) { const [model, voice] = selectedValue.split(":"); return { model, voice }; } - // Legacy format - assume tts-1 model - return { model: "tts-1", voice: selectedValue }; + // Legacy format - assume tts-1-qwen model + return { model: "tts-1-qwen", voice: selectedValue }; } // Import required functions dynamically to avoid circular dependencies