Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

No Description

Lucas Gautheron 9d2339e988 README 2 years ago
.datalad 2d0141ae6f [DATALAD] new dataset 3 years ago
code 9d2339e988 README 2 years ago
input 11f9e8755d further cleanup... 2 years ago
output 02e1798613 fit results 2 years ago
.gitattributes d3ae0e766d [DATALAD] Recorded changes 2 years ago
.gitignore 9452727d4d unversioning audio clips 3 years ago
.gitmodules 2fa703c120 [DATALAD] modified subdataset properties 3 years ago
CHANGELOG.md feee68bfff Apply YODA dataset setup 3 years ago
README.md 9d2339e988 README 2 years ago
requirements.txt 9d2339e988 README 2 years ago

README.md

Speaker confusion model

The Voice Type Classifier (VTC) is a speech detection algorithm that classify each detected speech segment into one of four classes: Female adults, Male adults, the Key child, and Other children. This allows to measure the input children are exposed to as they are acquiring language, as well as their own speech production.

However, the VTC is not perfectly accurate, and the speaker may be misidentified (or, speech may be left undetected). For instance, the key child is occasionally confused with other children. Not only such confusions have consequences on the amount of speech measured within each of these four categories, but they also tend to generate spurious correlations between the amount of speech produced by each kind of speaker. For instance, more actual "Key child" (CHI) speech will systematically and spuriously lead to more "Other children" (OCH) detected speech due to speaker misidentification, which in turn will appear as if there was a true correlation between CHI and OCH amounts' of speech.

The present bayesian model captures the errors of the VTC (false negatives and confusion between speakers) in order to assess the impact of such errors on correlation analyses. Such a model, in principle, also allows to recover the unbiased values of the parameters of interest (e.g., the true correlation between two speakers), by translating bias into larger posteriors on the parameters.

Installation

  1. The installation of this repository requires DataLad (apt install datalad on Linux; brew install datalad on MacOS; read more, including instructions for windows, here)

  2. Once DataLad is installed, the repository can be installed:

datalad install -r git@gin.g-node.org:/LAAC-LSCP/speaker-confusion-model.git

This requires access to the corpora that are used to train the model.

  1. Install necessary packages
pip install -r requirements.txt

Run the model

Command-Line Arguments

The model can be found in code/models/main.py. Running the model simultaneously performs the two following tasks:

  1. Deriving the confusion rates and their posterior distribution
  2. Generating null-hypothesis samples (i.e. assuming no true correlation between speakers' amounts of speech) simulating a 40 children corpora with 8 recorded hours each.
$ python code/models/main.py  --help
usage: main.py [-h] [--group {corpus,child}] [--chains CHAINS] [--samples SAMPLES] [--validation VALIDATION] [--output OUTPUT]

main model described throughout the notes.

optional arguments:
  -h, --help            show this help message and exit
  --group {corpus,child}
  --chains CHAINS
  --samples SAMPLES
  --validation VALIDATION
  --output OUTPUT

The --group parameter controls the primary level of the hierarchical model. The model indeed assumes that confusion rates (i.e. confusion probabilities) vary across corpora (corpus) or children (child).

The --chains parameter sets the amount of MCMC chains, and --samples controls the amount of MCMC samples, warmup excluded.

The --validation parameter sets the amount of annotation clips used for validation rather than training. Set it to 0 in order to use as much data for training as possible.

The --output parameter controls the output destination. Training data will be saved to output/samples/data_{output}.pickle and the MCMC samples are saved as output/samples/fit_{output}.parquet

### Confusion probabilities

The marginal posterior distribution of the confusion matrix is shown below:

### Speech distribution

Speech distributions used to generate the simulated "null-hypothesis" corpora are fitted against the training data using Gamma distributions. The code used to fit these distributions is found in code/models/speech_distribution.

The match between the training data and the Gamma parametrization can be observed in various plots in output. See below for the Key child: