Command-line interface to evaluate text-to-speech mean opinion score studies done on Amazon Mechanical Turk.
Project description
tts-mos-test-mturk
Command-line interface (CLI) to evaluate text-to-speech (TTS) mean opinion score (MOS) studies done on Amazon Mechanical Turk (MTurk).
Features
init
: initialize project from .json-filemasks
create
: create empty maskmask-workers-by-id
: mask workers by their WorkerIdmask-workers-by-age-group
: mask workers by their age groupmask-workers-by-gender
: mask workers by their gendermask-workers-by-assignments-count
: mask workers by their count of assignmentsmask-workers-by-masked-ratings-count
: mask workers by their count of masked ratingsmask-workers-by-correlation
: mask workers by their algorithm/sentence correlationmask-workers-by-correlation-percent
: mask workers by their algorithm/sentence correlation (percentage-wise)mask-assignments-by-id
: mask assignments by their AssignmentIdmask-assignments-by-device
: mask assignments by their listening devicemask-assignments-by-status
: mask assignments by their statusmask-assignments-by-time
: mask assignments by their submit timemask-rating-outliers
: mask outlying ratingsmerge-masks
: merge masks togetherreverse-mask
: reverse mask
stats
print-mos
: print MOS and CI95print-masking-stats
: print masking statisticsprint-worker-stats
: print worker statistics for each algorithmprint-assignment-stats
: print assignment statistics for each workerprint-sentence-stats
: print sentence statistics for each algorithmprint-data
: print all data points
mturk
prepare-approval
: generate approval fileprepare-rejection
: generate rejection fileprepare-bonus-payment
: generate bonus payment file
Installation
pip install tts-mos-test-mturk --user
Usage
usage: mos-cli [-h] [-v] {init,masks,stats,mturk} ...
CLI to evaluate text-to-speech MOS studies done on MTurk.
positional arguments:
{init,masks,stats,mturk}
description
init initialize project from .json-file
masks masks commands
stats stats commands
mturk mturk commands
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
Project JSON example
{
"algorithms": [
"alg1",
"alg2",
"alg3",
"alg4"
],
"files": [
"file1",
"file2",
"file3"
],
"workers": {
"worker1": {
"gender": "male",
"age_group": "18-29",
"assignments": {
"assignment1": {
"device": "headphone",
"state": "Approved",
"hit": "hit1",
"time": "13.07.23 05:08:04",
"ratings": [
{
"algorithm": "alg1",
"file": "file1",
"votes": {
"naturalness": 3,
"intelligibility": 5
}
},
{
"algorithm": "alg2",
"file": "file3",
"votes": {
"naturalness": 2,
"intelligibility": 4
}
}
]
}
}
}
}
}
For a longer example see etc/example.json. It contains 4 algorithms and 120 files which were rated by 36 dummy workers in batches of 10 files per assignment. An example parsing of that file is under etc/example.sh.
Roadmap
- add
masks mask-assignments-not-of-last-month/week/day
- make device, state, hit and time optional
- make tax value optional
Dependencies
numpy
pandas
tqdm
ordered-set>=4.1.0
mean-opinion-score==0.0.2
Contributing
If you notice an error, please don't hesitate to open an issue.
Development setup
# update
sudo apt update
# install Python 3.8, 3.9, 3.10 & 3.11 for ensuring that tests can be run
sudo apt install python3-pip \
python3.8 python3.8-dev python3.8-distutils python3.8-venv \
python3.9 python3.9-dev python3.9-distutils python3.9-venv \
python3.10 python3.10-dev python3.10-distutils python3.10-venv \
python3.11 python3.11-dev python3.11-distutils python3.11-venv
# install pipenv for creation of virtual environments
python3.8 -m pip install pipenv --user
# check out repo
git clone https://github.com/stefantaubert/tts-mos-test-mturk.git
cd tts-mos-test-mturk
# create virtual environment
python3.8 -m pipenv install --dev
Running the tests
# first install the tool like in "Development setup"
# then, navigate into the directory of the repo (if not already done)
cd tts-mos-test-mturk
# activate environment
python3.8 -m pipenv shell
# run tests
tox
Final lines of test result output:
py38: commands succeeded
py39: commands succeeded
py310: commands succeeded
py311: commands succeeded
congratulations :)
License
MIT License
Acknowledgments
- Ribeiro, F., Florêncio, D., Zhang, C., & Seltzer, M. (2011). CrowdMOS: An approach for crowdsourcing mean opinion score studies. 2011 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2416–2419. https://doi.org/10.1109/ICASSP.2011.5946971
Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410
Citation
If you want to cite this repo, you can use this BibTeX-entry generated by GitHub (see About => Cite this repository).
Taubert, S. (2024). tts-mos-test-mturk (Version 0.0.2) [Computer software]. https://doi.org/10.5281/zenodo.10461539
Changelog
- v0.0.2 (2024-01-05)
- Bugfix:
mask mask-workers-by-correlation-percent
: sorting was not always correct
- Added:
mask mask-workers-by-correlation-percent
: added option to include masked workers in percentage calculationmturk prepare-bonus-payment
: added logging of fees for Mechanical Turkmturk prepare-approval
: added logging of fees for Mechanical Turk- added
mask mask-assignments-by-status
- added
mask mask-assignments-by-time
- added parsing of
HITId
- added option to mask assignments before preparing rejection CSV
- added
!
before mask name reverses mask on input - added
masks mask-assignments-by-id
- added
masks mask-workers-by-id
- Changed:
- moved template creation and preparation to another repository
- removed worktime parsing
- Bugfix:
- v0.0.1 (2023-02-23)
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tts-mos-test-mturk-0.0.2.tar.gz
.
File metadata
- Download URL: tts-mos-test-mturk-0.0.2.tar.gz
- Upload date:
- Size: 76.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bbeeacaf79cf809f5969e8f7539f744ceee1c4524236d43a64509dd5a008cb3 |
|
MD5 | 03c2a77438ffa0ce2d294304bc1f8c7a |
|
BLAKE2b-256 | 41bb6b7f7e85c21866c9b6759a83da9b49526ee3943d6397cbabe641a0ff1b19 |
File details
Details for the file tts_mos_test_mturk-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: tts_mos_test_mturk-0.0.2-py3-none-any.whl
- Upload date:
- Size: 68.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 763b4d70c3d06d19a4b0072d2874587953d0c491c1ba401c7958b76847ad6996 |
|
MD5 | 7415b06679b07278b4485e70e862365c |
|
BLAKE2b-256 | 05e97fc63c74ac9eae4d83f2d13516199821e99d0fe55ad9eac09841181dae81 |