CORE
The frequencies are as follow:
- 0: Never
- 5: 10 times per second
- 10: 50 times per second
- 50: 100 times per second
- 100: On participant state change (this is the default)
req->participant_property_frequency = 10;
UNREAL
To set how often the SDK raises IChannelSession::EventAfterParticipantUpdated events that relate to speaking activity, you will need to use the SetParticipantSpeakingUpdateRate function.
By default, the Vivox SDK supports a simple speaking/not-speaking indicator for channel participants; for this use case, keeping the default value of ParticipantSpeakingUpdateRate::StateChange is sufficient. If you want to create a dynamic voice activity indicator or other real-time visual representation of audio energy levels, supply this function with a ParticipantSpeakingUpdateRate value of Update1Hz, Update5Hz, or Update10Hz for updates of up to 1, 5, or 10 times per second as audio energy and other participant properties change.
Important: Setting a ParticipantSpeakingUpdateRate of any per second rate will necessarily increase network traffic between the application and the Vivox servers.
LoginSession->SetParticipantSpeakingUpdateRate(ParticipantSpeakingUpdateRate::Update5Hz);
- ParticipantSpeakingUpdateRate::StateChange
- ParticipantSpeakingUpdateRate::Never
- ParticipantSpeakingUpdateRate::Update1Hz
- ParticipantSpeakingUpdateRate::Update5Hz
- ParticipantSpeakingUpdateRate::Update10Hz
UNITY
By default, the Vivox SDK supports a simple speaking/not-speaking indicator for channel participants; for this use case, keeping the default value of ParticipantPropertyUpdateFrequency.StateChange is sufficient. If you want to create a dynamic voice activity indicator or other real-time visual representation of audio energy levels, supply this function with a ParticipantPropertyUpdateFrequency value of Update1Hz, Update5Hz, or Update10Hz for updates of up to 1, 5, or 10 times per second as audio energy and other participant properties change.
var ar = LoginSession.BeginAccountSetLoginProperties(ParticipantPropertyUpdateFrequency.Update10Hz, result =>
{
try
{
Debug.Log("EndAccountSetLoginProperties");
LoginSession.EndAccountSetLoginProperties(result);
}
catch (System.Exception e)
{
// HANDLE ERROR
return;
}
Debug.Log("post current freq:" + LoginSession.ParticipantPropertyFrequency);
});
The rest of the BeginAccountSetLoginProperties options are as follows:
- ParticipantPropertyUpdateFrequency.StateChange
- ParticipantPropertyUpdateFrequency.Update00Hz
- ParticipantPropertyUpdateFrequency.Update01Hz
- ParticipantPropertyUpdateFrequency.Update05Hz
- ParticipantPropertyUpdateFrequency.Update10Hz