Ansariel 2021-06-25 08:18:59 +02:00
commit ea6058baf4
9 changed files with 156 additions and 11 deletions

View File

@ -1 +1 @@
6.4.20
6.4.21

View File

@ -95,9 +95,9 @@
label_ref="Command_HowTo_Label"
tooltip_ref="Command_HowTo_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="how_to"
execute_parameters="guidebook"
is_running_function="Floater.IsOpen"
is_running_parameters="how_to"
is_running_parameters="guidebook"
/>
<command name="inventory"
available_in_toybox="true"

View File

@ -18068,6 +18068,51 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Backup</key>
<integer>0</integer>
</map>
<key>VivoxVadAuto</key>
<map>
<key>Comment</key>
<string>A flag indicating if the automatic VAD is enabled (1) or disabled (0). The individual settings are ignored if the auto-mode is enabled</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VivoxVadHangover</key>
<map>
<key>Comment</key>
<string>The time (in milliseconds) that it takes or the VAD to switch back to silence from speech mode after the last speech frame has been detected</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>2000</integer>
</map>
<key>VivoxVadNoiseFloor</key>
<map>
<key>Comment</key>
<string>A dimensionless value between 0 and 20000 (default 576) that controls the maximum level at which the noise floor may be set at by the VAD's noise tracking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>576</integer>
</map>
<key>VivoxVadSensitivity</key>
<map>
<key>Comment</key>
<string>
A dimensionless value between 0 and 100, indicating the 'sensitivity of the VAD'. Increasing this value corresponds to decreasing the sensitivity of the VAD and 0 is turned off altogether</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>VoiceCallsRejectGroup</key>
<map>
<key>Comment</key>

View File

@ -75,7 +75,7 @@ void LLFloaterHowTo::onOpen(const LLSD& key)
LLFloaterHowTo* LLFloaterHowTo::getInstance()
{
return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("how_to");
return LLFloaterReg::getTypedInstance<LLFloaterHowTo>("guidebook");
}
BOOL LLFloaterHowTo::handleKeyHere(KEY key, MASK mask)

View File

@ -50,8 +50,8 @@ const std::string KEY_URL("floater_url");
const std::string KEY_PARAMS("floater_params");
// Supported floaters
const std::string FLOATER_GUIDEBOOK("guidebook"); // alias for how_to
const std::string FLOATER_HOW_TO("how_to");
const std::string FLOATER_GUIDEBOOK("guidebook");
const std::string FLOATER_HOW_TO("how_to"); // alias for guidebook
const std::string FLOATER_WEB_CONTENT("web_content");
// All arguments are palceholders! Server side will need to add validation first.
@ -163,17 +163,17 @@ bool LLUrlFloaterDispatchHandler::operator()(const LLDispatcher *, const std::st
// only one instance of guidebook can exist at a time, so if this command arrives,
// we need to close previous guidebook then reopen it.
LLFloater* instance = LLFloaterReg::findInstance("how_to");
LLFloater* instance = LLFloaterReg::findInstance("guidebook");
if (instance)
{
instance->closeHostedFloater();
}
LLFloaterReg::toggleInstanceOrBringToFront("how_to", params);
LLFloaterReg::toggleInstanceOrBringToFront("guidebook", params);
if (command_params.isMap())
{
LLFloater* instance = LLFloaterReg::findInstance("how_to");
LLFloater* instance = LLFloaterReg::findInstance("guidebook");
if (command_params.has(KEY_CAN_CLOSE))
{
instance->setCanClose(command_params[KEY_CAN_CLOSE].asBoolean());

View File

@ -448,7 +448,7 @@ void LLViewerFloaterReg::registerFloaters()
//LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>);
LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHowTo>);
LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBigPreview>);

View File

@ -9751,7 +9751,7 @@ class LLToggleHowTo : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
LLFloaterReg::toggleInstanceOrBringToFront("how_to");
LLFloaterReg::toggleInstanceOrBringToFront("guidebook");
return true;
}
};

View File

