Skip to main content

utmosv2

This repository is a fork of the original UTMOS v2 project, maintained by the Hyperion organization. It packages the original implementation under the distribution name hyperion-utmosv2 and adjusts dependency constraints so it can coexist with Hyperion. It is not an official UTMOS release and is not necessarily endorsed by the original authors.

The original utmosv2 Python import name is intentionally preserved:

import utmosv2

The original MIT license, copyright notice, paper citation, and attribution are preserved in this fork.

UTMOSv2: UTokyo-SaruLab MOS Prediction System

🎤✨ Original project's official implementation ✨🎤
“The T05 System for The VoiceMOS Challenge 2024:
Transfer Learning from Deep Image Classifier to Naturalness MOS Prediction of High-Quality Synthetic Speech”
🏅🎉 accepted by IEEE Spoken Language Technology Workshop (SLT) 2024. 🎉🏅

ꔫ・-・ꔫ・-・ꔫ・-・ꔫ・-・ꔫ・-・ꔫ・-・ꔫ・-・ꔫ

✨  UTMOSv2 achieved 1st place in 7 out of 16 metrics  ✨
✨🏆    and 2nd place in the remaining 9 metrics    🏆✨
✨    in the VoiceMOS Challenge 2024 Track1!    ✨


🚀 Quick Prediction

✨ You can easily use the pretrained UTMOSv2 model!

🛠️ Using in your Python code 🛠️

✨⚡️ With the UTMOSv2 library, you can easily integrate it into your Python code, ⚡️✨
✨ allowing you to quickly create models and make predictions with minimal effort!! ✨

If you want to make predictions using the UTMOSv2 library, follow these steps:

  1. Install the Hyperion-maintained package from PyPI

    pip install hyperion-utmosv2
    

    This package can be installed in the same environment as Hyperion. Install Hyperion according to its own documentation, then install hyperion-utmosv2 in that environment.

  2. Make predictions

    • To predict the MOS of a tensor or array already loaded in memory:

      import utmosv2
      
      model = utmosv2.create_model(pretrained=True)
      # data: torch.Tensor or np.ndarray with shape (batch_size, sequence_length) or (sequence_length,)
      # sr: Sampling rate of the input audio data. If not provided, it defaults to 16000 Hz.
      mos = model.predict(
          data=data, sr=16000
      )  # Returns a torch.Tensor or np.ndarray with shape (batch_size,) or (1,)
      
    • To predict the MOS of a single .wav file:

      import utmosv2
      
      model = utmosv2.create_model(pretrained=True)
      mos = model.predict(input_path="/path/to/wav/file.wav")  # Returns a float value
      
    • To predict the MOS of all .wav files in a folder:

      import utmosv2
      
      model = utmosv2.create_model(pretrained=True)
      mos = model.predict(
          input_dir="/path/to/wav/dir/"
      )  # Returns a list of dicts with 'file_path' and 'predicted_mos' keys
      

📜 Using the inference script 📜

If you want to make predictions using the inference script, follow these steps:

  1. Clone this repository and navigate to UTMOSv2 folder

    git clone https://github.com/sarulab-speech/UTMOSv2.git
    cd UTMOSv2
    
  2. Install Package

    pip install -e '.[optional]'
    
  3. Make predictions

    • To predict the MOS of a single .wav file:

      python inference.py --input_path /path/to/wav/file.wav --out_path /path/to/output/file.csv
      
    • To predict the MOS of all .wav files in a folder:

      python inference.py --input_dir /path/to/wav/dir/ --out_path /path/to/output/file.csv
      

🤗 You can try a simple demonstration on Hugging Face Space: Hugging Face Spaces

Model files, external assets, and limitations

The Python package does not bundle model checkpoints, datasets, caches, or audio files. create_model(pretrained=True) downloads the pretrained checkpoint at runtime from the upstream UTMOSv2 Hugging Face repository and stores it in the local UTMOSv2 cache; network access is therefore required for the first pretrained-model use. A custom checkpoint can be supplied with checkpoint_path. The package also relies on external pretrained transformer assets when the selected configuration uses them.

