Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
Release commit for v1.2.0
  • Loading branch information
tarepan authored Oct 24, 2023
2 parents 5cf009f + 0824824 commit ed25eac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Predict subjective speech score with only 2 lines of code, with various MOS prediction systems.

```python
predictor = torch.hub.load("tarepan/SpeechMOS:v1.1.0", "utmos22_strong", trust_repo=True)
predictor = torch.hub.load("tarepan/SpeechMOS:v1.2.0", "utmos22_strong", trust_repo=True)
score = predictor(wave, sr)
# tensor([3.7730]), good quality speech!
```
Expand All @@ -20,19 +20,19 @@ import torch
import librosa

wave, sr = librosa.load("<your_audio>.wav", sr=None, mono=True)
predictor = torch.hub.load("tarepan/SpeechMOS:v1.1.0", "utmos22_strong", trust_repo=True)
predictor = torch.hub.load("tarepan/SpeechMOS:v1.2.0", "utmos22_strong", trust_repo=True)
score = predictor(torch.from_numpy(wave).unsqueeze(0), sr)
# tensor([3.7730])
```

## How to Use
SpeechMOS use `torch.hub` built-in model loader, so no needs of library import😉
(As general dependencies, SpeechMOS requires Python=>3.10, `torch` and `torchaudio`.)
(As general dependencies, SpeechMOS requires Python=>3.8, `torch` and `torchaudio`.)

First, instantiate a MOS predictor with model specifier string:
```python
import torch
predictor = torch.hub.load("tarepan/SpeechMOS:v1.1.0", "<model_specifier>", trust_repo=True)
predictor = torch.hub.load("tarepan/SpeechMOS:v1.2.0", "<model_specifier>", trust_repo=True)
```

Then, pass tensor of speeches :: `(Batch, Time)`:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "speechmos"
version = "1.1.0"
version = "1.2.0"
description = "Easy-to-Use Speech MOS predictors 🎧"
authors = ["tarepan"]
readme = "README.md"
Expand Down

0 comments on commit ed25eac

Please sign in to comment.