Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

add sampling rate parameter

hnluoaa456c5e44e7
diff --git a/funasr/tasks/abs_task.py b/funasr/tasks/abs_task.py
index 5424f134d..4e79c63a0 100644
--- a/funasr/tasks/abs_task.py
+++ b/funasr/tasks/abs_task.py
@@ -1783,6 +1783,7 @@ class AbsTask(ABC):
collate_fn,
key_file: str = None,
batch_size: int = 1,
+ fs: dict = None,
dtype: str = np.float32,
num_workers: int = 1,
allow_variable_data_keys: bool = False,
@@ -1800,6 +1801,7 @@ class AbsTask(ABC):
dataset = IterableESPnetDataset(
data_path_and_name_and_type,
float_dtype=dtype,
+ fs=fs,
preprocess=preprocess_fn,
key_file=key_file,
)