feat(tts): change the speech speed without a restart and keep fast speech clear

MeloTTS's own speed shortens every sound and slurred fast speech (Whisper
large-v3 on five Korean sentences, three renders each: 5.5% character
errors at 1.5 and 20% at 2.0, against 1.4% at 1.0). The MeloTTS child now
speaks at most at its natural pace and makes faster speech with a WSOLA
time stretch that keeps the pitch (1.9% at 1.5, 2.2% at 2.0, about 15 ms
per 4 s of speech).

A voice.tts.speed saved while the services run goes to the worker at once
(new tts_speed message) and applies from the next sentence; the client
sends it again whenever the worker connects again. Version 0.1.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-15 23:39:04 +09:00
parent d17a3bbb61
commit dbe5c617bc
17 changed files with 268 additions and 16 deletions

View File

@@ -311,7 +311,15 @@ impl AdminApi {
}
}
}
Ok(json!({"saved": changes.len(), "restartNeeded": self.controller()?.state() == crate::control::State::Running,
// The speech speed reaches the running services at once; everything else waits for
// a restart.
if changes.contains_key("voice.tts.speed") {
let speed = crate::settings::load_settings(&file).map_err(|e| e.0)?.voice.tts_speed;
self.controller()?.set_tts_speed(speed);
}
let restart = changes.keys().any(|k| k != "voice.tts.speed");
Ok(json!({"saved": changes.len(),
"restartNeeded": restart && self.controller()?.state() == crate::control::State::Running,
"sync": sync}))
}
"mcp_env_status" => {