mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 18:24:18 +00:00
try on-the-fly feature extraction
This commit is contained in:
parent
02e0171832
commit
05ea517c1f
@ -17,11 +17,18 @@
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import torch
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from lhotse import CutSet, Fbank, FbankConfig, load_manifest
|
||||
from lhotse import (
|
||||
CutSet,
|
||||
Fbank,
|
||||
FbankConfig,
|
||||
load_manifest,
|
||||
set_caching_enabled,
|
||||
)
|
||||
from lhotse.dataset import (
|
||||
DynamicBucketingSampler,
|
||||
CutConcatenate,
|
||||
@ -37,6 +44,10 @@ from torch.utils.data import DataLoader
|
||||
from icefall.utils import str2bool
|
||||
|
||||
|
||||
set_caching_enabled(False)
|
||||
torch.set_num_threads(1)
|
||||
|
||||
|
||||
class WenetSpeechDataModule:
|
||||
"""
|
||||
DataModule for k2 ASR experiments.
|
||||
|
@ -129,6 +129,13 @@ def get_parser():
|
||||
"2 means tri-gram",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--on-the-fly",
|
||||
type=str2bool,
|
||||
default=True,
|
||||
help="Use on-the-fly feature extraction",
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user