[Released] Dissonance: Unity Voice Chat

Thanks for the heads up! I’ll add a note to the Dissonance documentation about that right now and I’ll see about somehow integrating it into Dissonance for the next release.

Hi rosssssss, You need to add an input axis with the correct name (GlobalChat) and set it to whatever key you want to be the Push-To-Talk key. Here are the settings I use:

4831598--463778--Unity_2019-08-07_15-51-20.png

Ah thanks - had just seen the warning info in Broadcast-Trigger and deleted my post… but that’s useful anyway

1 Like

Hello I’m trying to follow this https://dissonance.readthedocs.io/en/latest/Tutorials/Position-Tracking/index.html - for positional audio and I’m using Forge but I don’t have a ForgePlayer.cs in my import as it seems to suggest I should. The demo scene appears to do this a different way, setting up and RPC which transmits the playerId. Ummm should I have that file or are those docs out of date? Thanks!
(p.s. what i’m actually trying to do is identify which player is speaking so that i can do lip sync (not salsa for now.) )

Sorry those docs are out of date, I’ll go and update them now.

We no longer support the old Forge Networking. For Forge Networking Remastered there is no built in ForgePlayer, you need to implement it yourself - this is because you’ll probably need to modify the contract on your player gameObject to synchronise the player tracking info and obviously we can’t ship a prebuilt version of that.

Check out the docs on Custom Position Tracking for help on how to do that. it’s pretty simple - you just need to make sure that the Dissonance player ID is sychronised across all players in the session (so Dissonance knows which object represents which speaker).

1 Like

Hello again! I’ve managed to cause another problem here. I’ve been trying to get lip syncing working - not using Salsa. The way i attempted to go about it is: When the SetPlayerId RPC comes through on a network player, I then look for that player under the DissonanceComms object. Upon finding the player gameobject (with the VoicePlayback and AudioSource components on it) I added a component to it which implemented OnAudioFilterRead(…) and then sent that info on to my lip-sync code. This worked perfectly for lip-syncing but muted all the audio. I can still see the audio coming through (on VoicePlayback and SamplePlayback) but don’t hear anythiing and there are loads of warning messages.
I guess there’s a better way to do this… Any clues? I’m using the Oculus lip sync library and it seems to need that OnAudioFilterRead info from the AudioSource… Thanks

1 Like

That sounds like a reasonable approach to lip syncing. What are the warnings you’re receiving?

I think the problem might have been related to the fact that when you have multiple OnAudioFilterRead on the same AudioSource the second one gets the result of whatever processing the first one has done on the data… i changed it to use a copy of the data for the lip-reading and it started working :slight_smile:

I think the warnings were along these lines…
[Dissonance:Recording] (14:24:47.246) BasicMicrophoneCapture: Insufficient buffer space, requested 33957, clamped to 16383 (dropping samples)

[Dissonance:Recording] (14:24:47.248) BasePreprocessingPipeline: Lost 255 samples in the preprocessor (buffer full), injecting silence to compensate

Ah yes that’s definitely something you need to be careful with.

This means that the microphone hardware delivered xxx samples within a single frame which is more than the buffer size (yyy). It depends on exactly what the sample rate is (which depends on your mic hardware), but if we assume 48kHz that’s 700ms of audio delivered in one frame!

This is another artifact of the problem above. A large amount of audio is delivered all at once, overflowing the preprocessor input buffer so some audio is discarded to make space.

Both of these problems are related to bad frame rates which cause a lot of audio to be delivered all at once (well beyond the bounds of sensible real-time audio). If this only happens once or twice it’s not a problem (often there can be big frame rate stutters when you’re loading the scene).

Have these warnings been resolved?

Hello again. Thanks yes, i think actually that the lip syncing stuff is now all good! It’s working very well when the audio is working.
I have one other issue that has cropped up in the meantime though. It seems like the audio doesn’t work at all just with one particular machine. When I host and connect to his machine there’s silence in both directions (though the rest of the networking works fine.) (We’re running windows exes) but if I connect to other machines it all works.
He attempted to install the redist but the system said that he already had it on there.
When he runs the exe he gets a load of warnings from Dissonance - at first they say “Decoder Pipeline: Failed to write an encoded audio packet into the input transfer buffer” and then after a while they say “Encoded Audio Error: Voice Error: Encoded Audio heap is getting very large (140 items.)”… any clues? Is it that maybe he has the wrong version of the redist? thanks.

2 Likes

Could you try just calling DissonanceComms.TestDependencies in another otherwise empty scene (no need to set up any of Dissonance). This will attempt to load the dependencies and will throw an exception if it fails (DllNotFoundException). That will at least tell us if this is some kind of dependency problem (like an incorrect/broken redist installation).

Are you using the latest version of Dissonance? In theory it’s meant to catch dependency errors and disable the audio pipelines (so you still have no audio, but you also have no error spam).

Hey thanks. I was on 6.4…1 - just updated to 6.4.2 and made an empty project, added Dissonance Voice and called the TestdDependencies function.
Should that DLLNotFoundException show up on the exe? He runs it and nothing at all happens. It’s just the basic Unity skybox. Nothing in the debug console. Is there a log file somewhere i can look at?

If you have an uncaught exception it will usually show up in the debug console. You could try something like this just to be sure. Check this page for details on where to find log files.

Thanks. Another clue. The first time we do this test it works perfectly on his machine. We stop the app and run it again and from that point on it never works. No sound in either direction. On his machine - on the second run we were seeing memory leak warnings…? I’m going to try with your demo scene to see if that works, maybe it’s the oculus lip sync libraries causing some obscure issue.

That’s very odd, Dissonance doesn’t carry anything over from one run to the next so that sounds very much like some kind of external issue although I can’t imagine what. Try running without the Oculus lip sync, at least if that resolves the issue we know that’s causing the problems somehow.

Could you get turn up the log level in Dissonance (Window > Dissonance > Diagnostics) to Debug for all categories and mail them to me (martin@placeholder-software.co.uk), I’ll see if I can spot anything.

Hello
I am using dissonance voice chat in my game but during voice chat there is echo on one end. I can’t seem to figure out the problem. Please help!

Thank you

1 Like

Hi humna365,

Have you tried setting up Acoustic Echo Cancellation? This should automatically cancel out most echo. It takes a few seconds to get started, so make sure to speak for ~30sin your tests to make sure you give it time to work.

Another thing to try it to reduce the Audio Duck Attenuation down to a much lower value - try 0.25. This automatically reduces the volume of incoming voices when you start sending voice, which can help a lot. Even if you have set up AEC it is still worth reducing ADA although to a slightly less aggressive value - try 0.5.

Where do i find the logs to send to you? I’m running from a windows .exe

1 Like

Hello again… if you meant the player log… i have one… i’ve misplaced your email to send it to! can you give it again please - sorry.
what i can see in it on the dissonance side is a lot of these errors
[Dissonance:Playback] (14:59:30.607) SpeechSession: Beginning playback with very large network jitter: 0.8780782s 1confidence
EncodedAudioBuffer: Voice Error: Received a very late packet (35 packets late)! Error ID: 30EF1B03-7BBC-49D3-A23E-6E84781FF29F
It’s a VR project if that’s any help… which i think is running in frame…
in this case we were getting some audio through but it was very squeaky and kept dropping out…
thanks

1 Like

Ah hi… oops! those last posts that appear to be from Ifi were actually from me.

1 Like