Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
a8244dc5
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a8244dc5
编写于
4月 07, 2022
作者:
X
xiongxinlei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update the note, test=doc
上级
38e4e9c8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
2 deletion
+34
-2
examples/voxceleb/sv0/local/data.sh
examples/voxceleb/sv0/local/data.sh
+1
-1
paddlespeech/vector/exps/ecapa_tdnn/train.py
paddlespeech/vector/exps/ecapa_tdnn/train.py
+0
-1
paddlespeech/vector/io/batch.py
paddlespeech/vector/io/batch.py
+33
-0
未找到文件。
examples/voxceleb/sv0/local/data.sh
浏览文件 @
a8244dc5
...
...
@@ -85,7 +85,7 @@ fi
if
[
${
stage
}
-le
4
]
&&
[
${
stop_stage
}
-ge
4
]
;
then
# generate the vox2 manifest file from wav file
# we will generate the
manifest.vox2 in ${dir}/vox2 directory
# we will generate the
${dir}/vox2/manifest.vox2
# because we use all the vox2 dataset to train, so collect all the vox2 data in one file
echo
"start generate the vox2 manifest files"
python3
${
TARGET_DIR
}
/voxceleb/voxceleb2.py
\
...
...
paddlespeech/vector/exps/ecapa_tdnn/train.py
浏览文件 @
a8244dc5
...
...
@@ -37,7 +37,6 @@ from paddlespeech.vector.modules.sid_model import SpeakerIdetification
from
paddlespeech.vector.training.scheduler
import
CyclicLRScheduler
from
paddlespeech.vector.training.seeding
import
seed_everything
from
paddlespeech.vector.utils.time
import
Timer
# from paddleaudio.datasets.voxceleb import VoxCeleb
logger
=
Log
(
__name__
).
getlog
()
...
...
paddlespeech/vector/io/batch.py
浏览文件 @
a8244dc5
...
...
@@ -17,6 +17,17 @@ import paddle
def
waveform_collate_fn
(
batch
):
"""Wrap the waveform into a batch form
Args:
batch (list): the waveform list from the dataloader
the item of data include several field
feat: the utterance waveform data
label: the utterance label encoding data
Returns:
dict: the batch data to dataloader
"""
waveforms
=
np
.
stack
([
item
[
'feat'
]
for
item
in
batch
])
labels
=
np
.
stack
([
item
[
'label'
]
for
item
in
batch
])
...
...
@@ -27,6 +38,18 @@ def feature_normalize(feats: paddle.Tensor,
mean_norm
:
bool
=
True
,
std_norm
:
bool
=
True
,
convert_to_numpy
:
bool
=
False
):
"""Do one utterance feature normalization
Args:
feats (paddle.Tensor): the original utterance feat, such as fbank, mfcc
mean_norm (bool, optional): mean norm flag. Defaults to True.
std_norm (bool, optional): std norm flag. Defaults to True.
convert_to_numpy (bool, optional): convert the paddle.tensor to numpy
and do feature norm with numpy. Defaults to False.
Returns:
paddle.Tensor : the normalized feats
"""
# Features normalization if needed
# numpy.mean is a little with paddle.mean about 1e-6
if
convert_to_numpy
:
...
...
@@ -60,6 +83,16 @@ def pad_right_2d(x, target_length, axis=-1, mode='constant', **kwargs):
def
batch_feature_normalize
(
batch
,
mean_norm
:
bool
=
True
,
std_norm
:
bool
=
True
):
"""Do batch utterance features normalization
Args:
batch (list): the batch feature from dataloader
mean_norm (bool, optional): mean normalization flag. Defaults to True.
std_norm (bool, optional): std normalization flag. Defaults to True.
Returns:
dict: the normalized batch features
"""
ids
=
[
item
[
'utt_id'
]
for
item
in
batch
]
lengths
=
np
.
asarray
([
item
[
'feat'
].
shape
[
1
]
for
item
in
batch
])
feats
=
list
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录