Module select_fiat_entries
|
|
Module select_fiat_entries
source code
This program reads a FIAT format data file and displays some of the
information. You can select some of the lines with the -select flag, and
the display the selected lines in several different ways.
Flags:
-
-select expr Where expr is a python expression that returns True or
False. All the normal builtins are available. The data in the
line is presented as a set of local variables, so that if the value
in the column labelled "filename" is "f005.wav",
then you could test for 'filename=="f005.wav"'. Note that
everything is a string, so you may need to convert to int or float
before some tests: 'int(nspeakers)<5'.
-
-showav Displays the entire line in a=v; format.
-
-showfiat Displays the resulting file in FIAT format, preserving
the header information.
-
-show format This displays the file as a text file, using evaluating
format (which is a snippet of python code that should return a
string): -show "'%s # %s'%(fname,loudness)" will display
the fname and loudness columns of the selected lines, separated by a
hash mark.
-
-rav Reads the input file in a=v; format rather than fiat.
-
-senv Exec some python code to set a global variable that is visible
in the -select expression. (e.g. "x=3").
-
-penv Exec some python code to set a global variable that is visible
in the -show expression. (e.g. "x=3").
-
-strap exception value
|
SHOWAV = 1
|
|
SHOWFIAT = 2
|
|
__package__ = None
hash(x)
|
Imports:
die,
fiatio,
avio,
g2_select,
gpk_writer