/ Features / Fundamentals / Production / Tutorials / Software / Home
3.4.2 Transforming Input Signals: Command Line Options
Section 3.4.2: Command Line Options

This section explains details of the command line arguments for isip_transform and provides examples of how to use them. All of the example commands below can be run from the directory $ISIP_TUTORIAL/sections/s03/s03_04_p02/. For a general discussion of our command line interface, see our foundation class documentation on utilities. To get started, execute the command isip_transform -help. You will obtain this output:

    name: isip_transform
    synopsis: isip_transform -param params.sof [options] [file1.sof ...]
    descr: transform data from one format to another
    example: isip_transform -param params.sof [file1.sof ...]
    
    options:
    -directory: directory to place output (default = source file directory)
    -extension: new file extension (default = sof)
    -list: Sdb file list
    -log_file: redirect console output to this file (default = stdout)  
    -parameter_file: contains the recipe to be processed
    -preserve: number of levels of subdirectories to preserve (def = 0)
    -suffix: new basename suffix (default = none)
    -type: text or binary (default = binary)
    -verbosity: verbosity level (default=NONE)
    
    arguments: filename(s)
    
    man page: $ISIP/util/speech/isip_transform/index.html
    
Click on the isip_transform manual page for more information about this utility. To view more detailed explanations of each option above, click on the corresponding link.


Option: -directory

The output files can be created in any user-defined directory. The command:
    isip_transform -debug BRIEF -param recipe_energy.sof -directory ./feature -suffix _energy speech.sof
will create the output file speech_energy.sof in a newly created directory called ./feature. The command will produce the following output:
    processing speech.sof -> ./feature/speech_energy.sof
If no directory is specified in the command line, the file will be created in the current directory.


Option: -extension

The extension of output files from isip_transform is fully customizable. The command:
    isip_transform -debug BRIEF -param recipe_energy.sof -extension egy speech.sof
will name the output file speech.egy when run. This command will result in the following screen output:
    processing speech.sof -> speech.egy
The default value for the extension is ".sof".


Option: -list

The user can specify a list of the files to be processed. Normal Unix regular expressions can be used (e.g., "*/*.sof"). Users can also enumerate a list of files using a special file database format known as a Signal Database file (Sdb). See the Sdb class documentation for more information on this capability. Processing a list of files is easy using the "list" option. These lists can be intermingled with regular files.
This example uses a basic recipe, recipe_energy.sof, and the files speech_0.sof and speech_1.sof listed in list.sof.
    isip_transform -debug BRIEF -param recipe_energy.sof -suffix _energy -list list.sof
The screen output will be:
    processing ./speech_in_0.sof -> ./speech_0_energy.sof
    processing ./speech_in_1.sof -> ./speech_1_energy.sof
Two output files, speech_0_energy.sof, speech_1_energy.sof have been created.


Option: -log_file

The output of isip_transform can be directed into a user-defined log file using the parameter log_file, which is often abbreviated as "-log". In this example, the log file used is output.log:
    isip_transform -debug BRIEF -log output.log -param recipe_energy.sof -suffix _energy -list list.sof
Instead of displaying the output to the screen, the output is directed to the log file specified. The log file output.log has been created. The file contains the following data:
    processing ./speech_0.sof -> ./speech_0_new.sof
    processing ./speech_1.sof -> ./speech_1_new.sof
Note that there are other ways under Unix to capture the screen output, including the nohup command.


Option: -parameter_file

Parameters for isip_transform are recipe files usually generated by isip_transform_builder. The option "-parameter_file" (which is often abbreviated as "-param") specifies the name of the recipe file. A recipe file can be a single recipe, or a list of recipes encapsulated in an Sdb file. This feature is demonstrated in Section 3.5.2. Below we demonstrate the use of this option for a single recipe.
    isip_transform -debug BRIEF -param recipe_energy.sof -suffix _egy speech.sof
The screen output will be:
    processing speech.sof -> speech_egy.sof
