tts-server: normalizza i numeri interi 5+ cifre in parole italiane (Qwen3-TTS li leggeva cifra per cifra)

This commit is contained in:
enne2
2026-08-13 19:54:50 +02:00
parent a8a7716b53
commit 3be42af9bb
2 changed files with 127 additions and 1 deletions
+4 -1
View File
@@ -7,6 +7,7 @@
#include "qwen.h"
#include "rvq-file.h"
#include "text-normalize.h"
#include "version.h"
#include <cmath>
@@ -222,7 +223,9 @@ int main(int argc, char ** argv) {
be.synthesize = [q, &lang](const tts_request & req, const tts_sink & sink, std::string & err) -> int {
struct qt_tts_params p;
qt_tts_default_params(&p);
p.text = req.input.c_str();
std::string normalized = req.input;
text_normalize::normalize_numbers(normalized);
p.text = normalized.c_str();
p.lang = lang.c_str();
// Copy the registered voice latents out under the lock: the