blabr and blabpy
Documentations for BLab in-house library
This is a reference for the functions available in our two in-house libraries, blabr
and blabpy
, which are designed to support work with various BLab datasets. These libraries provide reusable code for handling more complex or coding-intensive tasks, particularly those involving specialized file formats or data wrangling operations. If you encounter a challenging or repetitive task, consult this documentation first. In many cases, a function has already been developed to do just that.
This is not an intensive guide, only the functions you'll most likely find useful.
Installation guides can be found here.
blabr
See full documentation here.
blabpy
blabpy
is a library with functions that can be , as well as subpackages within blabpy that itself has modules with functions that can be imported. See details here.
Base level modules
blabpy.pipeline
For working with ACLEW style annotations
extract_aclew_data(path, recursive=True, show_tqdm_pbar=False)
find_eaf_paths(path, recursive=True)
blabpy.path
Utilitiy functions for getting path to blab_data and blab_share
get_blab_data_root_path()
get_blab_share_path()
blabpy.vtc
Functions to work with the VTC output files. These files have an ".rttm" extension, they are space-separated text fiels without column names. VTC - Voice Type Classifier - a set of of voice classification models and the code to apply them. See GitHub for more details.
read_rttm(path)
split_rttm(rttm_path, output_dir)
Subpackages
blabpy.seedlings
blabpy.seedlings
TBA
blabpy.eaf
blabpy.eaf
Subpackage with classes and functions for working with ELAN .eaf files. There are several ways of working with .eaf using this module:
EafPlus class which is just pympi.Eaf plus a few extra methods. Has a lot implemented but makes it hard to navigate the data and makes editing result in unnecessarily large diffs.
EafTree class which is a wrapper around an ElementTree object. Good for navigating data and editing but lacks any functionality to add new elements.
An assortment of functions in eaf_utils that work with .eaf files as XML trees that they are. They allow adding new elements to eaf files. These functions should eventually be moved to EafTree.
There is also an etree_utils module that contains functions for working with xml.etree.ElementTree.Element objects that aren't specific to .eaf files.
eaf.eaf_plus
// Some code
vihi
vihi.pipeline
add_intervals_for_annotation(full_recording_id, forced_timezone=None)
create_reliability_test_file(eaf_path, output_dir=None)
distribute_all_rttm()
gather_recordings(full_recording_id, forced_timezone=None)
get_eaf_path_from_full_recording_id(full_recording_id)
get_vtc_data(full_recording_id)
Last updated