Asterisk-13-Function_TALK_DETECT_29394577.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Asterisk Project : Asterisk 13 Function_TALK_DETECT</title>
  5. <link rel="stylesheet" href="styles/site.css" type="text/css" />
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. </head>
  8. <body class="theme-default aui-theme-default">
  9. <div id="page">
  10. <div id="main" class="aui-page-panel">
  11. <div id="main-header">
  12. <div id="breadcrumb-section">
  13. <ol id="breadcrumbs">
  14. <li class="first">
  15. <span><a href="index.html">Asterisk Project</a></span>
  16. </li>
  17. <li>
  18. <span><a href="Asterisk-13-Command-Reference_29394274.html">Asterisk 13 Command Reference</a></span>
  19. </li>
  20. <li>
  21. <span><a href="Asterisk-13-Dialplan-Functions_29394287.html">Asterisk 13 Dialplan Functions</a></span>
  22. </li>
  23. </ol>
  24. </div>
  25. <h1 id="title-heading" class="pagetitle">
  26. <span id="title-text">
  27. Asterisk Project : Asterisk 13 Function_TALK_DETECT
  28. </span>
  29. </h1>
  30. </div>
  31. <div id="content" class="view">
  32. <div class="page-metadata">
  33. Created by <span class='author'> wikibot</span> on Aug 08, 2014
  34. </div>
  35. <div id="main-content" class="wiki-content group">
  36. <h1 id="Asterisk13Function_TALK_DETECT-TALK_DETECT()">TALK_DETECT()</h1>
  37. <h3 id="Asterisk13Function_TALK_DETECT-Synopsis">Synopsis</h3>
  38. <p>Raises notifications when Asterisk detects silence or talking on a channel.</p>
  39. <h3 id="Asterisk13Function_TALK_DETECT-Description">Description</h3>
  40. <p>The TALK_DETECT function enables events on the channel it is applied to. These events can be emited over AMI, ARI, and potentially other Asterisk modules that listen for the internal notification.</p>
  41. <p>The function has two parameters that can optionally be passed when <code>set</code> on a channel: <em>dsp_talking_threshold</em> and <em>dsp_silence_threshold</em>.</p>
  42. <p>dsp_talking_threshold is the time in milliseconds of sound above what the dsp has established as base line silence for a user before a user is considered to be talking. By default, the value of silencethreshold from dsp.conf is used. If this value is set too tight events may be falsely triggered by variants in room noise.</p>
  43. <p>Valid values are 1 through 2^31.</p>
  44. <p>dsp_silence_threshold is the time in milliseconds of sound falling within what the dsp has established as baseline silence before a user is considered be silent. If this value is set too low events indicating the user has stopped talking may get falsely sent out when the user briefly pauses during mid sentence.</p>
  45. <p>The best way to approach this option is to set it slightly above the maximum amount of ms of silence a user may generate during natural speech.</p>
  46. <p>By default this value is 2500ms. Valid values are 1 through 2^31.</p>
  47. <p>Example:</p>
  48. <p>same =&gt; n,Set(TALK_DETECT(set)=) ; Enable talk detection</p>
  49. <p>same =&gt; n,Set(TALK_DETECT(set)=1200) ; Update existing talk detection's silence threshold to 1200 ms</p>
  50. <p>same =&gt; n,Set(TALK_DETECT(remove)=) ; Remove talk detection</p>
  51. <p>same =&gt; n,Set(TALK_DETECT(set)=,128) ; Enable and set talk threshold to 128</p>
  52. <p>This function will set the following variables:</p>
  53. <div class="aui-message hint shadowed information-macro">
  54. <p class="title">Note</p>
  55. <span class="aui-icon icon-hint">Icon</span>
  56. <div class="message-content">
  57. <p>The TALK_DETECT function uses an audiohook to inspect the voice media frames on a channel. Other functions, such as JITTERBUFFER, DENOISE, and AGC use a similar mechanism. Audiohooks are processed in the order in which they are placed on the channel. As such, it typically makes sense to place functions that modify the voice media data prior to placing the TALK_DETECT function, as this will yield better results.</p>
  58. <p>Example:</p>
  59. <p>same =&gt; n,Set(DENOISE(rx)=on) ; Denoise received audio</p>
  60. <p>same =&gt; n,Set(TALK_DETECT(set)=) ; Perform talk detection on the denoised received audio</p>
  61. </div>
  62. </div>
  63. <h3 id="Asterisk13Function_TALK_DETECT-Syntax">Syntax</h3>
  64. <div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
  65. <pre>TALK_DETECT(action)</pre>
  66. </div></div>
  67. <h5 id="Asterisk13Function_TALK_DETECT-Arguments">Arguments</h5>
  68. <ul>
  69. <li><code>action</code>
  70. <ul>
  71. <li><code>remove</code> - W/O. Remove talk detection from the channel.</li>
  72. <li><code>set</code> - W/O. Enable TALK_DETECT and/or configure talk detection parameters. Can be called multiple times to change parameters on a channel with talk detection already enabled.
  73. <ul>
  74. <li><code>dsp_silence_threshold</code> - The time in milliseconds before which a user is considered silent.</li>
  75. <li><code>dsp_talking_threshold</code> - The time in milliseconds after which a user is considered talking.</li>
  76. </ul>
  77. </li>
  78. </ul>
  79. </li>
  80. </ul>
  81. <h3 id="Asterisk13Function_TALK_DETECT-SeeAlso">See Also</h3>
  82. <h3 id="Asterisk13Function_TALK_DETECT-ImportVersion">Import Version</h3>
  83. <p>This documentation was imported from Asterisk Version SVN-branch-13-r420538</p>
  84. </div>
  85. </div> </div>
  86. <div id="footer">
  87. <section class="footer-body">
  88. <p>Document generated by Confluence on Aug 11, 2014 13:48</p>
  89. </section>
  90. </div>
  91. </div> </body>
  92. </html>