Processing a directory

There are a few different ways you can process a directory of TextGrid files

Only an input path and scheme provided

You can point fave_recode at an entire directory and just specify a recoding scheme.

This will happen:

fave_recode will save each recoded TextGrid to same input directory _recoded added to the end of the filename.

If there is already a file in the output location:

If there is already a file in the output location, fave_recode will ask you whether or not you want to overwrite it. It will do this for every already existing file.

Example

bash
ls data
KY25A_1.TextGrid  josef-fruehwald_speaker.TextGrid
bash
fave_recode -p data -s cmu2labov
ls data
python
!fave_recode -p data -s cmu2labov
!ls data
KY25A_1.TextGrid      josef-fruehwald_speaker.TextGrid
KY25A_1_recoded.TextGrid  josef-fruehwald_speaker_recoded.TextGrid

Providing a recode stem

You can provide fave_recode with a different recode stem to append to the original filenames with the -r flag.

This will happen:

fave_recode will save each recoded TextGrid to the same directory as the originals with the string you provided added to the end of the filename.

Example

bash
ls data
KY25A_1.TextGrid  josef-fruehwald_speaker.TextGrid
bash
fave_recode -p data -s cmu2labov -r _labovcode
ls data
python
!fave_recode -p data -s cmu2labov -r _labovcode
!ls data
KY25A_1.TextGrid        josef-fruehwald_speaker.TextGrid
KY25A_1_labovcode.TextGrid  josef-fruehwald_speaker_labovcode.TextGrid

Providing an output directory

You can also provide fave_recode with an output directory with -d.

This will happen:

fave_recode will save each recoded TextGrid to the output directory with the recode string appended to the end of the original filenames.

If there is already a file in the output location:

If there is already a file in the output location, fave_recode will ask you whether or not you want to overwrite it. It will do this for each file.

If there the output directory doesn’t exist:

If the output directory doesn’t exist, fave_recode will ask you whether or not you want to create it.

Example

bash
fave_recode -p data -s cmu2labov -d output
ls output
KY25A_1_recoded.TextGrid  josef-fruehwald_speaker_recoded.TextGrid