@ -735,6 +735,21 @@ void LLVivoxVoiceClient::voiceControlCoro()
bool success = startAndConnectSession();
if (success)
{
// enable/disable the automatic VAD and explicitly set the initial values of
// the VAD variables ourselves when it is off - see SL-15072 for more details
// note: we set the other parameters too even if the auto VAD is on which is ok
unsigned int vad_auto = gSavedSettings.getU32("VivoxVadAuto");
unsigned int vad_hangover = gSavedSettings.getU32("VivoxVadHangover");
unsigned int vad_noise_floor = gSavedSettings.getU32("VivoxVadNoiseFloor");
unsigned int vad_sensitivity = gSavedSettings.getU32("VivoxVadSensitivity");
setupVADParams(vad_auto, vad_hangover, vad_noise_floor, vad_sensitivity);
// watch for changes to the VAD settings via Debug Settings UI and act on them accordingly
gSavedSettings.getControl("VivoxVadAuto")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
gSavedSettings.getControl("VivoxVadHangover")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
gSavedSettings.getControl("VivoxVadNoiseFloor")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
gSavedSettings.getControl("VivoxVadSensitivity")->getSignal()->connect(boost::bind(&LLVivoxVoiceClient::onVADSettingsChange, this));
if (mTuningMode)
{
performMicTuning();
@ -3340,6 +3355,73 @@ void LLVivoxVoiceClient::sendLocalAudioUpdates()
}
}
/**
* Because of the recurring voice cutout issues (SL-15072) we are going to try
* to disable the automatic VAD (Voice Activity Detection) and set the associated
* parameters directly. We will expose them via Debug Settings and that should
* let us iterate on a collection of values that work for us. Hopefully!
*
* From the VIVOX Docs:
*
* VadAuto: A flag indicating if the automatic VAD is enabled (1) or disabled (0)
*
* VadHangover: The time (in milliseconds) that it takes
* for the VAD to switch back to silence from speech mode after the last speech
* frame has been detected.
*
* VadNoiseFloor: A dimensionless value between 0 and
* 20000 (default 576) that controls the maximum level at which the noise floor
* may be set at by the VAD's noise tracking. Too low of a value will make noise
* tracking ineffective (A value of 0 disables noise tracking and the VAD then
* relies purely on the sensitivity property). Too high of a value will make
* long speech classifiable as noise.
*
* VadSensitivity: A dimensionless value between 0 and
* 100, indicating the 'sensitivity of the VAD'. Increasing this value corresponds
* to decreasing the sensitivity of the VAD (i.e. '0' is most sensitive,
* while 100 is 'least sensitive')
*/
void LLVivoxVoiceClient::setupVADParams(unsigned int vad_auto,
unsigned int vad_hangover,
unsigned int vad_noise_floor,
unsigned int vad_sensitivity)
{
std::ostringstream stream;
LL_INFOS("Voice") << "Setting the automatic VAD to "
<< (vad_auto ? "True" : "False")
<< " and discrete values to"
<< " VadHangover = " << vad_hangover
<< ", VadSensitivity = " << vad_sensitivity
<< ", VadNoiseFloor = " << vad_noise_floor
<< LL_ENDL;
// Create a request to set the VAD parameters:
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetVadProperties.1\">"
<< "<VadAuto>" << vad_auto << "</VadAuto>"
<< "<VadHangover>" << vad_hangover << "</VadHangover>"
<< "<VadSensitivity>" << vad_sensitivity << "</VadSensitivity>"
<< "<VadNoiseFloor>" << vad_noise_floor << "</VadNoiseFloor>"
<< "</Request>\n\n\n";
if (!stream.str().empty())
{
writeString(stream.str());
}
}
void LLVivoxVoiceClient::onVADSettingsChange()
{
// pick up the VAD variables (one of which was changed)
unsigned int vad_auto = gSavedSettings.getU32("VivoxVadAuto");
unsigned int vad_hangover = gSavedSettings.getU32("VivoxVadHangover");
unsigned int vad_noise_floor = gSavedSettings.getU32("VivoxVadNoiseFloor");
unsigned int vad_sensitivity = gSavedSettings.getU32("VivoxVadSensitivity");
// build a VAD params change request and send it to SLVoice
setupVADParams(vad_auto, vad_hangover, vad_noise_floor, vad_sensitivity);
}
/////////////////////////////
// Response/Event handlers
@ -7730,6 +7812,18 @@ void LLVivoxProtocolParser::processResponse(std::string tag)
{
LLVivoxVoiceClient::getInstance()->accountGetTemplateFontsResponse(statusCode, statusString);
}
else if (!stricmp(actionCstr, "Aux.SetVadProperties.1"))
{
// both values of statusCode (old and more recent) indicate valid requests
if (statusCode != 0 && statusCode != 200)
{
LL_WARNS("Voice") << "Aux.SetVadProperties.1 request failed: "
<< "statusCode: " << statusCode
<< " and "
<< "statusString: " << statusString
<< LL_ENDL;
}
}
/*
else if (!stricmp(actionCstr, "Account.ChannelGetList.1"))
{

View File

@ -482,6 +482,12 @@ protected:
void muteListChanged();
/////////////////////////////
// VAD changes
// disable auto-VAD and configure VAD parameters explicitly
void setupVADParams(unsigned int vad_auto, unsigned int vad_hangover, unsigned int vad_noise_floor, unsigned int vad_sensitivity);
void onVADSettingsChange();
/////////////////////////////
// Sending updates of current state
void updatePosition(void);