An unofficial Python reimplementation of the legacy-STRAIGHT
Project description
pylstraight
This is an unofficial Python reimplementation of the legacy-STRAIGHT, which was originally written in MATLAB.
Requirements
- Python 3.8+
Documentation
- See this page for the reference manual.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylstraight-0.1.1.tar.gz.
File metadata
- Download URL: pylstraight-0.1.1.tar.gz
- Upload date:
- Size: 35.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0743006c25af482f6d80e4b6a5379540dc60d6866f0cc9fec66386cd521244c7
|
|
| MD5 |
b98111ac69624affa3b83990c9a71838
|
|
| BLAKE2b-256 |
0eeba1b2e0adc9f3bcead22453a846f1f85ba3c0bc25ac42b56cef767683a1a3
|
File details
Details for the file pylstraight-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pylstraight-0.1.1-py3-none-any.whl
- Upload date:
- Size: 42.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
118928af1b835dcad90febc2a76b97a42c6011dfab14fadcd24c6bb5747e86d8
|
|
| MD5 |
8a50639c7d00d15fdb8e8f571c42480d
|
|
| BLAKE2b-256 |
3ff03a58c9544a93db88c8d4e53105303111407b342b671f7090cfc011c9de98
|