-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wenet add reverb noise #2300
wenet add reverb noise #2300
Conversation
great! thx. 这周稍晚review一下 |
有实验结果吗? |
ok,我后面贴一个结果 |
@@ -68,6 +68,8 @@ dataset_conf: | |||
resample_conf: | |||
resample_rate: 16000 | |||
speed_perturb: true | |||
# aug_prob: 0.6 # prob to add reverb & noise aug per sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是原来标准 conformer 的配置文件,更改后其他人无法复现以前实验。可以新建一个 train_conformer_noise.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
wenet/dataset/dataset.py
Outdated
@@ -124,7 +125,9 @@ def Dataset(data_type, | |||
data_list_file, | |||
tokenizer: BaseTokenizer, | |||
conf, | |||
partition=True): | |||
partition=True, | |||
reverb_lmdb_file=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverb_lmdb_file 建议配置在 yaml 文件中
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverb_lmdb_file 建议配置在 yaml 文件中
reverb_lmdb_file这个是生成的,也可以写在yaml文件里么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以,固定路径就可以。
examples/aishell/s0/run.sh
Outdated
@@ -121,6 +123,11 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then | |||
data/$x/data.list | |||
fi | |||
done | |||
|
|||
# Convert all musan data to LMDB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加可选参数控制,不影响原来文件的流程和功能。
wenet/dataset/dataset.py
Outdated
@@ -155,12 +156,23 @@ def Dataset(data_type, | |||
dataset = Processor(dataset, processor.filter, **filter_conf) | |||
|
|||
resample_conf = conf.get('resample_conf', {}) | |||
resample_rate = resample_conf["resample_rate"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果resample_conf是空的话,这一行会报错吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果resample_conf是空的话,这一行会报错吧
额,是的,我改下。。
wenet/dataset/processor.py
Outdated
(audio_db - noise_db - noise_snr) / 10)) * noise_audio | ||
out_audio = audio + noise_audio | ||
|
||
# normalize into [-1, 1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是把wav做了归一化,wenet非加噪的流程中没有对wav做归一化。可以验证下加噪后 训练的模型精度咋样
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是把wav做了归一化,wenet非加噪的流程中没有对wav做归一化。可以验证下加噪后 训练的模型精度咋样
嗯嗯,我正在跑模型训练,预计这一周能出结果,到时我贴一下。
我有个问题,想请问一下大佬们。 背景: 我自己在本地做了一些 nn context biasing 的triton 推理工作,在python版和triton版的一致性是可以对上的,我想开源出来,跟大家一起探讨怎么写的更优雅(我发现你们给提的建议都很nice👍),以及怎么改进。 问题:我把wenet 的仓库fork到我自己的仓库了,用来改加噪了,就是这个pr的内容,我现在想做的是,把凯勋的 fork过后改的仓库nn_bias 分支 fork到自己仓库,然后在上面修改,也方便大家看file change,但是fork过之后,就不能fork第二个同名仓库了好像,我如果直接在我自己仓库改的话,会有两个问题:1. 会同步到这个pr里 ,2.不好更凯勋的做file compare了,不知道改的内容。 所以想请教一下,这种情况该怎么操作,或许我可以从头新建一个仓库? |
可以使用git的分支功能: git clone https://github.com/wenet-e2e/wenet.git
cd wenet
git remote add dahu1 https://github.com/dahu1/wenet.git # 添加你fork的仓库
git fetch --all # 拉取你fork的仓库中的branch
git checkout -b nn-bias # 建一个本地branch
# 添加一些修改 然后 git add, git commit
git push dahu1 nn-bias:nn-bias-remote # 本地branch的更新推送到远程,推送的目的仓库是你fork的仓库 |
Conformer add noise & rirs Result
|
从结果来看,aishell上变差的有点多。设置的aug_prob是多少? |
设置的是 1 |
#2316 Wenet新重新设计了dataset,有时间的话 辛苦改一下 |
好的👌 |
wenet 数据处理增加 混响和噪音处理,on-the-fly 的方式。代码来源于 wespeaker,这里做了一下搬运。
改过之后,可以正常训练。
混响和噪音文件是这样: