Skip to content

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

update train recipe

游雁26ab38b56cb4
diff --git a/examples/aishell/branchformer/run.sh b/examples/aishell/branchformer/run.sh
index e6d64429c..448e936bd 100755
--- a/examples/aishell/branchformer/run.sh
+++ b/examples/aishell/branchformer/run.sh
@@ -174,6 +174,7 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
++output_dir="${inference_dir}/${JOB}" \
++device="${inference_device}" \
++ncpu=1 \
+ ++disable_log=true \
++batch_size="${inference_batch_size}" &> ${_logdir}/log.${JOB}.txt
}&
diff --git a/examples/aishell/conformer/run.sh b/examples/aishell/conformer/run.sh
index 1fbf1f183..f5d993a28 100755
--- a/examples/aishell/conformer/run.sh
+++ b/examples/aishell/conformer/run.sh
@@ -173,6 +173,7 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
++output_dir="${inference_dir}/${JOB}" \
++device="${inference_device}" \
++ncpu=1 \
+ ++disable_log=true \
++batch_size="${inference_batch_size}" &> ${_logdir}/log.${JOB}.txt
}&
diff --git a/examples/aishell/e_branchformer/run.sh b/examples/aishell/e_branchformer/run.sh
index 4f65ac8bd..ce6d346f0 100755
--- a/examples/aishell/e_branchformer/run.sh
+++ b/examples/aishell/e_branchformer/run.sh
@@ -174,6 +174,7 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
++output_dir="${inference_dir}/${JOB}" \
++device="${inference_device}" \
++ncpu=1 \
+ ++disable_log=true \
++batch_size="${inference_batch_size}" &> ${_logdir}/log.${JOB}.txt
}&
diff --git a/examples/aishell/paraformer/run.sh b/examples/aishell/paraformer/run.sh
index bc03fb370..f96b19235 100755
--- a/examples/aishell/paraformer/run.sh
+++ b/examples/aishell/paraformer/run.sh
@@ -173,6 +173,7 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
++output_dir="${inference_dir}/${JOB}" \
++device="${inference_device}" \
++ncpu=1 \
+ ++disable_log=true \
++batch_size="${inference_batch_size}" &> ${_logdir}/log.${JOB}.txt
}&
diff --git a/examples/aishell/transformer/run.sh b/examples/aishell/transformer/run.sh
index 12aef5304..c282d7fb9 100755
--- a/examples/aishell/transformer/run.sh
+++ b/examples/aishell/transformer/run.sh
@@ -174,6 +174,7 @@ if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then
++output_dir="${inference_dir}/${JOB}" \
++device="${inference_device}" \
++ncpu=1 \
+ ++disable_log=true \
++batch_size="${inference_batch_size}" &> ${_logdir}/log.${JOB}.txt
}&
diff --git a/funasr/train_utils/trainer.py b/funasr/train_utils/trainer.py
index 61b9004f4..f4ef77379 100644
--- a/funasr/train_utils/trainer.py
+++ b/funasr/train_utils/trainer.py
@@ -3,6 +3,7 @@ import time
import torch
import logging
from tqdm import tqdm
+from datetime import datetime
import torch.distributed as dist
from contextlib import nullcontext
# from torch.utils.tensorboard import SummaryWriter
@@ -283,7 +284,10 @@ class Trainer:
torch.cuda.max_memory_reserved()/1024/1024/1024,
)
lr = self.scheduler.get_last_lr()[0]
+ time_now = datetime.now()
+ time_now = now.strftime("%Y-%m-%d %H:%M:%S")
description = (
+ f"{time_now}, "
f"rank: {self.local_rank}, "
f"epoch: {epoch}/{self.max_epoch}, "
f"step: {batch_idx+1}/{len(self.dataloader_train)}, total: {self.batch_total}, "