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

@@ -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<KbmController>();
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()