pysptk.sptk.swipe

pysptk.sptk.swipe(x, fs, hopsize, min=60.0, max=240.0, threshold=0.3, otype='f0')

SWIPE’ - A Saw-tooth Waveform Inspired Pitch Estimation

Parameters:
x : array

A whole audio signal

fs : int

Sampling frequency.

hopsize : int

Hop size.

min : float, optional

Minimum fundamental frequency. Default is 60.0

max : float, optional

Maximum fundamental frequency. Default is 240.0

threshold : float, optional

Voice/unvoiced threshold. Default is 0.3.

otype : str or int, optional
Output format
  1. pitch
  2. f0
  3. log(f0)

Default is f0.

Returns:
f0 : array, shape(np.ceil(float(len(x))/hopsize))

Estimated f0 trajectory

Raises:
ValueError

if invalid otype is specified

See also

pysptk.sptk.rapt

Examples