Skip to content
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

[add] Use shard data to calculate cmvn and extract text #2609

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

lsrami
Copy link
Contributor

@lsrami lsrami commented Aug 13, 2024

新增两个tools脚本:

分别用于从shard data.list中提取文本或者统计音频时长;使用shard data.list计算cmvn

为什么需要这个?有时只有shard格式的数据,而没有原始数据,但是需要计算cmvn和提取text

用法:计算音频时长
tools/extract_shard_data.py data/dev/data.list data/dev/wav.dura duration

用法:提取文本
tools/extract_shard_data.py data/dev/data.list data/dev/text text

用法:计算cmvn
tools/compute_shard_cmvn_stats.py \
  --train_config conf/train_u2++_conformer.yaml \
  --in_shard data/train/data.list \
  --out_cmvn data/train/global_cmvn

lsrami and others added 4 commits August 13, 2024 15:20
改为四种提取模型:flag参数
只提取文本: text
只提取音频: audio
只计算时长: duration
提取所有内容: content
@lsrami
Copy link
Contributor Author

lsrami commented Aug 14, 2024

Update extract_shard_data.py
改为四种提取模型:flag参数
只提取文本: text
只提取音频: audio
只计算时长: duration
提取所有内容: content

@xingchensong xingchensong merged commit 203e067 into wenet-e2e:main Aug 14, 2024
5 checks passed
@xingchensong
Copy link
Member

many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants