#Getting audio level from Vivox voice chat library unsuccessful

1 messages · Page 1 of 1 (latest)

umbral bane
#

I tried to get the audio level using the Vivox library which provides voice chat functionality, but I was unable to get any values.

In the sample code of Vivox, I added the following code in VivoxVoiceManager.cs to constantly monitor the value, but it did not change:

private void Update()
{
    VivoxLogError($"Voice Level: {AudioInputDevices.DeviceEnergy}");
}

How can I make this variable functional?


Here is the English translation for the additional code snippet:

ChannelSession.Participants.AfterValueUpdated += OnParticipantValueUpdated;

This allows me to get the audio level, but the interval for getting the value seems long. I want to get the value at as short an interval as possible.

stray adder
#

Hi, to confirm are you trying to do something along the lines of dynamically showing to a player what volume other players are speaking at?
This knowledge base article may have what you're looking for. It covers how to change the update frequency to decrease the interval up to 10Hz. I'm also checking in with another member of the team once he signs on for the day to make sure that v16 hasn't introduced a newer way to handle that.
https://support.unity.com/hc/en-us/articles/4826715847572-Vivox-How-do-I-change-the-participant-property-frequency-

graceful plinth
#

You can quickly do this by added a LoginOption for example: LoginOptions.ParticipantUpdateFrequency to something like ParticipantPropertyUpdateFrequency.FivePerSecond

umbral bane
#

Thank you very much. I will try it!

umbral bane