This adds a pitch extractor (YIN) to the cleese.PhaseVocoder engine; can be called statically with PhaseVocoder.extract_pitch(x,sr)
Why?
Previous versions of CLEESE did not include a pitch extractor. While computing pitch is not necessary to manipulate pitch in PhaseVocoder, it is useful to e.g. visualize results and to compute custom BPF for flattening files.
In the audio tutorial, we require that people install pysptk to access a third party pitch extractor (SWIPE), but installing it is cumbersome. Also, it turns out that flattening file in pitch is almost systematic use in CLEESE, so streamlining this is useful.
How?
added a utils.py module in engines/phase_vocoder/.; moved PhaseVocoder functions load_file, wav_read, wav_write and created extract_pitch. All 4 functions in utils have accessors as static methods in the PhaseVocoder class (i.e. one can call PhaseVocoder.extract_pitch)
extract_pitch calls third_party code : a fast implementation of YIN (De Cheveigné & Kawahara) by Patrice Guyot; two files yin.py and audio_processing are copied to the third_party folder
minor API changes: renamed wavRead and wavWrite functions as snake_case; rename MediaPipe as FaceWarp, moved to engine/face_warp
Testing?
tested changes using the audio_tutorial notebook; changed a few things in the notebook (calls to extract_pitch -> PhaseVocoder.extract_pitch; times now in seconds instead of millisec)
What?
This adds a pitch extractor (YIN) to the cleese.PhaseVocoder engine; can be called statically with
PhaseVocoder.extract_pitch(x,sr)
Why?
Previous versions of CLEESE did not include a pitch extractor. While computing pitch is not necessary to manipulate pitch in PhaseVocoder, it is useful to e.g. visualize results and to compute custom BPF for flattening files. In the audio tutorial, we require that people install
pysptk
to access a third party pitch extractor (SWIPE), but installing it is cumbersome. Also, it turns out that flattening file in pitch is almost systematic use in CLEESE, so streamlining this is useful.How?
utils.py
module inengines/phase_vocoder/.
; moved PhaseVocoder functionsload_file
,wav_read
,wav_write
and createdextract_pitch
. All 4 functions in utils have accessors as static methods in thePhaseVocoder
class (i.e. one can callPhaseVocoder.extract_pitch
)extract_pitch
calls third_party code : a fast implementation of YIN (De Cheveigné & Kawahara) by Patrice Guyot; two filesyin.py
andaudio_processing
are copied to thethird_party
folderTesting?
PhaseVocoder.extract_pitch
; times now in seconds instead of millisec)