sgrecord.1
来自「speech signal process tools」· 1 代码 · 共 203 行
1
203 行
.\" Copyright (c) 1996 Entropic Research Laboratory, Inc.; All rights reserved.\" @(#)sgrecord.1 1.2 3/28/97 ERL.ds ]W (c) 1996 Entropic Research Laboratory, Inc..TH SGRECORD 1\-ESPS 3/28/97.SH NAMEsgrecord - mono or stereo record to disk or pipe for native SGI Indigo A/D converter..PP.SH SYNOPSIS.B sgrecord[.BI \-s " duration"] [.BI \-f " sample rate"] [.BI \-c " channel"] [.BI \-S] [.BI \-W " xwaves display args."] [.BI \-P] [.BI \-p " prompt string"] [.BI \-x " debug-level"] [.BI \-H] [[.BI \-o].I file].PP.SH DESCRIPTION.PP.PP\fISgrecord\fP provides mono or stereo sampling at selected rates up to at least 48kHz whenrecording to local disk. Direct recording onto network disks is oftenfeasible as well. Output files have ESPS FEA_SD headers, or,optionally, no headers. Output may optionally be directed to\fIstdout\fP. \fISgrecord\fP has special adaptations that permit tightcoupling with \fIxwaves\fP (see \fIINTERACTION WITH XWAVES\fP below)..PPWhen no output file is specified, \fIsgrecord\fP will, by default, write a FEA_SD fileto standard output. When stereo recordingis selected (see the -c option) channels 0 and 1 alternate in the file, withchannel 0 being first. Note that processes consuming the output of\fIsgrecord\fP on a pipe must be able to keep up with the average aggregatesampling frequency. Options are available to control the sampling rate, recording duration, prompting, header suppression, and immediate display by \fIxwaves\fP..PPThe SGI Indigo program \fIapanel\fP may be used to monitor the input level(s),set the input gain, and change the input source. \fIApanel\fP should be started before\fIsgrecord\fP. It may be left running indefinitely..PP.SH OPTIONS.PPThe following options are supported:.TP.BI \-s " duration" "\fR [10]"Specifies the maximum duration of the recording session in seconds.Recording may be interrupted before this time expires with SIGINT,SIGQUIT or SIGUSR1 (see below). The default \fIduration\fP is 10 seconds.The upper limit is set only by disk space..TP.BI \-f " frequency" "\fR [16000]"Specifies the sampling frequency. The closest frequency to thatrequested will be selected from those available and the user will be notifiedif the selected value differs from that requested. If -f is notspecified, the default sampling frequency of 16kHz is used (assuming thestandard Ariel crystal)..TP.BI \-c " channel" "\fR [1]"By default sgrecord samples and stores single-channel data from the left channel.Dual-channel (stereo) recording is selected by setting \fIchannel\fP to 2..TP.BI \-SEnable the \fIxwaves\fP(1\-ESPS) "make" command via \fIsend_xwaves2\fP(3\-ESPS) when therequested recording time has elapsed or when recording is interrupted. This permits immediate examination of the recorded passage using \fIxwaves\fP. See \fIINTERACTION WITH XWAVES\fP below..TP.BI \-WThe argument to this option will be appended to the \fIsend_xwaves\fP"make" command to permit display customization (e.g. viawindow location and size specifications). See \fIINTERACTIONWITH XWAVES\fP below..TP.BI \-PEnable a prompt message when A/D has actually commenced. The default messageis a "bell ring" and the text "Start recording now ...." This prompt may be changedwith the \-p option..TP.BI \-p " prompt string"\fIPrompt string\fP will be used as the alert that recording is commencing. Specifying\-p forces -P..TP.BI \-HSuppresses header creation. A "bare" sample stream will result. The default isto produce an ESPS FEA_SD file with one or two channels depending on the\-c option..TP.BI \-x " debug_level"Setting debug_level nonzero causes several messages to be printed asinternal processing proceeds. The default is level 0, which causes no debugoutput..TP.BI -o " output"Specifies a file for output. Use of -\fIo\fP before the file designation is optionalif the filename is the last command-line component. If no output file isspecified or if "-" is specified, output will go to \fIstdout\fP..PP.SH "INTERACTION WITH XWAVES".PP\fISgrecord\fP is designed to optionally use the server mode of \fIxwaves\fP(1\-ESPS) fordisplay of its output file on completion of the record operation.This is implemented using \fIsend_xwaves2\fP(3\-ESPSu). The followingconditions must be met for this feature to work. (1) \fIXwaves\fP must berunning in the server mode. (2) The environment variables WAVES_PORTand WAVES_HOST must be correctly defined (see \fIespsenv\fP(1\-ESPS)). (3)The record operation must be interrupted with a SIGUSR1 signal (e.g.via "kill \-16 pid," where pid is the process ID of the \fIsgrecord\fPprocess), or if \fIsgrecord\fP is not thus interrupted, the -\fIS\fP flag must havebeen set. (4) Output must be to a file..PPAn example \fImbuttons\fP(1\-ESPS) script to implement a primitive recordcontrol panel follows:.PP.nf.na.ne 10"RECORD Mono" exec sgrecord -P -s60 -S -W"name $$ loc_y 150" \\ xx$$& echo $! > foo"RECORD Stereo" exec sgrecord -P -c2 -s60 -S -W"name $$ loc_y 150" \\ xx$$& echo $! > foo"STOP" kill -16 `cat foo`"ERASE" f=`cat foo` ; k=`echo $f 1 - p q | dc` ; \\ kill -2 $f ; rm -f xx$k ; send_xwaves kill name $k.fi.ad.PPNote how the -\fIW\fP option is used to name the display ensemble and to fixthe vertical location of the waveform at the same place on consecutiveinvocations. In general, the -\fIW\fP option can be used to augment thedisplay generation as described under the "make" command in the \fIxwaves\fPmanual. Note that the "STOP" function is implemented with a "kill-16" (SIGUSR1). This causes \fIsgrecord\fP to send the "make" command to\fIxwaves\fP. If either kill -2 (SIGINT) or kill -3 (SIGQUIT) is sent to\fIsgrecord\fP, it will terminate gracefully, but will not send any messagesto \fIxwaves\fP. The -\fIS\fP option causes the \fIxwaves\fP display operation to occureven in the non-interrupted case (i.e. after 60 sec of recording).The above script is not robust, but may serve as a useful startingpoint for more serious attempts..PP.SH ESPS PARAMETERS.PPThe parameter file is not read. .PP.SH ESPS COMMON.PPESPS Common is not read or written..PP.SH WARNINGS.PPWhen output is to a file, the ESPS header, if it is present, willcorrectly reflect the absolute maximum sample value encountered duringrecording and the number of samples recorded. If output is to a pipe,these values are not recorded in the header..PPIf the output of \fIsgrecord\fP goes to the terminal, bad things willhappen to the terminal configuration and you may not be able to regaincontrol of the terminal. In this case, kill the window or kill therecord process remotely from another window..PP\fISgrecord\fP supports only the "native" SGI Indigo sampling rates.These are (in Hz): 48000 44100 32000 29400 24000 22050 16000 1470012000 11025 10667 9800 9600 8820 8000 7350 6857 6400 6300 6000 58805512 5333 4900 4571 4200 4000 3675. If an unsupported rate isrequested, \fIsgrecord\fP records at the closest supported rate andissues a warning..PPThe maximum rate over the network is unpredictable in general, but weroutinely achieve 16kHz stereo at Entropic Research Laboratory. Ofcourse rate limitations due to network speed will be less severe forsingle-channel recording..PP.SH FILES.PP.SH BUGS.PPIf another \fIsgrecord\fP operation is started while one is inprogress, unpredictable results will occur..PP.SH SEE ALSO.PP.nfSD(5\-\s-1ESPS\s+1), \fItestsd\fP(1\-\s-1ESPS\s+1), \fIcopysd\fP(1\-\s-1ESPS\s+1),\fIsgplay\fP(1\-\s-1ESPS\s+1), \fIsfconvert\fP(1\-\s-1ESPS\s+1), \fIsgram\fP(1\-\s-1ESPS\s+1).fi.PP.SH AUTHORS.PPDavid Talkin at Entropic Research Laboratory.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?