Dataset licenses and usage terms vary by dataset; see docs/datasets.md and comply with each dataset's terms. The code is distributed under the MIT license in LICENSE, while pretrained weights, model cards, datasets, and third-party assets may have separate terms. Review those terms before redistribution or commercial use. Predictions are model estimates and may not be suitable as the sole basis for safety-critical, compliance, or other high-stakes decisions.

Publishing and release setup

The distribution name is hyperion-utmosv2; the import name remains utmosv2. The repository's release workflow builds and validates source and wheel distributions, then publishes only when a GitHub Release is published using PyPI Trusted Publishing/OIDC.

Before the first release:

  1. Verify the PyPI project page is unavailable or belongs to this organization. If the name is taken, choose a different distribution name and update pyproject.toml, this README, and the Trusted Publisher configuration.

  2. On PyPI, add a Trusted Publisher for owner hyperion-ml, repository UTMOSv2, workflow .github/workflows/python-publish.yml, and environment pypi.

  3. In GitHub, create the pypi environment. Require approval from an appropriate maintainer and restrict deployments to the release workflow or protected release rules as appropriate for the organization. Do not add a PyPI API token; the workflow uses OIDC.

  4. Merge the workflow to the repository's default main branch. Create a GitHub Release with a new tag (for example v1.3.1) and publish the release. A draft or prerelease does not trigger this workflow.

  5. Verify the files, metadata, and installation from PyPI:

    python -m pip install --upgrade hyperion-utmosv2
    python -c "import utmosv2; print(utmosv2.__version__)"
    

    Also inspect the PyPI project page and python -m pip show hyperion-utmosv2. Use python -m build and twine check dist/* before release.

If hyperion-utmosv2 is already registered, do not attempt to claim or overwrite it. Confirm ownership and contact the current owner if appropriate, or select an available name and update all package and publishing references consistently.

⚒️ Train UTMOSv2 Yourself

If you want to train UTMOSv2 yourself, please refer to the training guide. To reproduce the training as described in the paper or used in the competition, please refer to this document.

📂 Used Datasets

Details of the datasets used in this project can be found in the datasets documentation.

🔖 Citation

If you find UTMOSv2 useful in your research, please cite the following paper:

@inproceedings{baba2024utmosv2,
  title     = {The T05 System for The {V}oice{MOS} {C}hallenge 2024: Transfer Learning from Deep Image Classifier to Naturalness {MOS} Prediction of High-Quality Synthetic Speech},
  author    = {Baba, Kaito and Nakata, Wataru and Saito, Yuki and Saruwatari, Hiroshi},
  booktitle = {IEEE Spoken Language Technology Workshop (SLT)},
  year      = {2024},
  pages     = {818--824},
  doi       = {10.1109/SLT61566.2024.10832315},
}

:octocat: GitHub Star History

GitHub Star History

Metadata

Release files for hyperion-utmosv2 1.3.1

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

Source distribution (sdist)

Source distribution for hyperion-utmosv2 1.3.1
File Size Uploaded
hyperion_utmosv2-1.3.1.tar.gz 35.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hyperion-utmosv2 1.3.1
File Interpreter ABI Platform
hyperion_utmosv2-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 115.8 kB

Release files / hyperion_utmosv2-1.3.1.tar.gz

Download URL hyperion_utmosv2-1.3.1.tar.gz
Size 35.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b915327a397b443b4fae7bb8ab82fa471d8f7fff4b49add67a4db2fdbec6c0e4
BLAKE2b-256 checksum
How to use checksums
d854fd34c8bc93f0fe8838495c7ec4c7701fec9ba6c613fd9ae9a02a594fc88d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / hyperion_utmosv2-1.3.1-py3-none-any.whl

Download URL hyperion_utmosv2-1.3.1-py3-none-any.whl
Size 80.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8f306c4108fd8273ee5975ec12e6180ac9e4e45f9b541a6a55d7724fd39b322
BLAKE2b-256 checksum
How to use checksums
49061e8c806f3cfcc749c9d54dfc7df052533371ba8bcac41793c9bb26eca9b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.1 This release

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