Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
batch
游雁98376eaab4f9
diff --git a/examples/README.md b/examples/README.mdindex f87d5fa65..0191a2d8a 100644--- a/examples/README.md+++ b/examples/README.md@@ -248,10 +248,10 @@ funasr/bin/train.py \export CUDA_VISIBLE_DEVICES="0,1"gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')-torchrun --nnodes 1 --nproc_per_node ${gpu_num} \+torchrun --nnodes 1 --nproc_per_node ${gpu_num} --master_port 12345 \../../../funasr/bin/train.py ${train_args}```---nnodes represents the total number of participating nodes, while --nproc_per_node indicates the number of processes running on each node.+--nnodes represents the total number of participating nodes, while --nproc_per_node indicates the number of processes running on each node. --master_port indicates the port is 12345##### Multi-Machine Multi-GPU Training@@ -260,7 +260,7 @@ On the master node, assuming the IP is 192.168.1.1 and the port is 12345, and yoexport CUDA_VISIBLE_DEVICES="0,1"gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')-torchrun --nnodes 2 --node_rank 0 --nproc_per_node ${gpu_num} --master_addr=192.168.1.1 --master_port=12345 \+torchrun --nnodes 2 --node_rank 0 --nproc_per_node ${gpu_num} --master_addr 192.168.1.1 --master_port 12345 \../../../funasr/bin/train.py ${train_args}```On the worker node (assuming the IP is 192.168.1.2), you need to ensure that the MASTER_ADDR and MASTER_PORT environment variables are set to match those of the master node, and then run the same command:@@ -269,7 +269,7 @@ On the worker node (assuming the IP is 192.168.1.2), you need to ensure that theexport CUDA_VISIBLE_DEVICES="0,1"gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')-torchrun --nnodes 2 --node_rank 1 --nproc_per_node ${gpu_num} --master_addr=192.168.1.1 --master_port=12345 \+torchrun --nnodes 2 --node_rank 1 --nproc_per_node ${gpu_num} --master_addr 192.168.1.1 --master_port 12345 \../../../funasr/bin/train.py ${train_args}```diff --git a/examples/aishell/branchformer/run.sh b/examples/aishell/branchformer/run.shindex 918aa9bd1..5b649546f 100755--- a/examples/aishell/branchformer/run.sh+++ b/examples/aishell/branchformer/run.sh@@ -27,6 +27,8 @@ data_url=www.openslr.org/resources/33tag="exp1"workspace=`pwd`+master_port=12345+. utils/parse_options.sh || exit 1;# Set bash to 'debug' mode, it will exit on :@@ -115,6 +117,7 @@ if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; thentorchrun \--nnodes 1 \--nproc_per_node ${gpu_num} \+ --master_port ${master_port} \../../../funasr/bin/train.py \--config-path "${workspace}/conf" \--config-name "${config}" \diff --git a/examples/aishell/conformer/run.sh b/examples/aishell/conformer/run.shindex ba8b43c60..0c8ab508a 100755--- a/examples/aishell/conformer/run.sh+++ b/examples/aishell/conformer/run.sh@@ -27,6 +27,8 @@ data_url=www.openslr.org/resources/33tag="exp1"workspace=`pwd`+master_port=12345+. utils/parse_options.sh || exit 1;# Set bash to 'debug' mode, it will exit on :@@ -114,6 +116,7 @@ if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; thentorchrun \--nnodes 1 \--nproc_per_node ${gpu_num} \+ --master_port ${master_port} \../../../funasr/bin/train.py \--config-path "${workspace}/conf" \--config-name "${config}" \diff --git a/examples/aishell/e_branchformer/run.sh b/examples/aishell/e_branchformer/run.shindex be185998f..452ec80ba 100755--- a/examples/aishell/e_branchformer/run.sh+++ b/examples/aishell/e_branchformer/run.sh@@ -27,6 +27,8 @@ data_url=www.openslr.org/resources/33tag="exp1"workspace=`pwd`+master_port=12345+. utils/parse_options.sh || exit 1;# Set bash to 'debug' mode, it will exit on :@@ -115,6 +117,7 @@ if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; thentorchrun \--nnodes 1 \--nproc_per_node ${gpu_num} \+ --master_port ${master_port} \../../../funasr/bin/train.py \--config-path "${workspace}/conf" \--config-name "${config}" \diff --git a/examples/aishell/paraformer/run.sh b/examples/aishell/paraformer/run.shindex a957b937b..ffef61e32 100755--- a/examples/aishell/paraformer/run.sh+++ b/examples/aishell/paraformer/run.sh@@ -27,6 +27,8 @@ data_url=www.openslr.org/resources/33tag="exp1"workspace=`pwd`+master_port=12345+. utils/parse_options.sh || exit 1;# Set bash to 'debug' mode, it will exit on :@@ -113,6 +115,7 @@ if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; thentorchrun \--nnodes 1 \--nproc_per_node ${gpu_num} \+ --master_port ${master_port} \../../../funasr/bin/train.py \--config-path "${workspace}/conf" \--config-name "${config}" \diff --git a/examples/aishell/transformer/run.sh b/examples/aishell/transformer/run.shindex 98c282952..3fb846519 100755--- a/examples/aishell/transformer/run.sh+++ b/examples/aishell/transformer/run.sh@@ -27,6 +27,8 @@ data_url=www.openslr.org/resources/33tag="exp1"workspace=`pwd`+master_port=12345+. utils/parse_options.sh || exit 1;# Set bash to 'debug' mode, it will exit on :@@ -115,6 +117,7 @@ if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; thentorchrun \--nnodes 1 \--nproc_per_node ${gpu_num} \+ --master_port ${master_port} \../../../funasr/bin/train.py \--config-path "${workspace}/conf" \--config-name "${config}" \