Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

SpVoice VisemeEvent in Unity 5

$
0
0
Hi, i need to know when a viseme event occour in Unity, i see about the **_ISpeechVoiceEvents_VisemeEventHandler** to call a function every time that the SpVoice object detect a new viseme, but when i run the test Unity just crash. I'm using **Interop.SpeechLib** i swa that some functions like *GetVoices()* can crash the Unity but with the *CustomMarshalers* that was slove, but it still crashing when use the viseme handler void Start(){ voice = new SpVoice(); voice.Viseme += new _ISpeechVoiceEvents_VisemeEventHandler(voice_Viseme); voice.Speak("Hello World", SpeechVoiceSpeakFlags.SVSFlagsAsync); } // Update is called once per frame void Update() { } void voice_Viseme(int StreamNo, object StreamPos, int duration, SpeechLib.SpeechVisemeType nextVisemetype, SpeechLib.SpeechVisemeFeature visemeFeature, SpeechLib.SpeechVisemeType currentVisemetype) { int i = int.Parse(currentVisemetype.ToString().Replace("SVP_", "")); print(currentVisemetype.ToString().Replace("SVP_", "")); print(visemeFeature.ToString()); }

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>