Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ celerybeat.pid

# Environments
.env
.venv
tools/venv
env/
venv/
ENV/
Expand All @@ -127,7 +127,7 @@ dmypy.json

# Pyre type checker
.pyre/

*.lock
exp/
downloads/
data/
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can use the `_id` argument to specify which pre-trained model to use. If not
> Since SHEET is a on-going project, if you use our pre-trained model in you paper, it is suggested to specify the version. For instance: `SHEET SSL-MOS v0.1.0`, `SHEET SSL-MOS v0.2.5`, etc.

> [!TIP]
> You don't need to install sheet following the [installation instructions](#instsallation). However, you might need to install the following:
> You don't need to install sheet following the [installation instructions](#installation). However, you might need to install the following:
> ```
> sheet-sqa
> huggingface_hub
Expand All @@ -63,18 +63,18 @@ You can use the `_id` argument to specify which pre-trained model to use. If not
1.5806346
```

## Instsallation
## installation

Full installation is needed if your goal is to do **training**.

### Editable installation with virtualenv

You don't need to prepare an environment (using conda, etc.) first. The following commands will automatically construct a virtual environment in `tools/`. When you run the recipes, the scripts will automatically activate the virtual environment.
First install the uv package manager [here](https://docs.astral.sh/uv/getting-started/installation/). Then, use the following commands to automatically construct a virtual environment in `tools/venv`. When you run the recipes, the scripts will automatically activate the virtual environment.

```bash
git clone https://github.com/unilight/sheet.git
cd sheet/tools
make
cd sheet
bash install.sh train
```

## Information
Expand Down
2 changes: 1 addition & 1 deletion egs/bvcc/path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ -e "${PRJ_ROOT}/tools/venv/bin/activate" ]; then
fi

MAIN_ROOT=$PWD/../..
export PATH=$MAIN_ROOT/sheet/bin:$PATH
export PATH=$MAIN_ROOT/src/sheet/bin:$PATH

# python related
export OMP_NUM_THREADS=1
Expand Down
7 changes: 6 additions & 1 deletion hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
"""torch.hub configuration."""

dependencies = ["yaml", "torch", "torchaudio", "sheet", "huggingface_hub"]

import sys
import os
import torch
import torch.nn.functional as F
import torchaudio
import yaml
from huggingface_hub import hf_hub_download

repo_root = os.path.dirname(os.path.abspath(__file__))
src_path = os.path.join(repo_root, "src")
if src_path not in sys.path:
sys.path.insert(0, 0, src_path)

FS = 16000
resamplers = {}
MIN_REQUIRED_WAV_LENGTH = 1040
Expand Down
13 changes: 13 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -e

uv venv tools/venv
source tools/venv/bin/activate

if [[ "$1" == "train" ]]; then
echo "Including 'train' extras..."
uv sync --extra train --active
else
echo "Syncing without 'train' extras..."
uv sync --active
fi
42 changes: 41 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "sheet"
version = "0.2.5"
description = "Speech Human Evaluation Estimation Toolkit (SHEET)"
requires-python = "==3.10.13"

authors = [
{ name = "Wen-Chin Huang", email = "wen.chinhuang@g.sp.m.is.nagoya-u.ac.jp" }
]

dependencies = [
"torch==2.0.1",
"torchaudio==2.0.2",
"numpy==1.26.4",
"h5py>=3.15.1",
"pyyaml>=6.0.3",
"transformers>=4.57.1",
"scipy>=1.15.3",
"soundfile>=0.13.1",
"soxr>=1.0.0",
"wheel>=0.45.1",
"s3prl>=0.4.18",
]

[project.optional-dependencies]
train = [
"matplotlib>=3.10.7",
"tqdm>=4.67.1",
"gdown",
"tensorboardx>=2.6.4",
"kaldiio>=2.14.1",
"humanfriendly>=10.0",
"prettytable>=3.16.0",
]

[tool.setuptools]
packages = [
"sheet"
]
41 changes: 0 additions & 41 deletions setup.cfg

This file was deleted.

1 change: 1 addition & 0 deletions sheet/models/utmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def __init__(
decoder_activation: str = "ReLU",
output_type: str = "scalar",
range_clipping: bool = True,
num_domains: int = None,
):
super().__init__() # this is needed! or else there will be an error.
self.use_mean_listener = use_mean_listener
Expand Down