-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very delayed voice using UWP and HLapi #104
Comments
Could you send me a log from both of the clients involved in the non-working session with the settings all set to |
[diss.zip](https://github.com/Placeholder-Software/Dissonance/files/2177750/diss.zip Thank you for your quick response. I have started the desktop as separate client, the uwp version in the Editor |
Did you have the chance to look at the logs yet? Any suggestion what we can try? |
Not yet sorry, I was prebooked to be doing other things the last two days. I'm going to have a look at them now :) |
No problem at all, just curious. |
The The So the problem is obvious, however there is no indication of what the root cause is. All of these things look like artefacts of dreadful performance across the board - not just on the Unity main thread but also the background preprocessing thread and the background audio thread. I'm a little confused by this since you say that running two of these desktop clients is perfectly fine and the problem only manifests when one of them is running UWP. However there are two
|
diss.zip
Only the first works ok. The others delay, or the sound seems even deformed. The second is similar in what I send earlier. For some reason the log seems cleaner to me now. Add.: The deformed sound seems to be only in debug mode from Visual Studio. In release mode it seems I am getting a better response, but parts of what I say is not transmitted (I have updated the server now also to 6.2.3). |
This looks like it's caused by poor performance again, for example one of these logs (
These are the microphone trying to read data and discarding most of it because there's too much data. Dissonance reads all of the microphone data every frame - so the second message means that from one frame to the next 148,068 samples of data were sampled by the microphone, that's 3.08 seconds of audio (which is approximately the difference in timestamps between these logs). Do you have very long frame times? Perhaps just a few very long frames during loading? |
I am sending you a Unity test project over wetransfer with how I have implemented Dissonance at the client. Although it perform better than within our app, I notice here also that when I continue to speak in the UWP client, the sound starts to fail. I am not sure if you have the equipment to reproduce it (I use the MR HMD and portal), but it might show some things I'm implementing the wrong way. I'll check the frames. |
The framerate usually stays above 60fps. When loading a new website it goes to 15 fps for a short time. It doesn't seem to get really out of range when the delay in sound response starts to happen. |
It's more to do with the worst case frame time. If a single frame is 500ms, and then the rest are all 9ms that's 60fps but that one frame will have some bad side effects. Anyway I had a look through the project and ran it a few times in editor. I don't see anything setup incorrectly on the Dissonance side of things. The first frame or two looks to be a bit long as it's running all kinds of setup stuff but this is expected and Dissonance should handle that (almost every application Dissonance is used in has this kind of first frame spike). General performance after this point was fine (70+fps), obviously that's running on a powerful PC and not a MR headset but I don't think it would be low enough to cause the kind of problems we're seeing. I manually unmuted myself (it looks like a script is muting me, I assume that's intentional?) and spoke a little, I only had one client connected so I couldn't hear it but all the stats indicated that it was running absolutely perfectly sending voice. My suspicion at the moment is that a single bad frame causes the capture system to lose it's mind and resetting it will fix it. Could you try adding in a button which calls |
Thanks for checking the test app. |
Ok that's interesting, that narrows it down a fair bit. Could you try the same again but with a Push-To-Talk button instead of using voice activation? |
Hey! With Push to talk it seems to work fine! |
Aha! I encountered a VAD related voice quality issue the other day. I've logged it on our internal tracker and I'll be working on that next week I expect, I'll keep you informed :) I guess the best workaround might be to use open voice (I hesitate to recommend open voice, because it can be a pretty horrible experience for other listeners). |
I am waiting for support from MS for another issue, so I think I can wait for another week to publish a new release of our app. Thanks for the help so far! |
I must admit I was dreading working on this because the VAD is a very complex bit of C++ code and that's always a nightmare to debug/modify. However, I think I've found the issue and it's actually nothing to do with the VAD itself (yay). The problem seems to have been caused by the faders on the broadcast trigger, they smoothly fade speech out over a short period when you stop talking. The faders start fading in/out when you start/stop talking - however if you stopped talking (start fading out) and then started talking before it hit zero it would not initiate a fade in, it would just stay at the current value. This is particularly exacerbated by VAD which tends to start and stop talking very very quickly. If you find the big if statement around line 286 of
This monitors the fader all the time you are speaking, and initiates a fade in if one hasn't already been started. |
An short test indicates this is indeed the solution. I will do some more testing. |
Although it works much better now, without long silences or very delayed sound, unfortunately there are still sometimes a few words skipped. |
Can you watch closely on the DissonanceComms component at runtime - when there's a missed word does the channel close briefly? If so I would guess this is an issue with the VAD not being quite sensitive enough. |
Oops. I forgot that the UI only shows the channel remote players are speaking through, local channels aren't shown anywhere. I might add that to the inspector for the next release. Keep me informed if any issues come up again. |
Will do. Thanks the great support again! |
Dissonance 6.2.4 went live on the asset store yesterday. That includes the fix to the fader system and should resolve this issue. |
Context
Our app works both on Windows desktop as wel as UWP (Mixed Reality). Dissonance works well on desktop, having only a small and acceptable delay. But when (the client player is) compiled for UWP the delay immediately becomes very large (sometimes like 10 seconds ore more) and unstable.
Expected Behavior
Of course on all platforms good response using the same server
Actual Behavior
See above.
Workaround
none
Fix
please do ;)
Steps to Reproduce
Provide a detailed set of steps to reproduce the problem
3.Compile one of the players as UWP app. Now both the players voices do not respond within reasonable time, and even stop responding
Your Environment
The text was updated successfully, but these errors were encountered: