From 22a04f1dde030eeba184dee56a93f1b79e226a02 Mon Sep 17 00:00:00 2001 From: Kirus59 <145689588+Kirus59@users.noreply.github.com> Date: Fri, 29 Nov 2024 22:03:46 +0300 Subject: [PATCH 1/2] TTS logs change --- Content.Server/SS220/TTS/TTSManager.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Content.Server/SS220/TTS/TTSManager.cs b/Content.Server/SS220/TTS/TTSManager.cs index 1d4719ccb2c039..91a70ef834bfc4 100644 --- a/Content.Server/SS220/TTS/TTSManager.cs +++ b/Content.Server/SS220/TTS/TTSManager.cs @@ -104,7 +104,7 @@ public void Initialize() return data; } - _sawmill.Debug($"Generate new audio for '{text}' speech by '{speaker}' speaker"); + _sawmill.Info($"Generate new audio for '{text}' speech by '{speaker}' speaker"); var reqTime = DateTime.UtcNow; try { @@ -149,8 +149,10 @@ public void Initialize() _cacheKeysSeq.Remove(firstKey); } - _sawmill.Debug( - $"Generated new sound for '{text}' speech by '{speaker}' speaker ({soundData.Length} bytes)"); + if (isRadio) + _sawmill.Info($"Generated new radio sound for '{text}' speech by '{speaker}' speaker ({soundData.Length} bytes)"); + else + _sawmill.Info($"Generated new sound for '{text}' speech by '{speaker}' speaker ({soundData.Length} bytes)"); RequestTimings.WithLabels("Success").Observe((DateTime.UtcNow - reqTime).TotalSeconds); return soundData; @@ -237,10 +239,6 @@ await FFMpegArguments _cacheRadioKeysSeq.Remove(firstKey); } - _sawmill.Debug( - $"Generated new radio sound for '{text}' speech by '{speaker}' speaker ({soundData.Length} bytes)"); - RequestTimings.WithLabels("Success").Observe((DateTime.UtcNow - reqTime).TotalSeconds); - return soundData; } catch (TaskCanceledException) From f94084985a7df853144a8ebb5280d15e3634f59a Mon Sep 17 00:00:00 2001 From: Andrey Ushakov <10843461+Werzet@users.noreply.github.com> Date: Sat, 30 Nov 2024 18:46:45 +1000 Subject: [PATCH 2/2] add log before generate --- Content.Server/SS220/TTS/TTSManager.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Content.Server/SS220/TTS/TTSManager.cs b/Content.Server/SS220/TTS/TTSManager.cs index 91a70ef834bfc4..4e521c92f9e6ed 100644 --- a/Content.Server/SS220/TTS/TTSManager.cs +++ b/Content.Server/SS220/TTS/TTSManager.cs @@ -104,7 +104,11 @@ public void Initialize() return data; } - _sawmill.Info($"Generate new audio for '{text}' speech by '{speaker}' speaker"); + if (isRadio) + _sawmill.Info($"Generate new radio sound for '{text}' speech by '{speaker}' speaker"); + else + _sawmill.Info($"Generate new audio for '{text}' speech by '{speaker}' speaker"); + var reqTime = DateTime.UtcNow; try {