Skip to main content
# Phoneme Forced Aligner


This package was designed to intake human data from Makin Lab (.txt and .wav file from the block needed phoneme alignment) and ouput a JSON file with the mike-on and mike-off times and the alignments (start time, transcription method, production 1, phoneme list 1, production 2, phoneme list 2).

## Getting Started

These instructions will give you a copy of the project up and running on
your local machine for development and testing purposes.

### Installing

This is a pip installable package. Therefore, run the following command:
____________________________________________________

## Functions

### get_forced_aligment()
input: block txt path, block wav path, output transcription json path, transcription method, critical error threshold, verbose
functionality:
- determine which transcript will be used based on transcription method input (Critical Error, Wav2Vec, Original)
- run Montreal Forced aligner (input trials directory and verbose and returns text grid)
- demarcate JSON
- clean directories
____________________________________________________

### demarcate_to_json()
input: trial directory, block path, text grid directory, output json file path
functionality:
- read textgrid
- use ER-demarcation Algorithm to denote phoneme split
- use ER-demarcation to denote transcript split
- write to Phoneme Json (see output format)
____________________________________________________

### clean_directories()
input: list of temp directories created
functionality: clean and remove directory
____________________________________________________

### parse_block()
input: wav file path, txt file path, trials directory, verbose
functionality:
- create a Trial Directory (same name as the label): each trial is a .wav and a .txt
- Trial Directory:
Trials dir:
trial.wav
trial.txt
...
Trial transcription method .json

TranscriptionMethod.json format:
{
trial start-time (float): method ('wav2vec' or 'original'),
...
}
____________________________________________________

## Notes
For a more in depth explanation in the methods used in this package, as well as the reasoning behind, refer back to the paper.

## Authors

- **James Willian Stonebridge**
- **Herbert Alexander de Bruyn**
- **Tyler Dierckman**

## License

This project is licensed under the MIT License.

## Acknowledgments

- Varun implemented the original code for Wav2Vec2 based transcription used in this package.

Release files for align-phonemes 0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for align-phonemes 0.12
File Size Uploaded
align_phonemes-0.12.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for align-phonemes 0.12
File Interpreter ABI Platform
align_phonemes-0.12-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / align_phonemes-0.12.tar.gz

Download URL align_phonemes-0.12.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca1d066007a05ef0a844c4d20bca35c138837de0e218e97b7e8197088c4edf9
BLAKE2b-256 checksum
How to use checksums
773017ec24fbc4000808fef0a99489f67aee686b695bb849a917910735dbcb43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.1

Release files / align_phonemes-0.12-py3-none-any.whl

Download URL align_phonemes-0.12-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c5a686b85265c5db949935207ea009af456c2246cc26fa6a4d693b26ea41967
BLAKE2b-256 checksum
How to use checksums
cdac96c5c51fedebf6e0b2b08c3f16612edde91f0618e7bdf2d3ee69cb45dff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.1

Release history Release notifications | RSS feed

This release

0.12 This release

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page