Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantaubert committed Aug 11, 2023
1 parent e9850ce commit c0849d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ authors:
affiliation: Chemnitz University of Technology
orcid: 'https://orcid.org/0000-0002-4932-2874'
website: 'https://stefantaubert.com/'
version: 0.0.1
date-released: 2023-02-23
version: 0.0.2
date-released: 2023-08-11
license: MIT
url: https://github.com/stefantaubert/mean-opinion-score
doi: 10.5281/zenodo.7670649
doi: 10.5281/zenodo.8238259
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[![MIT](https://img.shields.io/github/license/stefantaubert/mean-opinion-score.svg)](https://github.com/stefantaubert/mean-opinion-score/blob/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/wheel/mean-opinion-score.svg)](https://pypi.python.org/pypi/mean-opinion-score/#files)
![PyPI](https://img.shields.io/pypi/implementation/mean-opinion-score.svg)
[![PyPI](https://img.shields.io/github/commits-since/stefantaubert/mean-opinion-score/latest/master.svg)](https://github.com/stefantaubert/mean-opinion-score/compare/v0.0.1...master)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7670649.svg)](https://doi.org/10.5281/zenodo.7670649)
[![PyPI](https://img.shields.io/github/commits-since/stefantaubert/mean-opinion-score/latest/master.svg)](https://github.com/stefantaubert/mean-opinion-score/compare/v0.0.2...master)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8238259.svg)](https://doi.org/10.5281/zenodo.8238259)

Python library for calculating the mean opinion score (MOS) and 95% confidence interval (CI) of the standard deviation (SD) of text-to-speech (TTS) ratings according to ["Ribeiro, F., Florêncio, D., Zhang, C., & Seltzer, M. (2011). CrowdMOS: An approach for crowdsourcing mean opinion score studies"](https://doi.org/10.1109/ICASSP.2011.5946971). To determine CIs, the authors used a two-way random effects model with the variables: diversity of intrinsic sentence quality, diversity of rater preference, and subjective uncertainty.

Expand Down Expand Up @@ -116,12 +116,12 @@ Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
If you want to cite this repo, you can use this BibTeX-entry generated by GitHub (see *About => Cite this repository*).

```txt
Taubert, S. (2023). mean-opinion-score (Version 0.0.1) [Computer software]. https://doi.org/10.5281/zenodo.7670649
Taubert, S. (2023). mean-opinion-score (Version 0.0.2) [Computer software]. https://doi.org/10.5281/zenodo.8238259
```

## Changelog

- v0.0.2 (unreleased)
- v0.0.2 (2023-08-11)
- Added:
- commonly used 95% confidence interval calculation
- v0.0.1 (2023-02-23)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mean-opinion-score"
version = "0.0.1"
version = "0.0.2"
description = "Library for calculating the mean opinion score and 95% confidence interval of the standard deviation of text-to-speech ratings according to Ribeiro et al. (2011)."
readme = "README.md"
requires-python = ">=3.6, <3.12"
Expand Down
8 changes: 5 additions & 3 deletions src/mean_opinion_score/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# 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
# ------------------------

from math import inf, sqrt
from math import sqrt

import numpy as np
from scipy.stats import norm
from scipy.stats import t as scipy_t


Expand All @@ -30,8 +31,9 @@ def get_ci95_default(Z: np.ndarray) -> float:
"""
Computes the 95% confidence interval.
"""
# 1.959963984540054
z_score = matlab_tinv(0.5 * (1 + 0.95), inf)
# matlab_tinv() doesn't work with inf for py36, py37
# z_score = matlab_tinv(0.5 * (1 + 0.95), inf)
z_score = norm.ppf(0.5 * (1 + 0.95))
s = np.nanstd(Z)
n = get_non_nan_count(Z)
ci95 = z_score * s / sqrt(n)
Expand Down

0 comments on commit c0849d0

Please sign in to comment.