Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Pitch Estimating Neural Networks (PENN)
| Date | Stars |
|---|---|
| 2026-07-31 | 279 |
| 2026-08-03 | 279 |
| 2026-08-04 | 279 |
| 2026-08-06 | 279 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<h1 align="center">Pitch-Estimating Neural Networks (PENN)</h1>
<div align="center">
[](https://pypi.python.org/pypi/penn)
[](https://opensource.org/licenses/MIT)
[](https://pepy.tech/project/penn)
</div>
Training, evaluation, and inference of neural pitch and periodicity estimators in PyTorch. Includes the original code for the paper ["Cross-domain Neural Pitch and Periodicity Estimation"](https://arxiv.org/abs/2301.12258).
## Table of contents
- [Installation](#installation)
- [Inference](#inference)
* [Application programming interface](#application-programming-interface)
* [`penn.from_audio`](#pennfrom_audio)
* [`penn.from_file`](#pennfrom_file)
* [`penn.from_file_to_file`](#pennfrom_file_to_file)
* [`penn.from_files_to_files`](#pennfrom_files_to_files)
* [Command-line interface](#command-line-interface)
- [Training](#training)
* [Download](#download)
* [Preprocess](#preprocess)
* [Partition](#partition)
* [Train](#train)
* [Monitor](#monitor)
- [Evaluation](#evaluation)
* [Evaluate](#evaluate)
* [Plot](#plot)
- [Citation](#citation)
## Installation
If you want to perform pitch estimation using a pretrained FCNF0++ model, run
`pip install penn`
If you want to train or use your own models, run
`pip install penn[train]`
## Inference
Perform inference using FCNF0++
```
import penn
# Load audio
audio, sample_rate = torchaudio.load('test/assets/gershwin.wav')
# Here we'll use a 10 millisecond hopsize
hopsize = .01
# Provide a sensible frequency range given your domain and model
fmin = 30.
fmax = 1000.
# Choose a gpu index to use for inference. Set to None to use cpu.
gpu = 0
# If you are using a gpu, pick a batch size that doesn't cause memory errors
# on your gpu
batch_size = 2048
# Select a checkpoint to use for inference. Selecting None will
# download and use FCNF0++ pretrained on MDB-stem-synth and PTDB
checkpoint = None
# Centers frames at hopsize / 2, 3 * hopsize / 2, 5 * hopsize / 2, ...
center = 'half-hop'
# (Optional) Linearly interpolate unvoiced regions below periodicity threshold
interp_unvoiced_at = .065
# (Optional) Select a decoding method. One of ['argmax', 'pyin', 'viterbi'].
decoder = 'viterbi'
# Infer pitch and periodicity
pitch, periodicity = penn.from_audio(
audio,
sample_rate,
hopsize=hopsize,
fmin=fmin,
fmax=fmax,
checkpoint=checkpoint,
batch_size=batch_size,
center=center,
decoder=decoder,
interp_unvoiced_at=interp_unvoiced_at,
gpu=gpu)
```
Note that pitch estimation is performed independently on each frame of audio. Then, a _decoding_ step occurs, which may or may not be computed independently on each frame. Most often, Viterbi decoding is used (as in, e.g., PYIN and CREPE). However, Viterbi decoding is slow. We made a fast Viterbi decoder called [torbi](https://github.com/maxrmorrison/torbi), which [we are working on adding to PyTorch](https://github.com/pytorch/pytorch/issues/121160). Until `torbi` is integrated into PyTorch (or otherwise made pip-installable), it is recommended to use the `dev` branch of `penn`, which uses `torbi` decoding by default, but is not pip-installable. Our paper [_Fine-Grained and Interpretable Neural Speech Editing_](https://www.maxrmorrison.com/sites/promonet/) introduces and demonstrates the efficacy of `torbi` for pitch decoding.
### Application programming interface
#### `penn.from_audio`
```
def from_audio(
audio: torch.Tensor,
sample_rate: int = penn.SAMPLE_RATE,
hopsize: float = penn.HOPSIZE_SECONDS,
fmin: float = penn.FMIN,
fmax: float = penn.FMAX,
checkpoint: Optional[Path] = None,
batch_size: Optional[int] = None,
center: str = 'half-window',
decoder: str = penn.DECODER,
interp_unvoiced_at: Optional[float] = None,
gpu: OptionExcerpt of 12,651 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:307ed81979229a5d, llm:Repository description: 'Pitch Estimating Neural Networks (PENN)'; topics: frequency, music, periodicity, pitch, speech, voicing
matched fp:307ed81979229a5d, llm:Repository description: 'Pitch Estimating Neural Networks (PENN)'; topics: frequency, music, periodicity, pitch, speech, voicing