File copying with conversion.
spr_copy [-A](flag: ASCII) [-H](flag: HEADER) [-HL](flag: HEADER_LEN) [-i ifname](stdin)
[-o ofname](stdout) [-t type] [-f firstframe:lastframe] [-c firstchannel:lastchannel]
[-p firstparam:lastparam] [-l length](-1) (-Fd==-t)
- Parameters
-
-Aflag | ASCII
Produce an output file in ASCII format. |
-Hflag | HEADER
Dump the header; do not copy data. |
-HLflag | HEADER_LEN
Add the key HEADER_LEN to the header; useful for programs that just want to skip the header. |
-i<em>ifname</em><a | name="spr_copy.i" class="el">
Input file name. |
-o<em>ofname</em><a | name="spr_copy.o" class="el">
Output file name. |
-t<em>type</em><a | name="spr_copy.t" class="el">
Data type to use for the output. Possibilities are: [UI](8|16|32|64) for unsigned/signed 8/16/32/64 bits integers, F(32|64) for single/double precision floats, or ULAW/ALAW for u-law/a-law encoding. |
-f<em>firstframe:lastframe</em><a | name="spr_copy.f" class="el">
Select these specific frames (normally all frames are used). |
-c<em>firstchannel:lastchannel</em><a | name="spr_copy.c" class="el">
This option only applies to SAMPLE files. Select channels in a multichannel data file, default is all channels. |
-p<em>firstparam:lastparam</em><a | name="spr_copy.p" class="el">
This option only applies to TRACK or PARAM files. Select parameters in a track data file, default is all parameters. |
-l<em>length</em><a | name="spr_copy.l" class="el">
Frame length for sampled data; by default the value of FSHIFT or if not available FLENGTH, or if not available the default value (0.01) is used. |
File copying with conversion. This program performs general purpose copy and conversion actions.
Depending on the content of the file, spr_copy can
-
convert the header to the SPRAAK format and simply copy the remainder of the data; supported for all files
-
copy only a certain fields and entries; supported on files containing lists of strings such as corpus files and dictionaries
-
copy a selection of frames (rows) and parameters (columns) only; supported on all files which store their data in a simple MATRIX layout, e.g. track and some parameter files
-
copy a selection of frames and audio channels only; supported on sample files only
- Note
- files such as .hmm and .sel which store variable length and/or sparse data superimpose is simple matrix (single column vector) layout on top of the real data layout. This assures that basic operations like "spr_copy -A" for viewing the raw content still work. However, selecting data from such a file will break the real data layout and will result in a corrupted file.
- Author
- Kris Demuynck
- Date
- 08 Sep 1991
- Revision History:
- 8 Sep 1991 - Dirk Van Compernolle
- implementation of original version
- 3 Mar 1994 - Frank Schoeters
- added test on requested number of data to copy to prevent array access to reach out of bounds.
- 8 Dec 1994 - Frank Schoeters
- added the options `S' and `nchan' to allow specifying the sample frequency and the number of channels.
- 1 Jun 2008 - KD
- reimplementation for SPRAAK