public class AnsConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private Constants.AnsModelType |
ansModelType
The ANS Model Type.
|
private boolean |
enabled
Whether to enable ANS.
|
private int |
speechProtectThreshold
The ANS speech protect threshold, which is used when
possibly speech damage happened by ANS.
|
private Constants.AnsSuppressionMode |
suppressionMode
The ANS noise suppression mode.
|
| Constructor and Description |
|---|
AnsConfig() |
AnsConfig(boolean enabled,
Constants.AnsSuppressionMode suppressionMode,
Constants.AnsModelType ansModelType,
int speechProtectThreshold)
Constructs an AnsConfig object.
|
| Modifier and Type | Method and Description |
|---|---|
Constants.AnsModelType |
getAnsModelType()
Gets the ANS model type.
|
int |
getSpeechProtectThreshold()
Gets the ANS speech protect threshold.
|
Constants.AnsSuppressionMode |
getSuppressionMode()
Gets the ANS noise suppression mode.
|
boolean |
isEnabled()
Checks if ANS is enabled.
|
void |
setAnsModelType(Constants.AnsModelType ansModelType)
Sets the ANS model type.
|
void |
setEnabled(boolean enabled)
Sets whether to enable ANS.
|
void |
setSpeechProtectThreshold(int speechProtectThreshold)
Sets the ANS speech protect threshold.
|
void |
setSuppressionMode(Constants.AnsSuppressionMode suppressionMode)
Sets the ANS noise suppression mode.
|
java.lang.String |
toString() |
private boolean enabled
private Constants.AnsSuppressionMode suppressionMode
Constants.AnsSuppressionMode.private Constants.AnsModelType ansModelType
Constants.AnsModelType.private int speechProtectThreshold
public AnsConfig()
public AnsConfig(boolean enabled,
Constants.AnsSuppressionMode suppressionMode,
Constants.AnsModelType ansModelType,
int speechProtectThreshold)
enabled - Whether to enable ANS. true to enable,
false to disable (default).suppressionMode - The ANS noise suppression mode. See
Constants.AnsSuppressionMode.ansModelType - The ANS model type. See
Constants.AnsModelType.speechProtectThreshold - The ANS speech protect threshold. Value range:
[0, 100]. Default: 100. Recommended: 50 for
speech protection.public boolean isEnabled()
true if ANS is enabled, false otherwise.public void setEnabled(boolean enabled)
enabled - true to enable ANS, false to disable.public Constants.AnsSuppressionMode getSuppressionMode()
Constants.AnsSuppressionMode.public void setSuppressionMode(Constants.AnsSuppressionMode suppressionMode)
suppressionMode - The suppression mode. See
Constants.AnsSuppressionMode.public Constants.AnsModelType getAnsModelType()
Constants.AnsModelType.public void setAnsModelType(Constants.AnsModelType ansModelType)
ansModelType - The ANS model type. See Constants.AnsModelType.public int getSpeechProtectThreshold()
public void setSpeechProtectThreshold(int speechProtectThreshold)
speechProtectThreshold - The speech protect threshold. Value range: [0,
100].public java.lang.String toString()
toString in class java.lang.Object