Metadata-Version: 2.3
Name: fave-recode
Version: 0.3.1
Summary: A package for recoding Praat TextGrids
License: GPLv3
Author: JoFrhwld
Author-email: JoFrhwld@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: aligned-textgrid (>=0.7.8,<0.8.0)
Requires-Dist: cerberus (>=1.3.5,<2.0.0)
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: cloup (>=3.0.2,<4.0.0)
Requires-Dist: pyyaml (>=6.0,<7.0)
Project-URL: Homepage, https://forced-alignment-and-vowel-extraction.github.io/fave-recode
Project-URL: Repository, https://github.com/Forced-Alignment-and-Vowel-Extraction/fave-recode
Description-Content-Type: text/markdown

# Getting started with `fave-recode`


![PyPI](https://img.shields.io/pypi/v/fave-recode.png)
[![codecov](https://codecov.io/gh/Forced-Alignment-and-Vowel-Extraction/fave-recode/graph/badge.svg?token=C23B1H3DAX)](https://codecov.io/gh/Forced-Alignment-and-Vowel-Extraction/fave-recode)
[![Maintainability](https://qlty.sh/badges/0333bba8-0ca6-4f22-b503-e4994cdce96b/maintainability.svg)](https://qlty.sh/gh/Forced-Alignment-and-Vowel-Extraction/projects/fave-recode)
[![FAVE Python
CI](https://github.com/Forced-Alignment-and-Vowel-Extraction/fave-recode/actions/workflows/test-and-run.yml/badge.svg?branch=dev)](https://github.com/Forced-Alignment-and-Vowel-Extraction/fave-recode/actions/workflows/test-and-run.yml)
[![Build
Docs](https://github.com/Forced-Alignment-and-Vowel-Extraction/fave-recode/actions/workflows/build-docs.yml/badge.svg)](https://forced-alignment-and-vowel-extraction.github.io/fave-recode/)
[![DOI](https://zenodo.org/badge/605740158.svg)](https://zenodo.org/badge/latestdoi/605740158)

The idea behind `fave-recode` is that no matter how much you may adjust
the dictionary of a forced-aligner, you may still want to make
programmatic changes to the output.

## Installation

You can install `fave-recode` at your system’s command line with `pip`.

``` bash
pip install fave-recode
```

## Basic usage

Installation of the `fave-recode` python package makes the `fave_recode`
executable, which can also be run at the command line. You can get help
with `--help`

``` bash
fave_recode --help
```

    Usage: fave_recode [OPTIONS]

    Inputs: [at least 1 required]
      File inputs. Either a single file with -i or a path with -p. Not both.
      -i, --input_file FILENAME  single input file
      -p, --input_path PATH      Path to a set of files

    Outputs:
      -o, --output_file TEXT     An output file name
      -d, --output_dest PATH     An output directory

    Other options:
      -a, --parser TEXT          Label set parser. Built in options are cmu_parser
      -s, --scheme TEXT          Recoding scheme. Built in options are cmu2labov
                                 and cmu2phila  [required]
      -r, --recode_stem TEXT     Stem to append to recoded TextGrid file names
      -t, --target_tier TEXT     Target tier to recode
      --help                     Show this message and exit.

To recode a single file, you need to provide `fave_recode` with,
minimally, the input file (the `-i` flag), and the recoding scheme (with
the `-s` flag). There are a few default recoding schemes that come with
`fave_recode`.

``` bash
ls data
```

    KY25A_1.TextGrid                 josef-fruehwald_speaker.TextGrid

``` bash
fave_recode -i data/josef-fruehwald_speaker.TextGrid -s cmu2phila -a cmu_parser

ls data
```

    KY25A_1.TextGrid
    josef-fruehwald_speaker.TextGrid
    josef-fruehwald_speaker_recoded.TextGrid

