First version of pitch DNN C code
Totally untested -- most likely doesn't work
This commit is contained in:
parent
966a2d22eb
commit
33adba02c7
5 changed files with 97 additions and 3 deletions
30
dnn/pitchdnn.h
Normal file
30
dnn/pitchdnn.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef PITCHDNN_H
|
||||
#define PITCHDNN_H
|
||||
|
||||
|
||||
typedef struct PitchDNN PitchDNN;
|
||||
|
||||
#include "pitchdnn_data.h"
|
||||
#include "lpcnet_private.h"
|
||||
|
||||
#define NB_XCORR_FEATURES (PITCH_MAX_PERIOD-PITCH_MIN_PERIOD)
|
||||
|
||||
|
||||
typedef struct {
|
||||
PitchDNN model;
|
||||
float gru_state[GRU_1_STATE_SIZE];
|
||||
float xcorr_mem1[(NB_XCORR_FEATURES + 2)*2];
|
||||
float xcorr_mem2[(NB_XCORR_FEATURES + 2)*2*8];
|
||||
float xcorr_mem3[(NB_XCORR_FEATURES + 2)*2*8];
|
||||
} PitchDNNState;
|
||||
|
||||
|
||||
void pitchdnn_init(PitchDNNState *st);
|
||||
|
||||
int compute_pitchdnn(
|
||||
PitchDNNState *st,
|
||||
const float *if_features,
|
||||
const float *xcorr_features
|
||||
);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue