mod_stress attempts to detect stress in a person's voice and generates FreeSWITCH events based on that data.
How does this work?
The module uses FFT to calculate the power spectrum of the call. It then attempts to recognise patterns that may imply stress. For example a strong tremor or volume.
Please note that this will be highly unreliable, generating many false positives/negatives.
The stress app attaches hooks to the channel to listen to the media in one direction.
The read parameter (default) listens for stress on the caller's direction, write for stress on the callee's direction and stop removes any previously attached hooks.
CLI / ESL
The dialplan app can also be invoked on a channel from the console or via ESL (eg fs_cli):
When stress is detected this event is fired. Note both Event-Name and Speech-Type, other modules will raise DETECTED_SPEECH but with a different Speech-Type. Example:
If you whistle into your phone you should see the following messages (example):
This will confirm the module is listening to speech on the line.