Search Unity

Resolved Is there any Noise Cancellation Feature in Vivox?

Discussion in 'Vivox (Voice & Text Chat)' started by Sourabh_PTW, Aug 24, 2022.

Thread Status:
Not open for further replies.
  1. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    Hi, I got the users feedback that they are getting background noise while having Voice Chat in game.
    there is any way to reduce the Background Noise.

    Unity Version - 2021.2.7f1
    Vivox Version - 15.1.170000
    Platform - IOS
     
  2. dylan_unity3d

    dylan_unity3d

    Unity Technologies

    Joined:
    Nov 12, 2019
    Posts:
    78
    Hi, what you are describing is adjustments to our voice activity detection settings. I'd recommend checking out this article Vivox: How to: Access VAD settings.
     
  3. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    Can you share any code snippet because I not getting any lead from the link you shared.
     
  4. dylan_unity3d

    dylan_unity3d

    Unity Technologies

    Joined:
    Nov 12, 2019
    Posts:
    78
    Take a look at the
    Logout
    method in
    LoginSession.cs
    file in your Vivox package. You'll see a new request of type
    vx_req_account_logout_t
    being created, filled in, and then the request issued. You'll want to add a new method to the LoginSession class to handle setting the VAD. In that method, you'll be creating a new
    vx_req_aux_set_vad_properties_t
    object, setting the values to what you want based on the FAQ article, and then issuing the request.

    Here's a quick example to set the Auto VAD, which I'd try first. For more information about the Auto VAD, please see the article I linked previously.
    Code (CSharp):
    1. public void SetAutoVad()
    2. {
    3.     if (_state == LoginState.LoggedIn)
    4.     {
    5.         var request = new vx_req_aux_set_vad_properties_t();
    6.         request.account_handle = _accountHandle;
    7.         request.vad_auto = 1;
    8.         VxClient.Instance.BeginIssueRequest(request, null);
    9.     }
    10. }
     
    MurphyMurph_21 likes this.
  5. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    Thank you, I will try and let you know the result
     
  6. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    @dylan_unity3d Result from Testing

    When 'Mic Sensitivity' values are reduces (1-15) & increased 'Noise Floor' values (15000-20000) - the background noise appeared reduced and only audible when user speaks

    • With default values - the background noise is audible at all times and even when user is not speaking

    • Same is observed with higher 'Mic Sensitivity' values & lower 'Noise Floor' values
    Also a robotic voice can be heard from other users in space
     
  7. dylan_unity3d

    dylan_unity3d

    Unity Technologies

    Joined:
    Nov 12, 2019
    Posts:
    78
    Hello, it sounds like you have found values that work for you.

    You can also try with
    request.vad_auto
    ? This mode take a few seconds to adjust as it gathers data from the audio stream. This allows for it to dynamically adjust itself for different users rather than using a fixed value for all users.

    Does this resolve your issue?
     
  8. Sourabh_PTW

    Sourabh_PTW

    Joined:
    Mar 7, 2022
    Posts:
    33
    Let me put in this way :-

    I am going with request.vad_auto = 0 and allow users to set Mic Sensitivity and Noise floor.

    Noise Occurs (Default Value) - is coming without user speaks.
    Noise Occurs (Some Settings) - is coming when user speaks.

    Also notice Robotic Voice of other users some times.
     
  9. dylan_unity3d

    dylan_unity3d

    Unity Technologies

    Joined:
    Nov 12, 2019
    Posts:
    78
    That sounds fine. The robotic voice should not be related to the VAD. I'll close out this thread.
     
    MurphyMurph_21 likes this.
Thread Status:
Not open for further replies.