[Released] Dissonance: Unity Voice Chat

Dissonance 6.3.0 has been released on the asset store!
It’s been a long time since the last version of Dissonance was released (over two months) and we’ve accumulated a lot of fixes and improvements.

There’s a potential fix for the Android Audio effect Dissonance Echo Cancellation could not be found error (see here for details). We’ve added support for Tiny Frames for ultra low latency LAN only voice chat (useful for shared space VR). We’ve modified the HlapiPlayerTracker to support server authority and have also made a number of small quality-of-life changes around the VoiceBroadcastTrigger Self mode (this one’s for you @Dreamer_1 ;)). There’s also a new IsMuted property on the VoiceBroadcastTrigger, this can be combined with VAD activation to create a UI Push-To-Talk mode for phones/tablets.

That’s just the highlights! Check out the release notes for all the details as usual.

Unity Version Support
We originally developed Dissonance using Unity 5.6 (back when that was the cutting edge) and we’ve automatically supported every new version since then. This has made our release/support process very complicated as there are subtly different rules for binary plugins on all the different target platforms on all the different Unity versions. Dissonance 6.3.0 is the last version which will be released for all the platforms from Unity 5.6 upwards.

In the future we have decided to release new versions of Dissonance for platforms similar to what Unity themselves support. Unity have TECH and LTS releases, the only Unity supported platforms are the LTS ones for two years after release and the latest TECH release. See this blog post for more details. We will support slightly more than this:

  • All supported LTS versions
  • All TECH versions after the latest LTS

That means that if we were to release a new Dissonance version right now it would be submitted to the asset store for:

  • 2017.4 (LTS)
  • 2018.1
  • 2018.2
  • 2018.3 (TECH supported by Unity)
2 Likes

Dissonance 6.3.1 has been released on the asset store!
Dissonance 6.3.1 has two really cool features which have both been driven by requests from users; Mirror Networking integration and Magic Leap support! Check out the full release notes for all the details and to download the integrations.

Mirror Networking
Mirror is a high level networking library designed to be a drop in replacement for the deprecated UNet HLAPI. With this release we’ve included a new Dissonance integration for using Mirror that makes it easy to setup voice chat.

Mirror supports multiple “network backends” which implement the low level details of how packets are sent, by default it uses the Telepathy TCP backend. However TCP is not suitable for voice comms - if you’re using Mirror with Dissonance make sure to swap the backend to one which supports Unreliable packets such as Ignorance.

Huge thanks to BigBoxVR for sponsoring development of this integration!

Magic Leap
Magic Leap One is an incredible Augmented Reality device. We’ve worked with Dissonance users and magic leap engineers to develop and test Dissonance support for Magic Leap One. Thankyou to everyone who was involved in helping to make this happen.

Version Support
As promised last time we’ve now reduced the number of Unity platforms we support. Dissonance 6.3.1 has only been submitted to the asset store for Unity 2017.4 and up.

1 Like

The setup prefab and demo scene are missing from the HLAPI integrations in version 6.3.x ?
(I’m trying to follow the tutorial)

1 Like

Sorry about that @Snorkel , I’m not sure how that happened. Thanks for reporting it!

I’ve uploaded a new integration package which should include all the necessary bits. It’s available here: https://placeholder-software.co.uk/dissonance/integrations/6.3.1/Dissonance-UNet_HLAPI-6.3.1.unitypackage (also available on the latest release notes as usual).

1 Like

Critical Bug In Dissonance 6.4.0
One of the changes we made in Dissonance 6.4.0 was to lazy load the native plugins. This means that platforms that don’t handle voice audio (i.e. dedicated servers) never need to load those dependencies which can make managing your servers easier. However it appears that this change has encountered a bug in Unity - around one time in 10 the native dependencies simply don’t load in player builds which disables all audio processing! This affects all editor versions.

We’ve submitted Dissonance 6.4.1 to the asset store which will fix this, once it is available make sure to update your copy of Dissonance and integration packages.

Before that is released there is a simple workaround you can apply:

  • Open DissonanceComms.cs
  • Find the Start method (line 205)
  • Modify the method so it starts like this:
