From ceee57f80897bbc93db2949b40fbe2273ad78699 Mon Sep 17 00:00:00 2001 From: henrisel Date: Thu, 29 Jan 2026 17:40:05 +0200 Subject: [PATCH] mic stand doesnt show BLANK_AUDIO --- 3d-generation-pipeline/README.md | 3 --- .../ModeGeneration/ArcheryRange/MicrophoneStand.cs | 14 +++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/3d-generation-pipeline/README.md b/3d-generation-pipeline/README.md index 06531cd7..596d3020 100644 --- a/3d-generation-pipeline/README.md +++ b/3d-generation-pipeline/README.md @@ -5,9 +5,6 @@ * peenikesemad kiired * mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse * mustad kiired on halvasti nähtavad pruuni materjali taustal -* speech-to-text: - * vana tekst ei kao ära - * kogu tekst muutub ootamatult "Silence"-iks * archery range: * kui midagi laeb (wire aktiivne), siis particle'id võiks voolata mööda toru * highscore json tühjaks diff --git a/Assets/_PROJECT/Scripts/ModeGeneration/ArcheryRange/MicrophoneStand.cs b/Assets/_PROJECT/Scripts/ModeGeneration/ArcheryRange/MicrophoneStand.cs index d30fde93..64313d31 100644 --- a/Assets/_PROJECT/Scripts/ModeGeneration/ArcheryRange/MicrophoneStand.cs +++ b/Assets/_PROJECT/Scripts/ModeGeneration/ArcheryRange/MicrophoneStand.cs @@ -31,8 +31,8 @@ public class MicrophoneStand : MonoBehaviour if (controller != null || other.gameObject.tag == "Player Head") { - fmodWhisperBridge.OnWhisperSegmentUpdated += OnWhisperResult; - fmodWhisperBridge.OnWhisperSegmentFinished += OnWhisperResult; + fmodWhisperBridge.OnWhisperSegmentUpdated += OnPlayerSpeech; + fmodWhisperBridge.OnWhisperSegmentFinished += OnPlayerSpeech; microphoneOffStatus.SetActive(false); microphoneOnStatus.SetActive(true); @@ -50,8 +50,8 @@ public class MicrophoneStand : MonoBehaviour KbmController controller = other.GetComponent(); if (controller != null | other.gameObject.tag == "Player Head") { - fmodWhisperBridge.OnWhisperSegmentUpdated -= OnWhisperResult; - fmodWhisperBridge.OnWhisperSegmentFinished -= OnWhisperResult; + fmodWhisperBridge.OnWhisperSegmentUpdated -= OnPlayerSpeech; + fmodWhisperBridge.OnWhisperSegmentFinished -= OnPlayerSpeech; microphoneOffStatus.SetActive(true); microphoneOnStatus.SetActive(false); @@ -64,13 +64,13 @@ public class MicrophoneStand : MonoBehaviour } } - private void OnWhisperResult(string result) + private void OnPlayerSpeech(string text) { - if (string.IsNullOrEmpty(result) || result.Equals("BLANK_AUDIO")) + if (string.IsNullOrEmpty(text) || text.Contains("BLANK_AUDIO")) { return; } - outputText.text = result; + outputText.text = text; } public string GetTextOutput()