Interface ISpeechIntensityEffectBuilder
interface ISpeechIntensityEffectBuilder
Extends com.amazon.apmf.IStandard
SpeechIntensity Effect is a high-level API that allows application to enable speech intensity
computation on mic audio samples captured during speech recognition use case and query the
normalized intensity values periodically which can be used to display listening animation
to the end user. The application can create this effect successfully only when the speech
recognition use case is active.
The life cycle of this effect will be tied to the speech recognition use case.
Methods
sessionId()
Set session ID of the record stream to compute speech intensity. Optional. Client shall pass a valid session ID from a record stream on which the intensity levels are to be computed. If not called, audio effect will be applied on a voice recognition record stream.ISpeechIntensityEffectBuilder*sessionId(i32sessionId)
Parameters
sessionId
i32 — Required
unique sessionId of the stream on which the effect to be applied
Returns
ISpeechIntensityEffectBuilder*
pointer to effect builder object
effectDescriptor()
Set effect descriptor Optional. Only useful when the platform supports speech intensity effect from two different vendors. It allows to specify the vendor uuid in the effect descriptor to use corresponding implementation. If not specified, the OS will pick up the effect implementation.ISpeechIntensityEffectBuilder*effectDescriptor(EffectDescriptor*effectDescriptor)
Parameters
effectDescriptor
EffectDescriptor* — Required
pointer to the effect descriptor
Returns
ISpeechIntensityEffectBuilder*
pointer to effect builder object
speechIntensitySettings()
Set speech intensity algorithm settings Optional. If this api not called, the effect will apply default settings. Client can query the applied settings using getSpeechIntensitySettings api.ISpeechIntensityEffectBuilder*speechIntensitySettings(SpeechIntensitySettings*settings)
Parameters
settings
SpeechIntensitySettings* — Required
to be used by th algorithm
Returns
ISpeechIntensityEffectBuilder*
pointer to the effect builder object
build()
Build Speech Intensity effect object If the client is not a system service, it needs the mic audio permission, “com.amazon.audio.privilege.microphone.access” as the intensity is computed from the actual mic audio samples.ISpeechIntensity*build()
Returns
ISpeechIntensity*
pointer to the effect object
Throws
InvalidArgumentError— if the specified settings are not supportedInvalidOperationError— if the platform does not support the effectSecurityError— if called without necessary privileges

