Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xinshengwang/robpitch
A pitch detection model trained to be robust against noise and reverberation environments.
https://github.com/xinshengwang/robpitch
Last synced: 16 days ago
JSON representation
A pitch detection model trained to be robust against noise and reverberation environments.
- Host: GitHub
- URL: https://github.com/xinshengwang/robpitch
- Owner: xinshengwang
- License: apache-2.0
- Created: 2024-08-26T13:41:43.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-09-07T05:12:09.000Z (5 months ago)
- Last Synced: 2024-09-07T17:22:49.032Z (5 months ago)
- Language: Jupyter Notebook
- Size: 264 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RobPitch
## Overview
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.
## Installation via pip
Install RobPitch using the following command:
```
pip install rob-pitch==0.1.2
```### Example of Usage
```
import RobPitchouputs = RobPitch('path/to/audio')
pitch = outputs['pitch']
feature = outputs['latent']
```## Local Setup
### Model Download
- Download the model from ![mdoel](https://modelscope.ai/models/pandamq/robpitch-16k)
### Example of Local Usage
```
import torch
import numpy as npfrom robpitch import RobPitch
from utils.audio import load_audio# Initialize the model
robpitch = RobPitch()
device = torch.device("cpu")# Load model from checkpoint
model = robpitch.load_from_checkpoint(
config_path="config.yaml",
ckpt_path="model.bin",
device=device
)# Load and process the audio
wav = load_audio(
"path/to/audio",
sampling_rate=16000,
volume_normalize=True
)
wav = torch.from_numpy(wav).unsqueeze(0).float().to(device)# Get model outputs
outputs = model(wav)
pitch = outputs['pitch']
latent_feature = outputs['latent']```
For more detailed usage examples, refer to the ![exp/demo.ipynb](exp/demo.ipynb) notebook.