[UsedImplicitly] private void Start()
{
    // Add this code vvvvv
    try
    {
        TestDependencies();
    }
    catch (Exception e)
    {
        Log.Error("Dependency Error: {0}", e.Message);
    }
    // Add this code ^^^^^

    // rest of the method...

This forces the dependencies to load immediately and appears to work around the Unity bug.

2 Likes

Dissonance 6.4.1 Is Now Available On The Asset Store

This is a critical update! Everyone who is using Dissonance 6.4.0 should update now.

The main change in Dissonance 6.4.1 is to fix the critical issue mentioned above. Unfortunately Unity have not approved the update to the HLAPI integration package yet, so if you’re using that package you will need to apply the workaround mentioned in the previous post.

We’ve also made some other changes to help with profiling Dissonance performance - there’s now a lot of extra detail in the profiler window showing exactly where Dissonance is spending it’s time. This helped us reduce the startup time of Dissonance by about 1ms by moving some of the work to another thread. We also spread the work across two frames so all startup times should be approximately halved.

1 Like

Hello there, well im having problems for run this plugin , its for my boss that want me to install it on his proyect , but i tested and cant see that works coz i cant listen anything , i try with global chat example simple and dosnt work , i saw that the basic microphone behaviour dosnt set the microphone as default itself but i saw it shows the channel 2 of my focusrite card … anyways in the another side have a macbookpro retina with bootcamp and it have mic and works and i cant ear on any of the players … so im going nuts here, we use photon networking example and im here still fighting with this to check if the global chat room thing work, we have like 10 rooms and into each one we have the dissonancesetup object with the stuff , and the trigger and reciever all as default global… any guide ? im searching but cant understand what im doing wrong…

Hi Wothanar

Have you tried simply running Dissonance in an empty project with the Photon demo scene (included in the free photon+Dissonance package)? That should be very simple to setup and will help me debug your problem :slight_smile:

yea, and it works but it only send mic device audio from only one client , and the another one cant speech just listen, why this? also it only appear the green circle over one player why this? and why it dosnt work on my own game i put the stuff it should run the global voice chat stuff…

I assume both clients are using the same build? Could you look at the inspector (for the client which cannot speak) for the BasicMicrophoneCapture component (next to DissonanceComms) when the game is running - does it show an audio level indicator wobbling about (indicating that it is recording audio) when you speak?

Which green circle are you referring to? The demo has a blue ball which pulses when someone speaks, so if you mean that then it won’t appear over one player due to the speech issue you mentioned above.

Does it not work at all in your own game, or is it the same issue with one client unable to speak?

the proyect its very big , and its hard to me test in the same proyect since its seems the problem can be the microphone that i have in the desktop and the echoes it produce here, one that its plug in via focus rite external driver, the mic works fine but i mean your demo dosnt set it at default, it reconize it since it display the dropbox and it says the line 2 of the focus rite where the mic its but, i set it via editor there and i didnt seems to be working so , people with this mic connection system probably will experience this kind of bug? ,what about made a simple global demo for test with out players moving just photon for clients can speak when joins a room globally in a room like a voice chat kind stuff? it can be done? thank for your support and sorry about trouble you

And forget to mention that , in game didnt worked at all , and it took long time me to build proyect on the one i need to put it and well i will give another try but i think i will need a new cheap pc mic for this tests…

That’s why I suggested testing out in a new project which just has Dissonance and Photon imported - we can fix some of your problems more easily in a simpler project using the demo scene which I have built.

Dissonance doesn’t choose a microphone - you can either specify one (with the dropdown in the editor) or if you don’t specify a one it uses whatever the system default is (it’s handled by Microphone.Start). If you’re on windows check Sounds → Recording and see which device is set as the default (it will have a green tick like in the attached screenshot)

That should be very easy to set up (there’s a quick start guide covering most of this here):

  • Create new project

  • Import from the store: Dissonance, Dissonance For Photon, Photon Unity Networking

  • Set up your photon API keys/regions etc

  • Create a new scene called chat_scene

  • Drop in the Assets/Dissonance/Integrations/PhotonUnityNetworking/DissonanceSetup prefab

  • Create a VoiceBroadcastTrigger (to send voice) set it up with:

  • Chat Room: Global

  • Activation Mode: Voice Activation

  • Create VoiceReceiptTrigger (to receive voice) set it up with:

  • Chat Room: Global

Now you just need to create/join a photon network session and launch this scene. It’s voice activated so anything you say should be transmitted.

4588303--427744--rundll32_2019-05-28_15-28-34.png

Screen capture - 59109c0f1c34e931125e88c7f13decf3 - Gyazo this is the green circle you made in your demo that what im talking about, and i have a new default mic headphones 2 pcs, we are testing this in a new empty proyect the one you send us as demo. again the same stuff

Only one character its talking only one blue bubble and i cant see this work on my side my microphone dosnt work on the another client he cant listen to me but i cant listem to her and i have all right i cant see the mic working on the pc its direct connected trought mother board so please check this and tell me whats wrong here?

THIS IS EXACTLY WHAT IVE DONE IN OUR PROYECT FOR TEST IN OUR GAME WHERE WE NEED IT…
But dosnt seems to work at all… no red errors… how can i debug this or fix it please help !

Ah I see, that appears around every player except yourself. It indicates the area around that player which will activate their proximity chat (i.e. if you walk into it, you can hear them).

Again the blue bubble indicates if you are hearing speech from that person - you’ll never see it over your own character (because you never hear your own speech).

When the ball is pulsing (as shown in your gif) did you hear voice then?

It seems like the main problem here is a microphone issue. Could you try the code shown here in a blank scene - this should just play your microphone through your speakers. If that does not work the issue is at a level below Dissonance.

I’m trying to help but I don’t have much to go on at the moment!

after some tweaks on both operative systems seems to be working the last test… i will do the game test now and test if it works there… since its all right with your demo but we need this working on our proyect and out of the box

it worked on game , thank for your help have fun man!.

1 Like

Fantastic, glad I could help :smile:

Requesting Android permissions microphone, you can now use Permisson instead of start/stop recording:

if (!Permission.HasUserAuthorizedPermission(Permission.Microphone))
{
    Permission.RequestUserPermission(Permission.Microphone);
}
2 Likes