forked from cgvr/DeltaVR
mic stand doesnt show BLANK_AUDIO
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user