1
0
forked from cgvr/DeltaVR

mic stand doesnt show BLANK_AUDIO

This commit is contained in:
2026-01-29 17:40:05 +02:00
parent 61a81d2728
commit ceee57f808
2 changed files with 7 additions and 10 deletions

View File

@@ -5,9 +5,6 @@
* peenikesemad kiired * peenikesemad kiired
* mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse * mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse
* mustad kiired on halvasti nähtavad pruuni materjali taustal * 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: * archery range:
* kui midagi laeb (wire aktiivne), siis particle'id võiks voolata mööda toru * kui midagi laeb (wire aktiivne), siis particle'id võiks voolata mööda toru
* highscore json tühjaks * highscore json tühjaks

View File

@@ -31,8 +31,8 @@ public class MicrophoneStand : MonoBehaviour
if (controller != null || other.gameObject.tag == "Player Head") if (controller != null || other.gameObject.tag == "Player Head")
{ {
fmodWhisperBridge.OnWhisperSegmentUpdated += OnWhisperResult; fmodWhisperBridge.OnWhisperSegmentUpdated += OnPlayerSpeech;
fmodWhisperBridge.OnWhisperSegmentFinished += OnWhisperResult; fmodWhisperBridge.OnWhisperSegmentFinished += OnPlayerSpeech;
microphoneOffStatus.SetActive(false); microphoneOffStatus.SetActive(false);
microphoneOnStatus.SetActive(true); microphoneOnStatus.SetActive(true);
@@ -50,8 +50,8 @@ public class MicrophoneStand : MonoBehaviour
KbmController controller = other.GetComponent<KbmController>(); KbmController controller = other.GetComponent<KbmController>();
if (controller != null | other.gameObject.tag == "Player Head") if (controller != null | other.gameObject.tag == "Player Head")
{ {
fmodWhisperBridge.OnWhisperSegmentUpdated -= OnWhisperResult; fmodWhisperBridge.OnWhisperSegmentUpdated -= OnPlayerSpeech;
fmodWhisperBridge.OnWhisperSegmentFinished -= OnWhisperResult; fmodWhisperBridge.OnWhisperSegmentFinished -= OnPlayerSpeech;
microphoneOffStatus.SetActive(true); microphoneOffStatus.SetActive(true);
microphoneOnStatus.SetActive(false); 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; return;
} }
outputText.text = result; outputText.text = text;
} }
public string GetTextOutput() public string GetTextOutput()