Getting Started

Command-Line Usage

We expect new-fave to be primarily used as a command-line tool. This page outlines that usage. Using new-fave this way does not require you to do any python programming, but if you would like to import new-fave into a python project of your own, see the page on Python Usage.

Installation

To use new-fave, you will need to have python installed on your computer. Currently, new-fave supports python versions 3.10, 3.11, or 3.12. If you are not sure whether python is installed, or what version is installed, here is a good tutorial for figuring that out.

Tip

In this documentation, when code is meant to be run at the command line, the code snippet will begin with # command-line

Once you have python successfully installed, you can install new-fave at the command-line like so:

# command-line
pip install new-fave

Usage

After installing new-fave, the fave-extract executable will be made available. You can access a minimal help message by just running fave-extract with no arguments.

# command-line
fave-extract
Usage: fave-extract [OPTIONS] COMMAND [ARGS]...

  Run new fave-extract

Options:
  --help  Show this message and exit.

Commands:
  audio-textgrid (audio-textgrid)
                           Run fave-extract on a single audio+textgrid pair.
  corpus (corpus)          Run fave-extract on a directory of audio+textgrid...
  subcorpora (subcorpora)  Run fave-extract on multiple subdirectories.

fave-extract has three sub-commands. Which one you use will depend on how your data is organized.

  • fave-extract audio-textgrid

    • For when you have a single audio file and force-aligned textgrid pair to process.
  • fave-extract corpus

    • For when you have all of you audio files and force-aligned textgrids in a single directory.
  • fave-extract subcorpora

    • For when your audio file and textgrid pairs are each in their own directory, inside of a larger directory.

audio-textgrid

In the simplest case of a single audio/textgrid pair, your best option is the audio-textgrid subcommand. For example, if you had the following files in a data/ directory:

data
├── speaker1.TextGrid
└── speaker1.wav

To use all default settings, you would run the following:

# command-line
fave-extract audio-textgrid data/speaker1.wav data/speaker1.TextGrid

To customize the way fave-extract audio-textgrid works, including how to incorporate speaker demographics into the output, see the customization documentation.

corpus

If you have all of your audio file/textgrid pairs in a single directory, then the corpus subcommand is your best option. An example file organization would look like this:

my_corpus
├── speaker1.TextGrid
├── speaker1.wav
├── speaker2.TextGrid
└── speaker2.wav
File Naming

The corpus subcommand will only work if the file names are the the same for the audio/textgrid pairs. That is, if your audio files are named something like speaker1.wav, and your textgrids are named something like speaker1_aligned.TextGrid, the corpus subcommand won’t process them.

To use all default settings, you would run the following:

# command-line
fave-extract corpus my_corpus/

To customize the way fave-extract corpus works, including how to incorporate speaker demographics into the output, see the customization documentation.

subcorpora

If each audio file/textgrid pair is in its own directory inside of a larger project directory, then the subcorpora subcommand is the best to use. An example file organization would look like this:

big_project
├── speaker1
│   ├── notes.txt
│   ├── speaker1.TextGrid
│   └── speaker1.wav
└── speaker2
    ├── notes.txt
    ├── speaker2.TextGrid
    └── speaker2.wav
File Naming

The corpus subcommand will only work if the file names are the the same for the audio/textgrid pairs. That is, if your audio files are named something like speaker1.wav, and your textgrids are named something like speaker1_aligned.TextGrid, the corpus subcommand won’t process them.

To use all default settings, you would run the following:

# command-line
fave-extract subcorpora big_project/speaker*

To customize the way fave-extract subcorpora works, including how to incorporate speaker demographics into the output, see the customization documentation.