Comments (5)
Hello, and thanks for the interest. Could you please share the exact code you ran, and describe what setup you did before that?
from metaaf.
@jmcasebeer I downloaded pre-trained models from the link and provided the path to the AEC model. Additionally, I downloaded the AEC challenge dataset and specified its path in the config.py script." and on this line of code pred = system.infer({"signals": d_input, "metadata": {}}, fit_infer=fit_infer)[0] give me issue
This is the code that I ran.
import os
from aec_eval import get_system_ckpt
import numpy as np
import librosa
import soundfile as sf
import aec
ckpt_dir = r"C:\Users\pc\Desktop\AI-Beamformers\meta-af\MetaAF\v0.1.0_models\aec"
name = "aec_16_dt_c"
date = "2022_04_10_15_57_12"
epoch = 230
ckpt_loc = os.path.join(ckpt_dir, name, date)
system, kwargs, outer_learnable = get_system_ckpt(
ckpt_loc,
epoch,
model_type="egru",
system_len=None,
)
fit_infer = system.make_fit_infer(outer_learnable=outer_learnable)
fs = 16000
out_dir = "metaAF_res"
os.makedirs(out_dir, exist_ok=True)
u, _ = librosa.load(r"C:\Users\pc\Desktop\AI-Beamformers\meta-af\MetaAF\zoo\aec\u.wav", sr=fs)
d, _ = librosa.load(r"C:\Users\pc\Desktop\AI-Beamformers\meta-af\MetaAF\zoo\aec\d.wav", sr=fs)
s, _ = librosa.load(r"C:\Users\pc\Desktop\AI-Beamformers\meta-af\MetaAF\zoo\aec\s.wav", sr=fs)
e = d - s
d_mp3_input = {"u": u[None, :, None], "d": d[None, :, None],
"s": s[None, :, None], "e": e[None, :, None]}
pred_mp3 = system.infer({"signals": d_mp3_input, "metadata": {}}, fit_infer=fit_infer)[
0
]
pred_mp3 = np.array(pred_mp3[0, :, 0])
dset = aec.MSFTAECDataset_RIR(mode='test', double_talk=True, random_roll=True, scene_change=False)
data = dset[0]
u, d, e, s = (
data["signals"]["u"],
data["signals"]["d"],
data["signals"]["e"],
data["signals"]["s"],
)
d_input = {"u": u[None], "d": d[None], "s": s[None], "e": e[None]}
pred = system.infer({"signals": d_input, "metadata": {}}, fit_infer=fit_infer)[
0
]
pred = np.array(pred[0, :, 0])
sf.write(os.path.join(out_dir, f"_out.wav"), pred, fs)
from metaaf.
@jmcasebeer
Hello! I hope you had a wonderful holidays. Do you have any solution regarding my issue?
from metaaf.
Could you please try using the most recent model weights? It looks like you're using the 0.1.0 weights with the 1.0.1 code. You can get the 1.0.1 weights here. Then, update the checkpoint loading to use a more recent checkpoint.
For example:
ckpt_dir = "v1.0.1_models/aec/"
name = "meta_aec_16_combo_rl_4_1024_512_r2"
date = "2022_10_19_23_43_22"
epoch = 110
ckpt_loc = os.path.join(ckpt_dir, name, date)
system, kwargs, outer_learnable = get_system_ckpt(
ckpt_loc,
epoch,
)
fit_infer = system.make_fit_infer(outer_learnable=outer_learnable)
fs = 16000
from metaaf.
@jmcasebeer Thank you very much, now it work !
from metaaf.
Related Issues (14)
- About the pre-trained models. HOT 1
- Could not get the same AEC results shown on the demo page with the provided pretrained models HOT 8
- AEC Data Setup Issues HOT 9
- rir_idx index out of range HOT 7
- when running system.infer in AEC task, shows ValueError: 'TimeChanCoupledGRU ...' HOT 3
- You must pass a non-None PRNGKey to init and/or apply if you make use of random numbers when running hoaec_eval.py HOT 1
- some module l can't find ,help me HOT 2
- This module was my last hurdle, I searched for a long time without finding it, and when I ran core.py. HOT 1
- I've got a few ideas. HOT 3
- Inference question HOT 1
- Why not use nearend speech s to be the target ? HOT 2
- Compatibility with x64 CPU HOT 2
- The replicate results don't match the demo. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metaaf.