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