<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
Consider the following function in lua mod<br>
<br>
<span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span
 class="Apple-style-span"
 style="font-family: sans-serif; font-size: 15px; line-height: 22px;">session:recordFile(file_name,
max_len, silence_threshold, silence_secs)<br>
<br>
, where [</span></span><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span
 class="Apple-style-span"
 style="font-family: sans-serif; font-size: 15px; line-height: 22px;">silence_secs]
is the amount of silence to tolerate before ending the recording.<br>
<br>
When executing this function with the following parameters&nbsp; </span></span><span
 class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span
 class="Apple-style-span"
 style="font-family: sans-serif; font-size: 15px; line-height: 22px;">
<pre
 style="border: 1px dashed rgb(47, 111, 171); padding: 1em; color: black; background-color: rgb(249, 249, 249); line-height: 1.1em;">session:recordFile("/tmp/blah.wav", 30000, 10, 10)</pre>
</span></span>and muting the mic on my phone, the recording breaks in ~
10 seconds.<br>
Here comes the question. How do I know that recording ended because of
silence? Do you set any environment variable?<br>
<br>
Cheers,<br>
Peter<br>
<span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span
 class="Apple-style-span"
 style="font-family: sans-serif; font-size: 15px; line-height: 22px;"><br>
</span></span>
</body>
</html>