niobures / FCPE

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: September 25 2025

Introduction of FCPE

Model Details of FCPE

TorchFCPE

Overview

TorchFCPE(Fast Context-based Pitch Estimation) is a PyTorch-based library designed for audio pitch extraction and MIDI conversion. This README provides a quick guide on how to use the library for audio pitch inference and MIDI extraction.

Note: that the MIDI extractor of FCPE is quantized from f0 using non neural network methods

Note: I won't be updating FCPE (or benchmark) so soon, but I will definitely release a version with cleaned-up code by no later than next year.

Installation

Before using the library, make sure you have the necessary dependencies installed:

pip install torchfcpe
Usage
1. Audio Pitch Inference
from torchfcpe import spawn_bundled_infer_model
import torch
import librosa

# Configure device and target hop size
device = 'cpu'  # or 'cuda' if using a GPU
sr = 16000  # Sample rate
hop_size = 160  # Hop size for processing

# Load and preprocess audio
audio, sr = librosa.load('test.wav', sr=sr)
audio = librosa.to_mono(audio)
audio_length = len(audio)
f0_target_length = (audio_length // hop_size) + 1
audio = torch.from_numpy(audio).float().unsqueeze(0).unsqueeze(-1).to(device)

# Load the model
model = spawn_bundled_infer_model(device=device)

# Perform pitch inference
f0 = model.infer(
    audio,
    sr=sr,
    decoder_mode='local_argmax',  # Recommended mode
    threshold=0.006,  # Threshold for V/UV decision
    f0_min=80,  # Minimum pitch
    f0_max=880,  # Maximum pitch
    interp_uv=False,  # Interpolate unvoiced frames
    output_interp_target_length=f0_target_length,  # Interpolate to target length
)

print(f0)
2. MIDI Extraction
# Extract MIDI from audio
midi = model.extact_midi(
    audio,
    sr=sr,
    decoder_mode='local_argmax',  # Recommended mode
    threshold=0.006,  # Threshold for V/UV decision
    f0_min=80,  # Minimum pitch
    f0_max=880,  # Maximum pitch
    output_path="test.mid",  # Save MIDI to file
)

print(midi)
Notes
  • Inference Parameters:

    • audio : Input audio as a torch.Tensor .
    • sr : Sample rate of the audio.
    • decoder_mode (Optional): Mode for decoding, 'local_argmax' is recommended.
    • threshold (Optional): Threshold for voice/unvoiced decision; default is 0.006.
    • f0_min (Optional): Minimum pitch value; default is 80 Hz.
    • f0_max (Optional): Maximum pitch value; default is 880 Hz.
    • interp_uv (Optional): Whether to interpolate unvoiced frames; default is False.
    • output_interp_target_length (Optional): Length to which the output pitch should be interpolated.
  • MIDI Extraction Parameters:

    • audio : Input audio as a torch.Tensor .
    • sr : Sample rate of the audio.
    • decoder_mode (Optional): Mode for decoding; 'local_argmax' is recommended.
    • threshold (Optional): Threshold for voice/unvoiced decision; default is 0.006.
    • f0_min (Optional): Minimum pitch value; default is 80 Hz.
    • f0_max (Optional): Maximum pitch value; default is 880 Hz.
    • output_path (Optional): File path to save the MIDI file. If not provided, only returns the MIDI structure.
    • tempo (Optional): BPM for the MIDI file. If None, BPM is automatically predicted.
Additional Features
  • Model as a PyTorch Module: You can use the model as a standard PyTorch module. For example:

    # Change device
    model = model.to(device)
    
    # Compile model
    model = torch.compile(model)
    
Paper

If you find our work useful, please consider citing the paper:

@misc{luo2025fcpefastcontextbasedpitch,
      title={FCPE: A Fast Context-based Pitch Estimation Model}, 
      author={Yuxin Luo and Ruoyi Zhang and Lu-Chuan Liu and Tianyu Li and Hangyu Liu},
      year={2025},
      eprint={2509.15140},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2509.15140}, 
}
Important details

