tts: switch default voice clara -> atlas (clean male voice per transcription test)
This commit is contained in:
parent
378662b62f
commit
ddc895de4c
5 changed files with 10 additions and 10 deletions
|
|
@ -240,7 +240,7 @@ export async function handleUserInput() {
|
|||
playPauseButton.textContent = "Processing...";
|
||||
playPauseButton.disabled = true; // Disable button while processing
|
||||
const mainVoiceSelect = document.getElementById("read-page-voice");
|
||||
const selectedVoice = mainVoiceSelect ? mainVoiceSelect.value : "clara";
|
||||
const selectedVoice = mainVoiceSelect ? mainVoiceSelect.value : "atlas";
|
||||
const result = await speakText(accumulatedContent, selectedVoice, 0.9);
|
||||
aiAudio = result.audio;
|
||||
aiBlob = result.blob;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ export async function readPageWithHermes(button = null) {
|
|||
|
||||
const processedContent = await processContentWithHermes(content);
|
||||
|
||||
// Get voice preference from settings (format: "model:voice", e.g., "tts-1-f5:clara")
|
||||
let voice = "clara";
|
||||
// Get voice preference from settings (format: "model:voice", e.g., "tts-1-f5:atlas")
|
||||
let voice = "atlas";
|
||||
let model = "tts-1-f5";
|
||||
try {
|
||||
const savedVoice = localStorage.getItem("uncloseai_selected_voice");
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ function renderVoiceOptions(voiceSelection, voices) {
|
|||
voiceSelection.innerHTML = ''; // Clear existing options
|
||||
|
||||
// Get saved voice preference (vault first, fallback to default)
|
||||
let savedVoice = 'tts-1-f5:clara'; // Default
|
||||
let savedVoice = 'tts-1-f5:atlas'; // Default
|
||||
try {
|
||||
if (typeof window !== 'undefined' && window.UncloseVault && window.UncloseVault.isUnlocked()) {
|
||||
savedVoice = window.UncloseVault.get('uncloseai_selected_voice', 'tts-1-f5:clara');
|
||||
savedVoice = window.UncloseVault.get('uncloseai_selected_voice', 'tts-1-f5:atlas');
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Failed to read voice preference:', error);
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ function cleanTextForTTS(text) {
|
|||
|
||||
// Function to read text using TTS - for Read Page button (uses Hermes).
|
||||
// Multi-chunk uses pipelined playlist: playback starts as soon as chunk 1 lands.
|
||||
export async function speakText(text, voice = "clara", rate = 0.9, model = "tts-1-f5") {
|
||||
export async function speakText(text, voice = "atlas", rate = 0.9, model = "tts-1-f5") {
|
||||
try {
|
||||
const spokenText = await extractSpokenTokens(text);
|
||||
const chunks = splitTextIntoChunks(spokenText);
|
||||
|
|
@ -450,7 +450,7 @@ export function primeAudioPlayback() {
|
|||
|
||||
// Direct TTS function for modal - no Hermes preprocessing.
|
||||
// Multi-chunk uses pipelined playlist: playback starts as soon as chunk 1 lands.
|
||||
export async function speakTextDirect(text, voice = "clara", rate = 0.9, model = "tts-1-f5") {
|
||||
export async function speakTextDirect(text, voice = "atlas", rate = 0.9, model = "tts-1-f5") {
|
||||
try {
|
||||
const cleanedText = cleanTextForTTS(text);
|
||||
const chunks = splitTextIntoChunks(cleanedText);
|
||||
|
|
@ -478,7 +478,7 @@ export async function speakTextDirect(text, voice = "clara", rate = 0.9, model =
|
|||
// Streaming TTS function - plays audio as chunks arrive using MediaSource API
|
||||
// Returns immediately with audio element; done promise resolves when stream completes
|
||||
// Automatically chunks long text and streams each chunk sequentially
|
||||
export async function speakTextStreaming(text, voice = "clara", rate = 0.9, model = "tts-1-f5") {
|
||||
export async function speakTextStreaming(text, voice = "atlas", rate = 0.9, model = "tts-1-f5") {
|
||||
const cleanedText = cleanTextForTTS(text);
|
||||
const textChunks = splitTextIntoChunks(cleanedText);
|
||||
console.log("TTS streaming input preview:", cleanedText.substring(0, 100) + "...");
|
||||
|
|
@ -795,7 +795,7 @@ export async function generateTitleForTTS(text) {
|
|||
// Handle TTS - respects streaming mode setting
|
||||
// Caches audio blobs in memory so replay doesn't regenerate
|
||||
// Cache is keyed by text+voice+model and clears when the tab closes
|
||||
export async function handleTTS(text, voice = "clara", rate = 0.9, model = "tts-1-f5") {
|
||||
export async function handleTTS(text, voice = "atlas", rate = 0.9, model = "tts-1-f5") {
|
||||
try {
|
||||
const cacheKey = `${model}:${voice}:${text}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ const UncloseVault = {
|
|||
// Model selection
|
||||
selectedModel: null,
|
||||
selectedEndpoint: null,
|
||||
selectedVoice: 'tts-1-f5:clara',
|
||||
selectedVoice: 'tts-1-f5:atlas',
|
||||
|
||||
// Custom API
|
||||
useCustomAPI: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue