From f846c83a7ad1e5a226932ff926a85fc73aca14a1 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 22 Mar 2026 10:36:42 +0800 Subject: [PATCH] pre-seed the tts so it can be shown --- otherarch/tts_adapter.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/otherarch/tts_adapter.cpp b/otherarch/tts_adapter.cpp index 79e52476d..e0df7b6e6 100644 --- a/otherarch/tts_adapter.cpp +++ b/otherarch/tts_adapter.cpp @@ -1186,11 +1186,17 @@ static tts_generation_outputs ttstype_generate_qwen3tts(const tts_generation_inp std::vector custom_reference_audio_pcmf32; std::string speakerstr = inputs.custom_speaker_voice; + int audio_seed = inputs.audio_seed; + if (audio_seed <= 0 || audio_seed==0xFFFFFFFF) + { + audio_seed = (((uint32_t)time(NULL)) % 1000000u); + } + if(ttsdebugmode==1 && !tts_is_quiet) { - printf("\nUsing Audio Seed: %d, Speaker: %s", inputs.audio_seed,speakerstr.c_str()); + printf("\nUsing Audio Seed: %d, Speaker: %s", audio_seed, speakerstr.c_str()); } - qwen3tts_runner.set_seed(inputs.audio_seed); + qwen3tts_runner.set_seed(audio_seed); if(custom_reference_audio_str!="") {