forked from sotelo/world.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
world.pxd
62 lines (47 loc) · 2.15 KB
/
world.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# file: world.pxd
cimport world
cdef extern from "aperiodicity.h":
void AperiodicityRatio(double *x, int x_length, int fs, double *f0,
int f0_length, double *time_axis, int fft_size, double **aperiodicity)
cdef extern from "platinum.h":
void Platinum(double *x, int x_length, int fs, double *time_axis, double *f0,
int f0_length, double **spectrogram, int fft_size,
double **residual_spectrogram)
cdef extern from "synthesis.h":
void Synthesis(double *f0, int f0_length, double **spectrogram,
double **residual_spectrogram, int fft_size, double frame_period, int fs,
int y_length, double *y)
cdef extern from "star.h":
void Star(double *x, int x_length, int fs, double *time_axis, double *f0,
int f0_length, double **spectrogram)
cdef extern from "stonemask.h":
void StoneMask(double *x, int x_length, int fs, double *time_axis, double *f0,
int f0_length, double *refined_f0)
cdef extern from "synthesisfromaperiodicity.h":
void SynthesisFromAperiodicity(double *f0, int f0_length, double **spectrogram,
double **aperiodicity, int fft_size, double frame_period, int fs,
int y_length, double *y)
cdef extern from "matlabfunctions.h":
double *wavread(char* filename, int *fs, int *nbit, int *wav_length)
void wavwrite(double *x, int x_length, int fs, int nbit, char *filename)
cdef extern from "dio.h":
int GetSamplesForDIO(int fs, int x_length, double frame_period)
void InitializeDioOption(DioOption *option)
void Dio(double *x, int x_length, int fs, const DioOption option,
double *time_axis, double *f0)
void DioByOptPtr(double *x, int x_length, int fs, const DioOption *option,
double *time_axis, double *f0)
ctypedef struct DioOption:
double f0_floor
double f0_ceil
double channels_in_octave
double frame_period
int speed
cdef extern from "cheaptrick.h":
void CheapTrick(double *x, int x_length, int fs, double *time_axis, double *f0,
int f0_length, double **spectrogram)
int GetFFTSizeForCheapTrick(int fs)
#cdef class DioOption:
# cdef wrap1.DioOption* _option
# self._option = _option
#cdef cqueue.Queue* _c_queue