Skip to content

An attempt to time stretch and pitch shift preserving formants via Time-Domain Pitch-Synchronous Overlap and Add

License

Notifications You must be signed in to change notification settings

MLo7Ghinsan/TD-PSOLA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TD-PSOLA

Time-domain
pitch shifting | time stretching | formant shifting
Built on Time-Domain Pitch-Synchronous Overlap and Add (TD-PSOLA)


✨ What is this?

A small experimental TD-PSOLA engine that can:

  • Pitch shift
  • Time stretch
  • Preserve/adjust formants

🧪 Results & Experiments

input | 12 semitones up | 12 semitones down

original spectrogram 12 semitones shift up 12 semitones shift down

drive distortion | fry distortion

drive effect fry effect

for more experiments, please check audio folder


⚙️ Installation

Dependencies:

pip install numpy soundfile praat-parselmouth

Note: praat-parselmouth is used for pitch estimation and epoch marking


🎈 Usage

Example: 12 semitones shift

import soundfile as sf
from td_psola import td_psola # or paste the function into your script

audio, sr = sf.read("input_audio.wav")

result = td_psola(
    audio, sr,
    pitch_semitones=12,
    stretch_factor=1.0,
)

sf.write("output_audio.wav", result, sr)

made with questionable sleep schedules please I am suffering

About

An attempt to time stretch and pitch shift preserving formants via Time-Domain Pitch-Synchronous Overlap and Add

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages