neuro-team-femto / cleese

Combinatorial Expressive Speech Engine
MIT License
42 stars 10 forks source link

Added morphing tutorial + `extract_rms` utility method #34

Closed jjau closed 2 months ago

jjau commented 2 months ago

What

@jptrujillo provided audio files and a use case for using CLEESE to morph pitch and stretch between a source and a target sound. We created code, and a tutorial on how to do that.

How

Added docs/ files (morphing.md + audio and image files) to the documentation. Also needed to include an extract_rms method to PhaseVocoder

Testing

tutorials/morphing/ should display correctly

Usage for extract_rms

import cleese_stim as cleese
from cleese_stim.engines import PhaseVocoder
from matplotlib import pyplot as plt

src_wav, sr, frmt =  PhaseVocoder.wav_read('./sounds/apri_Q.wav')
src_times, src_rms = PhaseVocoder.extract_rms(src_wav, sr, win=.02, thresh=0.02, interpolate=False)
plt.plot(src_times, src_rms, 'o-')