The model we use in our paper is DDSP-200K, you can get the model from here: DDSP-200K Model .

And there's another model which released earlier, you can get it from here FCPE-Previous .

More information about experiments will be released after the paper is accepted or rejected.

Runs of niobures FCPE on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About FCPE huggingface.co Model

FCPE huggingface.co

FCPE huggingface.co is an AI model on huggingface.co that provides FCPE's model effect (), which can be used instantly with this niobures FCPE model. huggingface.co supports a free trial of the FCPE model, and also provides paid use of the FCPE. Support call FCPE model through api, including Node.js, Python, http.

niobures FCPE online free

FCPE huggingface.co is an online trial and call api platform, which integrates FCPE's modeling effects, including api services, and provides a free online trial of FCPE, you can try FCPE online for free by clicking the link below.

niobures FCPE online free url in huggingface.co:

https://huggingface.co/niobures/FCPE

FCPE install

FCPE is an open source model from GitHub that offers a free installation service, and any user can find FCPE on GitHub to install. At the same time, huggingface.co provides the effect of FCPE install, users can directly use FCPE installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

FCPE install url in huggingface.co:

https://huggingface.co/niobures/FCPE

Url of FCPE

Provider of FCPE huggingface.co

niobures
ORGANIZATIONS

Other API from niobures

huggingface.co

Total runs: 1.4K
Run Growth: 768
Growth Rate: 53.33%
Updated:April 27 2026
huggingface.co

Total runs: 522
Run Growth: 0
Growth Rate: 0.00%
Updated:March 08 2026
huggingface.co

Total runs: 330
Run Growth: 0
Growth Rate: 0.00%
Updated:March 09 2026
huggingface.co

Total runs: 195
Run Growth: 168
Growth Rate: 86.15%
Updated:October 24 2025
huggingface.co

Total runs: 31
Run Growth: -17
Growth Rate: -54.84%
Updated:August 17 2026
huggingface.co

Total runs: 23
Run Growth: 21
Growth Rate: 91.30%
Updated:March 02 2026
huggingface.co

Total runs: 22
Run Growth: -16
Growth Rate: -72.73%
Updated:October 25 2025
huggingface.co

Total runs: 20
Run Growth: 0
Growth Rate: 0.00%
Updated:October 22 2025
huggingface.co

Total runs: 18
Run Growth: -29
Growth Rate: -161.11%
Updated:June 13 2025
huggingface.co

Total runs: 17
Run Growth: 17
Growth Rate: 100.00%
Updated:September 07 2026
huggingface.co

Total runs: 16
Run Growth: 0
Growth Rate: 0.00%
Updated:June 23 2025
huggingface.co

Total runs: 11
Run Growth: 0
Growth Rate: 0.00%
Updated:November 10 2025
huggingface.co

Total runs: 10
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2026
huggingface.co

Total runs: 10
Run Growth: 0
Growth Rate: 0.00%
Updated:November 12 2025
huggingface.co

Total runs: 7
Run Growth: 0
Growth Rate: 0.00%
Updated:April 30 2026
huggingface.co

Total runs: 7
Run Growth: 0
Growth Rate: 0.00%
Updated:October 02 2025
huggingface.co

Total runs: 6
Run Growth: 5
Growth Rate: 83.33%
Updated:November 17 2025
huggingface.co

Total runs: 5
Run Growth: 0
Growth Rate: 0.00%
Updated:November 14 2025
huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:September 26 2025
huggingface.co

Total runs: 2
Run Growth: 0
Growth Rate: 0.00%
Updated:November 10 2025
huggingface.co

Total runs: 1
Run Growth: 0
Growth Rate: 0.00%
Updated:February 27 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 27 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 17 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 27 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 21 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 24 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 09 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 03 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 22 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 08 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 23 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 07 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 19 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 30 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 27 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 08 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 27 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 24 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 16 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 03 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 26 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 26 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 26 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 08 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 27 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 06 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 22 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 30 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 09 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 14 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 06 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 06 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:February 23 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 23 2025