This is a very simple recording application. It records a timeslot into a file. It can be stopped by a command, but otherwise records forever. The recorded file has no headers or other formatting of any kind - just the data. The test program ansplay can use these files directly.
Go to directory $(TiNG)/test.
You must have downloaded firmware modules as listed below.
Run locrec
with the appropriate options (the program is
gen-LINUX_V6/locrec or
gen-WINNT_V6/locrec
depending on which operating system you are using).
Command line options are:
-a 1
| use AGC |
-e <N>
| use silence elimination, eliminating silences longer than N milliseconds. (default, 0, means do not eliminate silences) |
-E <N>
| use tone elimination, with mode N. |
-F <format>
| record in this format. The known formats can
be listed by specifying a question mark
(? ).
|
-l <N>
| Set a maximum elapsed time for the recording to N milliseconds (default, 0, means no maximum). |
-n <number-of-channels>
| record this many channels (default = 1) |
-q <N>
| Set a maximum silence in milliseconds. As soon as this much silence occurs, the recording finishes. (default, 0, means no maximum). |
-S <toneset>
| the toneset to use for tone elimination (if enabled). |
-T <bits>
| set the data transfer threshold |
-t <timeslot>
| timeslot to use (see
Test program
timeslots). If you specify more than one channel,
they use consecutive timeslots starting at this one.
For example, the options "-n 3 -t64:20 "
record timeslots 64:20 , 64:21 ,
and 64:22 .
|
-U
| Show message when overruns occur. |
-v <volume>
| adjust volume of the recording by this (in dB) |
-X <maxoctets>
| Specify the maximum number of octets to record. When this quantity is reached, the recording finishes. |
-x <cardspec>
| Use these Prosody processor modules, specified as described in Test programs: Specifying Prosody Processor modules |
<file> | name of file into which data is to be recorded.
If the file name contains a "%d ", this
wil be replaced with the stream number. If it
contains a second "%d ", this will be
replaced with the timeslot number. In fact, this is
done by using the file name as a format string for
printf() so you can use any printf
format codes (e.g. "recfile-%02d-%02d ").
|
For example,
gen-WINNT_V6/locrec -x x:1.2.3.4/mykey -F ALawPCM@8000 -t 64:0 rec1.dat
would record A-law encoded speech from timeslot 64:0 of a Prosody processor module on the card with address 1.2.3.4 and key mykey into rec1.dat
.
The firmware modules that are required depend on the options you specify. Here are the details:
Module | When needed |
---|---|
datafeed | always on Prosody X |
grunt | If you use '-e 1 ' for silence elimination
|
gainbg | If you use '-a 1 ' for AGC or
-v with a non-zero volume adjustment
|
inchan | always |
sixkin | when the recording format is ACUBLKPCM@6000, ALawPCM@6000, OKIADPCM@6000, or ULawPCM@6000 |
recA | when the recording format is ALawPCM@6000 or ALawPCM@8000 |
recima | when the recording format is IMAADPCM |
recmu | when the recording format is ULawPCM@6000 or ULawPCM@8000 |
recoki | when the recording format is OKIADPCM@6000 or OKIADPCM@8000 |
While it is recording, it prints the speed at which the data is
arriving. You can use the 'q
' command to stop the
program.
The source code for this program is provided (locrec.c).
This is one of the Prosody test programs .