EasyManua.ls Logo

Townshend Computer Tools DAT-Link - Netaudio

Default Icon
208 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
186 NETAUDIO(3)
NAME
mendparams, adparams, frmavg, mendpoint library routines for DAT-Link recording with speech seg-
D
mentation
ESCRIPTION
These routines allow C or Fortran programs to access a NetAudio server on the local machine or other
.
T
machines connected via a network to record speech segments with automatic segmentation of words
hese routines use underlying netaudio(3) calls to insulate the user from the normal NetAudio interface
providing a easy-to-use replacement for existing software.
SROUTINE
void adparams(ifreq, iwind, ishift, alpha)
d
int ifreq, iwind, ishift;
ouble alpha;
Setup an speech acquisition connection via the NetAudio server specified by the Open a con-
nection to the NetAudio server specified by the environment variable. Data
AUDIO_DEVICE
e
s
will be recorded from the left channel of the DAT-Link’s digital audio input at a sampling rat
pecified by irate. For segmentation purpose, data is blocked into frames of iwind samples and
-
p
average energy over the frame is computed by the DAT-Link. Each frame begins ishift sam
les after the previous frame. Note that iwind must be an integer multiple of ishift less than
P
20. Typical values are irate = 8000, iwind = 120, and ishift = 30.
re-emphasis is used on the incoming data using a first order filter with feedback coefficient
v
given by alpha. A value of alpha of 0.95 typically provides good results.
oid mendparams(k1,k2,l1,l2,npre,npost,nevent,iending,frmav)
d
int k1,k2,l1,l2,npre,npost,nevent,iending;
ouble frmav;
Sets up the parameters for speech segmentation used by subsequent calls to mendpoint(). The
a
w
parameters, k1andk2 set the thresholds for beginning a segment and for positive recogition of
ord respectively. Both of these should be given as a factor of frmav, the expected back-
l
ground noise level. Typical values are k1 = 2 and k2 = 10.
1 is the maximum number of frames above the k1 threshold that will be accepted before the
a
v
k2 threshold is exceeded. The l2 duration is the minimum number of frames needed to form
alid segment. Typical values are l1 = 7 and l2 = 15.
o
g
npreandnpost set the number of frames that each segment will be extended at either end t
uarantee that the lead-in and trailing edge are not truncated. A value of 10 is suitable for
R
both of these.
ecording will continue until nevent segments are recorded or iending frames of silence are
v
encountered after at least one segment has been acquired.
oid frmavg(frmav, numsecs)
d
float frmav;
ouble numsecs
This routines measures the background noise level by recording for numsecs seconds and cal-
.
N
culating the average energy. The resulting value is stored at the address pointed to by frmav
ote that it is up to the user to remain silent while frmavg() is executing or the estimate will
v
be wrong.
oid mendpoint(buffer, nsamps)
i
short buffer;
nt nsamps;
Begin recording data into buffer until nsamps are acquired or the number of segments specified
e
s
by a prior call to mendparams() are obtained. The actual number of samples recorded ar
tored at nsamps before returning.

Table of Contents