Getting Started

Installation

# bash
pip install new-fave

Usage

Current basic usage, for now. If you want speaker demographics included in the data output, see Speaker

Audio + TextGrid

See fave_audio_textgrid and write_data. And if desired, SpeakerCollection.

from new_fave import fave_audio_textgrid, write_data

speakers = fave_audio_textgrid(
    audio_path = "speaker1.wav",
    textgrid_path = "speaker2.TextGrid",
    ## all optional args below
    speakers = "all",
    recode_rules = "cmu2labov",
    labelset_parser = "cmu_parser",
    point_heuristic = "fave",
    ft_config = "default"
)

write_data(
    speakers, 
    destination = "output_dir"
)

Corpus

See fave_corpus and write_data. And if desired, SpeakerCollection.

from new_fave import fave_corpus, write_data

speakers = fave_audio_textgrid(
    corpus_path = "corpus/",
    ## all optional args below
    speakers = "all",
    recode_rules = "cmu2labov",
    labelset_parser = "cmu_parser",
    point_heuristic = "fave",
    ft_config = "default"
)

write_data(
    speakers, 
    destination = "output_dir"
)

Subcorpora

See fave_subcorpora and write_data. And if desired, SpeakerCollection.

from new_fave import fave_subcorpora, write_data

speakers = fave_subcorpora(
    subcorpora_glob = "project/speakers/*/",
    ## all optional args below
    speakers = "all",
    recode_rules = "cmu2labov",
    labelset_parser = "cmu_parser",
    point_heuristic = "fave",
    ft_config = "default"
)

write_data(
    speakers, 
    destination = "output_dir"
)