mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 02:22:17 +00:00
modify cut json with trim supervision
This commit is contained in:
parent
26d376d68a
commit
be00b3df2c
@ -104,6 +104,8 @@ def compute_fbank_mucs(
|
||||
|
||||
with get_executor() as ex: # Initialize the executor only once.
|
||||
for partition, m in manifests.items():
|
||||
# print(m["recordings"])
|
||||
# exit()
|
||||
cuts_filename = f"{prefix}_cuts_{partition}.{suffix}"
|
||||
if (output_dir / cuts_filename).is_file():
|
||||
logging.info(f"{partition} already exists - skipping.")
|
||||
@ -128,6 +130,9 @@ def compute_fbank_mucs(
|
||||
executor=ex,
|
||||
storage_type=LilcomChunkyWriter,
|
||||
)
|
||||
cut_set = cut_set.trim_to_supervisions(
|
||||
keep_overlapping=False, min_duration=None
|
||||
)
|
||||
cut_set.to_file(output_dir / cuts_filename)
|
||||
|
||||
|
||||
|
@ -6,8 +6,8 @@ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
|
||||
set -eou pipefail
|
||||
|
||||
nj=60
|
||||
stage=8
|
||||
stop_stage=8
|
||||
stage=3
|
||||
stop_stage=3
|
||||
|
||||
# We assume dl_dir (download dir) contains the following
|
||||
# directories and files. If not, they will be downloaded
|
||||
@ -97,12 +97,12 @@ if [ $stage -le 3 ] && [ $stop_stage -ge 3 ]; then
|
||||
touch data/fbank/.mucs.done
|
||||
fi
|
||||
|
||||
|
||||
# exit
|
||||
|
||||
if [ ! -e data/fbank/.mucs-validated.done ]; then
|
||||
log "Validating data/fbank for mucs"
|
||||
parts=(
|
||||
train
|
||||
train,
|
||||
test
|
||||
)
|
||||
for part in ${parts[@]}; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user