Skip to main content

pylstraight

This is an unofficial Python reimplementation of the legacy-STRAIGHT, which was originally written in MATLAB.

Manual Downloads ClickPy Python Version PyPI Anaconda Codecov License GitHub Actions Ruff

Requirements

  • Python 3.8+

Documentation

Installation

The latest stable release can be installed from PyPI by running the command below.

pip install pylstraight

The development release can be installed from the master branch using the following command:

pip install git+https://github.com/takenori-y/pylstraight.git@master

Supported Features

  • Fundamental frequency extraction
  • Aperiodicity measure extraction
  • Spectral envelope extraction
  • Synthesis using the extracted parameters

Unsupported Features

  • Batch processing
  • GPU acceleration
  • JIT compilation

Example

import pylstraight as pyls

# Read an example waveform.
x, fs = pyls.read("assets/data.wav")

# Set control parameters.
fp = 5                # Frame shift in msec
f0_range = (60, 240)  # F0 search range in Hz

# Extract the STRAIGHT parameters.
f0 = pyls.extract_f0(x, fs, f0_range=f0_range, frame_shift=fp)
ap = pyls.extract_ap(x, fs, f0, frame_shift=fp)
sp = pyls.extract_sp(x, fs, f0, frame_shift=fp)

# Synthesize a waveform using the parameters.
sy = pyls.synthesize(f0, ap, sp, fs, frame_shift=fp)

# Write the synthesized waveform.
pyls.write("data.syn.wav", sy, fs)

License

The original code is licensed under the Apache License 2.0.

Metadata

Release files for pylstraight 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylstraight 0.1.3
File Size Uploaded
pylstraight-0.1.3.tar.gz 35.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylstraight 0.1.3
File Interpreter ABI Platform
pylstraight-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 78.7 kB

Release files / pylstraight-0.1.3.tar.gz

Download URL pylstraight-0.1.3.tar.gz
Size 35.8 kB
Tags Source
SHA-256 checksum
How to use checksums
549c32177a665887045280264ae320df6628d2ceb0b97d93ad5e2b6630c34710
BLAKE2b-256 checksum
How to use checksums
375658c97e422091bc7a2c1c2ebb5bb39e3166c3c5a51716a05d58dd691078b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.12

Release files / pylstraight-0.1.3-py3-none-any.whl

Download URL pylstraight-0.1.3-py3-none-any.whl
Size 42.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7a36f912a899d536f48c8302812c6ec504352916c0b6d4aee052ce59e73579a
BLAKE2b-256 checksum
How to use checksums
dab05e4ad8fe3ea982a1bdace40ccefe541d360589c121f3a54cd8ae2b23048a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.12

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page