shithub: opus

Download patch

ref: c0f94366230d14e88b6aa8cf5ec05c1d5a0f49ce
parent: 60f151b87d4a2a4e14eff2c7208c96f8618e6f22
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Sat Oct 14 13:17:40 EDT 2023

Remove FWGAN from the build for now

--- a/dnn/lpcnet_demo.c
+++ b/dnn/lpcnet_demo.c
@@ -36,7 +36,6 @@
 #include "lpcnet.h"
 #include "freq.h"
 #include "os_support.h"
-#include "fwgan.h"
 #include "fargan.h"
 
 #ifdef USE_WEIGHTS_FILE
@@ -116,7 +115,6 @@
     if (argc < 4) usage();
     if (strcmp(argv[1], "-features") == 0) mode=MODE_FEATURES;
     else if (strcmp(argv[1], "-synthesis") == 0) mode=MODE_SYNTHESIS;
-    else if (strcmp(argv[1], "-fwgan-synthesis") == 0) mode=MODE_FWGAN_SYNTHESIS;
     else if (strcmp(argv[1], "-fargan-synthesis") == 0) mode=MODE_FARGAN_SYNTHESIS;
     else if (strcmp(argv[1], "-plc") == 0) {
         mode=MODE_PLC;
@@ -190,29 +188,6 @@
             fwrite(pcm, sizeof(pcm[0]), LPCNET_FRAME_SIZE, fout);
         }
         lpcnet_destroy(net);
-    } else if (mode == MODE_FWGAN_SYNTHESIS) {
-        FWGANState fwgan;
-        size_t ret;
-        float in_features[NB_TOTAL_FEATURES];
-        float zeros[320] = {0};
-        fwgan_init(&fwgan);
-#ifdef USE_WEIGHTS_FILE
-        fwgan_load_model(fwgan, data, len);
-#endif
-        ret = fread(in_features, sizeof(in_features[0]), NB_TOTAL_FEATURES, fin);
-        fwgan_cont(&fwgan, zeros, in_features);
-        while (1) {
-            int i;
-            float features[NB_FEATURES];
-            float fpcm[LPCNET_FRAME_SIZE];
-            opus_int16 pcm[LPCNET_FRAME_SIZE];
-            ret = fread(in_features, sizeof(features[0]), NB_TOTAL_FEATURES, fin);
-            if (feof(fin) || ret != NB_TOTAL_FEATURES) break;
-            OPUS_COPY(features, in_features, NB_FEATURES);
-            fwgan_synthesize(&fwgan, fpcm, features);
-            for (i=0;i<LPCNET_FRAME_SIZE;i++) pcm[i] = (int)floor(.5 + MIN32(32767, MAX32(-32767, 32768.f*fpcm[i])));
-            fwrite(pcm, sizeof(pcm[0]), LPCNET_FRAME_SIZE, fout);
-        }
     } else if (mode == MODE_FARGAN_SYNTHESIS) {
         FARGANState fargan;
         size_t ret, i;
--- a/lpcnet_headers.mk
+++ b/lpcnet_headers.mk
@@ -10,8 +10,6 @@
 dnn/freq.h \
 dnn/fargan.h \
 dnn/fargan_data.h \
-dnn/fwgan.h \
-dnn/fwgan_data.h \
 dnn/kiss99.h \
 dnn/lpcnet_private.h \
 dnn/nnet_data.h \
--- a/lpcnet_sources.mk
+++ b/lpcnet_sources.mk
@@ -3,8 +3,6 @@
 dnn/freq.c \
 dnn/fargan.c \
 dnn/fargan_data.c \
-dnn/fwgan.c \
-dnn/fwgan_data.c \
 dnn/kiss99.c \
 dnn/lpcnet.c \
 dnn/lpcnet_enc.c \
--