diff --git a/docs/FreeSWITCH-Explained/Modules/mod_stress_13173230.mdx b/docs/FreeSWITCH-Explained/Modules/mod_stress_13173230.mdx deleted file mode 100644 index 785a3466..00000000 --- a/docs/FreeSWITCH-Explained/Modules/mod_stress_13173230.mdx +++ /dev/null @@ -1,89 +0,0 @@ - -# mod_stress - - - -## About - -mod\_stress attempts to detect stress in a person's voice and generates FreeSWITCH events based on that data. - -Click here to expand Table of Contents - -* 1 [](#stress) -* 2 [How does this work?](#how-does-this-work) -* 3 [Dialplan app](#dialplan-app) - * 3.1 [stress](#stress) -* 4 [CLI / ESL](#stress) - * 4.1 [DETECTED\_SPEECH](#detected_speech) -* 5 [Testing](#testing) - -### - -### How does this work? - -The module uses [FFT](http://en.wikipedia.org/wiki/Fast%5FFourier%5Ftransform) 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. - -### Dialplan app - -#### stress - -The stress app attaches hooks to the channel to listen to the media in one direction. - -```xml - stress [ read | write | stop ] -``` - -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): - -```xml - uuid_broadcast stress::read - uuid_broadcast stress::stop -``` - -Events - -#### DETECTED_SPEECH - -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: - -```xml -Event-Name: DETECTED_SPEECH - Core-UUID: 82054370-3b7c-452d-aade-e77d2eead7fe - FreeSWITCH-Hostname: fs01.telefaks.biz - FreeSWITCH-Switchname: fs01.telefaks.biz - FreeSWITCH-IPv4: 192.168.178.221 - FreeSWITCH-IPv6: %3A%3A1 - Event-Date-Local: 2013-01-22%2023%3A29%3A11 - Event-Date-GMT: Tue,%2022%20Jan%202013%2022%3A29%3A11%20GMT - Event-Date-Timestamp: 1358893751566924 - Event-Calling-File: mod_stress.cpp - Event-Calling-Function: stress_callback - Event-Calling-Line-Number: 175 - Event-Sequence: 117716 - Speech-Type: stress-level - Stress-Level: 20000.00 - Unique-ID: 178a661c-e135-4e50-8275-9285908287d7 -``` - -### Testing - -If you whistle into your phone you should see the following messages (example): - -```xml - 2013-01-22 15:51:50.546923 [DEBUG] mod_stress.cpp:173 Stress 20000.00 - 2013-01-22 15:51:51.566922 [DEBUG] mod_stress.cpp:173 Stress 20000.00 - 2013-01-22 15:51:53.606924 [DEBUG] mod_stress.cpp:173 Stress 20000.00 - 2013-01-22 15:51:54.626923 [DEBUG] mod_stress.cpp:173 Stress 20000.00 - 2013-01-22 15:51:55.666926 [DEBUG] mod_stress.cpp:173 Stress 392.78 - 2013-01-22 15:51:56.686923 [DEBUG] mod_stress.cpp:173 Stress 0.17 -``` - -This will confirm the module is listening to speech on the line. - -