skillfed

pyworld

PyWorld: a Python wrapper for WORLD vocoder

pyworld v0.3.5 209.4K downloads/30d#9,513 on PyPI790
License unclear DORMANT released

What it is and what it does

PyWorld is a Python wrapper around the WORLD vocoder, a fast speech analysis and synthesis tool. It decomposes audio into three acoustic features: f0 (pitch contour), sp (harmonic spectral envelope), and ap (aperiodicity), which can then be modified and resynthesized. The package provides low-level functions (dio, stonemask, cheaptrick, d4c) for each analysis step, plus a convenience function (wav2world) that applies all steps with default parameters.

The package depends only on numpy and wraps compiled C++ code, so installation involves building against the bundled WORLD library. Prebuilt wheels are available for Windows and several Python versions, but Linux and macOS users typically need to compile. The project is dormant (last commit 2025-01-21, no recent activity), though it remains functional and has no known vulnerabilities.

Use it for:

  • Extract pitch and spectral features from speech for analysis, visualization, or machine-learning feature engineering.
  • Modify pitch or spectral properties of speech and resynthesize it for voice conversion or prosody manipulation.
  • Analyze speech quality or characteristics in audio processing research or speech enhancement pipelines.
  • Generate synthetic speech variants by decomposing, altering, and resynthesizing audio parameters.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyWorld wraps the WORLD vocoder to decompose speech audio into pitch, harmonic spectral envelope, and aperiodicity components, and to synthesize speech from those parameters.

Yes, if you need speech vocoding and can tolerate compilation friction. PyWorld is stable, has no known vulnerabilities, and is well-suited for speech analysis and synthesis tasks. However, verify the license terms first (they are not recorded in package metadata), and be aware that the project is dormant—expect no active maintenance. Windows users will have the easiest installation experience.

Install

pyworld on PyPI

pip

pip install pyworld

uv

uv add pyworld

poetry

poetry add pyworld

Installing pyworld

Before you install

Medium friction: requires compilation against the bundled WORLD C++ library. Prebuilt wheels exist for Windows and several Python versions, but Linux and macOS users may need to build from source. Last release was recent (2025-01-20), though the project is dormant overall.

License in practice

License status is unclear—no SPDX identifier or raw license text is recorded in the package metadata. Users should verify the license terms in the repository before adopting this package in commercial or restricted contexts.

Quickstart

import pyworld as pw
import numpy as np

# Assuming x is a numpy array of audio samples and fs is sample rate
f0, t = pw.dio(x, fs)
f0 = pw.stonemask(x, f0, t, fs)
sp = pw.cheaptrick(x, f0, t, fs)
ap = pw.d4c(x, f0, t, fs)
y = pw.synthesize(f0, sp, ap, fs)

WORLD vocoder is designed for speech sampled at ≥16 kHz; applying it to lower sample rates will fail. Compilation from source requires a C++ build toolchain.

Verify before relying

  • Whether the license is compatible with your intended use (metadata does not specify).
  • Whether the package builds successfully on macOS or non-Windows Linux distributions without additional system dependencies beyond those documented.
  • Specific Cython version requirements for building from source on different platforms.

Package facts

License not declared (unclear)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies 1 — numpy
Maintenance dormant — 571 days since the last release
Last repo commit
First released
Downloads 209,434/month — #9,513 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyworld-0.3.5-cp310-cp310-win_amd64.whl; pyworld-0.3.5-cp311-cp311-win_amd64.whl; pyworld-0.3.5-cp312-cp312-win_amd64.whl; pyworld-0.3.5-cp313-cp313-win_amd64.whl; pyworld-0.3.5-cp36-cp36m-win32.whl; pyworld-0.3.5-cp36-cp36m-win_amd64.whl; pyworld-0.3.5-cp37-cp37m-win32.whl; pyworld-0.3.5-cp37-cp37m-win_amd64.whl; pyworld-0.3.5-cp38-cp38-win_amd64.whl; pyworld-0.3.5-cp39-cp39-win_amd64.whl

Keywords: vocoder

Tags

speech vocoder pitch extractionaudio feature decompositionspeech synthesis from parametersf0 spectral envelope extractionvoice analysis and resynthesis
speech-processingaudio-analysisvocoder

More Scientific/Engineering packages