Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Commits
155367d2
Verified
Commit
155367d2
authored
1 year ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Skeleton for FWGAN code
parent
e9f8402a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dnn/fwgan.c
+51
-0
51 additions, 0 deletions
dnn/fwgan.c
dnn/fwgan.h
+44
-0
44 additions, 0 deletions
dnn/fwgan.h
lpcnet_headers.mk
+1
-0
1 addition, 0 deletions
lpcnet_headers.mk
lpcnet_sources.mk
+1
-0
1 addition, 0 deletions
lpcnet_sources.mk
with
97 additions
and
0 deletions
dnn/fwgan.c
0 → 100644
+
51
−
0
View file @
155367d2
/* Copyright (c) 2023 Amazon */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include
"config.h"
#endif
#include
"fwgan.h"
#include
"os_support.h"
#include
"freq.h"
void
fwgan_init
(
FWGANState
*
st
,
const
float
*
pcm
)
{
OPUS_CLEAR
(
st
,
1
);
}
static
void
run_fwgan
(
FWGANState
*
st
,
float
*
pcm
,
const
float
*
input
)
{
}
void
fwgan_synthesize
(
FWGANState
*
st
,
float
*
pcm
,
const
float
*
features
)
{
float
lpc
[
LPC_ORDER
];
lpc_from_cepstrum
(
lpc
,
features
);
run_fwgan
(
st
,
pcm
,
features
);
/* Run LPC filter. */
}
This diff is collapsed.
Click to expand it.
dnn/fwgan.h
0 → 100644
+
44
−
0
View file @
155367d2
/* Copyright (c) 2023 Amazon */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FWGAN_H
#define FWGAN_H
#include
"freq.h"
#define FWGAN_CONT_SAMPLES 320
typedef
struct
{
float
syn_mem
[
LPC_ORDER
];
}
FWGANState
;
void
fwgan_init
(
FWGANState
*
st
,
const
float
*
pcm
);
void
fwgan_synthesize
(
FWGANState
*
st
,
float
*
pcm
,
const
float
*
features
);
#endif
/* FWGAN_H */
This diff is collapsed.
Click to expand it.
lpcnet_headers.mk
+
1
−
0
View file @
155367d2
...
...
@@ -8,6 +8,7 @@ dnn/lpcnet.h \
dnn/burg.h
\
dnn/common.h
\
dnn/freq.h
\
dnn/fwgan.h
\
dnn/kiss99.h
\
dnn/lpcnet_private.h
\
dnn/nnet_data.h
\
...
...
This diff is collapsed.
Click to expand it.
lpcnet_sources.mk
+
1
−
0
View file @
155367d2
LPCNET_SOURCES
=
\
dnn/burg.c
\
dnn/freq.c
\
dnn/fwgan.c
\
dnn/kiss99.c
\
dnn/lpcnet.c
\
dnn/lpcnet_enc.c
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment