Package com.bandwidth.sdk.model
Class MachineDetectionConfiguration
java.lang.Object
com.bandwidth.sdk.model.MachineDetectionConfiguration
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.6.0")
public class MachineDetectionConfiguration
extends Object
The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallbackMethod
(CallbackMethodEnum callbackMethod) callbackUrl
(URI callbackUrl) delayResult
(Boolean delayResult) detectionTimeout
(Double detectionTimeout) boolean
fallbackMethod
(CallbackMethodEnum fallbackMethod) fallbackPassword
(String fallbackPassword) fallbackUrl
(URI fallbackUrl) fallbackUsername
(String fallbackUsername) Create an instance of MachineDetectionConfiguration given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Get callbackMethodThe URL to send the 'machineDetectionComplete' webhook when the detection is completed.If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded.The timeout used for the whole operation, in seconds.Get fallbackMethodBasic auth password.A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respondBasic auth username.When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing.getMode()
Get modeBasic auth password.If no speech is detected in this period, a callback with a 'silence' result is sent.Amount of silence (in seconds) before assuming the callee has finished speaking.When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration.Basic auth username.int
hashCode()
machineSpeechEndThreshold
(Double machineSpeechEndThreshold) mode
(MachineDetectionModeEnum mode) putAdditionalProperty
(String key, Object value) Set the additional (undeclared) property with the specified name and value.void
setCallbackMethod
(CallbackMethodEnum callbackMethod) void
setCallbackUrl
(URI callbackUrl) void
setDelayResult
(Boolean delayResult) void
setDetectionTimeout
(Double detectionTimeout) void
setFallbackMethod
(CallbackMethodEnum fallbackMethod) void
setFallbackPassword
(String fallbackPassword) void
setFallbackUrl
(URI fallbackUrl) void
setFallbackUsername
(String fallbackUsername) void
setMachineSpeechEndThreshold
(Double machineSpeechEndThreshold) void
void
setPassword
(String password) void
setSilenceTimeout
(Double silenceTimeout) void
setSpeechEndThreshold
(Double speechEndThreshold) void
setSpeechThreshold
(Double speechThreshold) void
setUsername
(String username) silenceTimeout
(Double silenceTimeout) speechEndThreshold
(Double speechEndThreshold) speechThreshold
(Double speechThreshold) toJson()
Convert an instance of MachineDetectionConfiguration to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_MODE
- See Also:
-
SERIALIZED_NAME_DETECTION_TIMEOUT
- See Also:
-
SERIALIZED_NAME_SILENCE_TIMEOUT
- See Also:
-
SERIALIZED_NAME_SPEECH_THRESHOLD
- See Also:
-
SERIALIZED_NAME_SPEECH_END_THRESHOLD
- See Also:
-
SERIALIZED_NAME_MACHINE_SPEECH_END_THRESHOLD
- See Also:
-
SERIALIZED_NAME_DELAY_RESULT
- See Also:
-
SERIALIZED_NAME_CALLBACK_URL
- See Also:
-
SERIALIZED_NAME_CALLBACK_METHOD
- See Also:
-
SERIALIZED_NAME_USERNAME
- See Also:
-
SERIALIZED_NAME_PASSWORD
- See Also:
-
SERIALIZED_NAME_FALLBACK_URL
- See Also:
-
SERIALIZED_NAME_FALLBACK_METHOD
- See Also:
-
SERIALIZED_NAME_FALLBACK_USERNAME
- See Also:
-
SERIALIZED_NAME_FALLBACK_PASSWORD
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
MachineDetectionConfiguration
public MachineDetectionConfiguration()
-
-
Method Details
-
mode
-
getMode
Get mode- Returns:
- mode
-
setMode
-
detectionTimeout
-
getDetectionTimeout
The timeout used for the whole operation, in seconds. If no result is determined in this period, a callback with a `timeout` result is sent.- Returns:
- detectionTimeout
-
setDetectionTimeout
-
silenceTimeout
-
getSilenceTimeout
If no speech is detected in this period, a callback with a 'silence' result is sent.- Returns:
- silenceTimeout
-
setSilenceTimeout
-
speechThreshold
-
getSpeechThreshold
When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be 'answering-machine'. If the length of speech detected is below this threshold, the result will be 'human'.- Returns:
- speechThreshold
-
setSpeechThreshold
-
speechEndThreshold
-
getSpeechEndThreshold
Amount of silence (in seconds) before assuming the callee has finished speaking.- Returns:
- speechEndThreshold
-
setSpeechEndThreshold
-
machineSpeechEndThreshold
-
getMachineSpeechEndThreshold
When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value.- Returns:
- machineSpeechEndThreshold
-
setMachineSpeechEndThreshold
-
delayResult
-
getDelayResult
If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded. If false, the 'answering-machine' result is sent immediately.- Returns:
- delayResult
-
setDelayResult
-
callbackUrl
-
getCallbackUrl
The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode.- Returns:
- callbackUrl
-
setCallbackUrl
-
callbackMethod
-
getCallbackMethod
Get callbackMethod- Returns:
- callbackMethod
-
setCallbackMethod
-
username
-
getUsername
Basic auth username.- Returns:
- username
-
setUsername
-
password
-
getPassword
Basic auth password.- Returns:
- password
-
setPassword
-
fallbackUrl
-
getFallbackUrl
A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond- Returns:
- fallbackUrl
-
setFallbackUrl
-
fallbackMethod
-
getFallbackMethod
Get fallbackMethod- Returns:
- fallbackMethod
-
setFallbackMethod
-
fallbackUsername
-
getFallbackUsername
Basic auth username.- Returns:
- fallbackUsername
-
setFallbackUsername
-
fallbackPassword
-
getFallbackPassword
Basic auth password.- Returns:
- fallbackPassword
-
setFallbackPassword
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key
- name of the propertyvalue
- value of the property- Returns:
- the MachineDetectionConfiguration instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key
- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to MachineDetectionConfiguration
-
fromJson
Create an instance of MachineDetectionConfiguration given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of MachineDetectionConfiguration
- Throws:
IOException
- if the JSON string is invalid with respect to MachineDetectionConfiguration
-
toJson
Convert an instance of MachineDetectionConfiguration to an JSON string- Returns:
- JSON string
-