Skip to content

Commit 2a710ed

Browse files
committed
update README
1 parent 98742ca commit 2a710ed

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

README.md

+21-16
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,32 @@
44

55
RobPitch is a pitch detection model trained to be robust against noise and reverberation environments. The model has been trained on 1600 hours of high-quality data, supplemented by an equivalent amount of simulated noisy and reverberant data, ensuring effective performance under challenging acoustic conditions.
66

7-
## Installation
7+
## Installation via pip
8+
9+
Install RobPitch using the following command:
810

911
```
10-
pip install rob-pitch==0.1.0
12+
pip install rob-pitch==0.1.2
1113
```
1214

13-
## Model Download
15+
### Example of Usage
1416

15-
We use modelscope to download pretrained model and config.
16-
```
17-
Python
18-
from modelscope import snapshot_download
19-
model_dir = snapshot_download('pandamq/robpitch-16k')
20-
```
21-
Then copy the model to your local directory if you need.
2217
```
23-
shell
24-
cp -r ~/.cache/modelscope/hub/pandamq/robpitch-16k .
18+
import RobPitch
19+
20+
ouputs = RobPitch('path/to/audio')
21+
22+
pitch = outputs['pitch']
23+
feature = outputs['latent']
2524
```
2625

27-
## Usage Example
26+
## Local Setup
27+
28+
### Model Download
29+
30+
- Download the model from ![mdoel](https://modelscope.ai/models/pandamq/robpitch-16k)
31+
32+
### Example of Local Usage
2833

2934
```
3035
import torch
@@ -39,8 +44,8 @@ device = torch.device("cpu")
3944
4045
# Load model from checkpoint
4146
model = robpitch.load_from_checkpoint(
42-
config_path="robpitch-16k/config.yaml",
43-
ckpt_path="robpitch-16k/model.bin",
47+
config_path="config.yaml",
48+
ckpt_path="model.bin",
4449
device=device
4550
)
4651
@@ -59,4 +64,4 @@ latent_feature = outputs['latent']
5964
6065
```
6166

62-
For more detailed usage examples, refer to the exp/demo.ipynb notebook.
67+
For more detailed usage examples, refer to the ![exp/demo.ipynb](exp/demo.ipynb) notebook.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='rob_pitch',
5-
version='0.1.0',
5+
version='0.1.2',
66
author='Xinsheng Wang, Mingqi Jiang',
77
88
packages=find_packages(),

0 commit comments

Comments
 (0)