Skip to content

Commit

Permalink
C implementation of LACE feature net in osce.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Buethe committed Nov 28, 2023
1 parent e9d3083 commit 30b75b3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dnn/nndsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define ADACOMB_MAX_FRAME_SIZE 80
#define ADACOMB_MAX_OVERLAP_SIZE 40

//#define DEBUG_NNDSP
#define DEBUG_NNDSP
#ifdef DEBUG_NNDSP
#include <stdio.h>
#endif
Expand Down
24 changes: 20 additions & 4 deletions dnn/osce.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,32 @@


#include "opus_types.h"
#include "lace_data.h"
#include "nolace_data.h"
#include "nndsp.h"
#include "nnet.h"

extern const WeightArray lacelayers_arrays[];
extern const WeightArray nolacelayers_arrays[];

typedef struct LACE LACE;
typedef struct NOLACE NOLACE;
typedef struct {
float feature_net_conv2_state[LACE_FEATURE_NET_CONV2_STATE_SIZE];
float feature_net_gru_state[LACE_COND_DIM]; /* ToDo: fix! */
AdaCombState cf1_state;
AdaCombState cf2_state;
AdaConvState af1_state;
} LACEState;

typedef struct
{
LACELayers layers;
LACEState state;
float window[LACE_OVERLAP_SIZE];
} LACE;

typedef struct LACEState LACEState;
typedef struct NOLACE NOLACE;
typedef struct NoLACEState NoLACEState;


void init_lace(LACE *hLACE);

#endif

0 comments on commit 30b75b3

Please sign in to comment.