In this example, only one file was processed. The output specifies the number of files attempted and the number of files processed. If an attempt is made to process multiple files and the output indicates that the number of files processed is lower than the number of files attempted, an error has occurred while trying to process one or more of the the files.


Option: -preserve

This utility also provides the ability to preserve directory structure to a user-specified level.

Currently, you should be in the directory $ISIP_TUTORIAL/sections/s03/s03_04_p02/. Suppose we want to extract features from some file, but preserve two levels of the directory structure. We would accomplish this with the following command:
    isip_transform -debug BRIEF -directory ./ -param ./recipe_energy.sof -preserve 2 -suffix _energy -list list.sof
The two output files will be placed in the directory $ISIP_TUTORIAL/sections/s03/s03_04_p02/s03/s03_04_p02. As you can see, the "-preserve" option preserves the two upper paths of the directory structure. This makes it very easy to replicate a preexisting directory structure for a database, yet have your feature files in a separate location. The default for this option is "0", meaning no directory structure will be preserved. Also, notice that the "-directory" tag must be specified in order for the "-preserve" option to work.


Option: -suffix

The suffix option allows the user to add a suffix to an output feature file. The new filename is created in the form [basename][suffix].[extension]. For example, run this command:
    isip_transform -debug BRIEF -param recipe_energy.sof -suffix _energy speech.sof
The screen output will be:
    processing speech.sof -> speech_energy.sof
The resulting file will be speech_energy.sof. (Note: If the file speech_energy.sof already exists, the file will be named speech_energy_n.sof where n indicates the number of times the file occurs in the current directory.)


Option: -type

The type of any output file created by isip_transform can be either text or binary. Run both commands below and compare the files created by each command.
    isip_transform -debug BRIEF -param recipe_energy.sof -suffix _txt -type text speech.sof
    isip_transform -debug BRIEF -param recipe_energy.sof -suffix _bin -type binary speech.sof
Usually, we want feature files to be binary since binary files can be processed quicker than text files. For the examples in this and previous sections, we've used text files to make viewing the contents easier.


Option: -verbosity

The verbosity option controls the amount of ouput that is displayed on the screen. This option is useful when debugging. The three commands below perform the same operation, but display different amounts of output to the screen. For this example, be sure to delete the file created after running each command to avoid creating multiple files.

Setting verbosity to NONE:
    isip_transform -debug BRIEF -verbosity NONE -param recipe_energy.sof -suffix _energy speech.sof
Output:
    processing speech.sof -> speech_energy.so
Setting verbosity to BRIEF:
    isip_transform -debug BRIEF -verbosity BRIEF -param recipe_energy.sof -suffix _energy speech.sof
Output:
    total recipes 1
    loading parameter file: recipe_energy.sof
    processing file 1: speech.sof
    processing pfile 1: recipe_energy.sof
    processing speech.sof -> speech_energy.sof
    isip_transform: processed 1 file(s), attempted 1 file(s).
Setting verbosity to ALL:
    isip_transform -debug BRIEF -verbosity ALL -param recipe_energy.sof -suffix _energy speech.sof
Output:
    Command: isip_transform -debug_level BRIEF -verbosity ALL -parameter_file recipe_energy.sof -suffix _verb speech.sof
    Version: 1.35 (not released) 2003/06/30 20:03:44
    total recipes 1
    loading parameter file: recipe_energy.sof
    processing file 1: speech.sof
    processing pfile 1: recipe_energy.sof
    processing speech.sof -> speech_energy.sof
    processing frame 0:
    processing frame 1:
    processing frame 2:
    processing frame 3:
    processing frame 4:
    processing frame 5:
    processing frame 6:
    .....
    .....
    processing frame 510:
    processing frame 511:
    processing frame 512:
    isip_transform: processed 1 file(s), attempted 1 file(s).
   
Table of Contents   Section Contents   Previous Page Up Next Page
      Glossary / Help / Support / Site Map / Contact Us / ISIP Home