From e899096ce46ab74be7bdce64e24b91e86bb3be78 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 11 十月 2023 16:19:52 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR add

---
 funasr/runtime/onnxruntime/src/audio.cpp                            |    5 
 funasr/runtime/onnxruntime/src/ct-transformer.cpp                   |   14 
 funasr/runtime/docs/SDK_tutorial_en.md                              |  198 ++++
 funasr/runtime/docs/SDK_advanced_guide_offline_en_zh.md             |  271 +++++
 funasr/runtime/onnxruntime/src/ct-transformer-online.cpp            |   16 
 funasr/runtime/onnxruntime/src/funasrruntime.cpp                    |   17 
 funasr/runtime/onnxruntime/src/offline-stream.cpp                   |    1 
 funasr/runtime/docs/SDK_advanced_guide_offline_en.md                |  211 ++++
 funasr/runtime/docs/SDK_advanced_guide_offline_zh.md                |    2 
 funasr/runtime/readme_cn.md                                         |   26 
 funasr/runtime/onnxruntime/src/fsmn-vad.cpp                         |    2 
 funasr/runtime/readme.md                                            |   30 
 funasr/runtime/docs/SDK_advanced_guide_online_zh.md                 |    2 
 funasr/runtime/onnxruntime/src/commonfunc.h                         |   26 
 funasr/runtime/docs/SDK_advanced_guide_online.md                    |    2 
 funasr/runtime/docs/SDK_tutorial_en_zh.md                           |  204 ++++
 funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-en.sh | 1739 +++++++++++++++++++++++++++++++++++++
 funasr/runtime/onnxruntime/src/tpass-stream.cpp                     |    1 
 funasr/runtime/onnxruntime/src/paraformer.cpp                       |   10 
 funasr/runtime/onnxruntime/include/funasrruntime.h                  |    7 
 docs/academic_recipe/asr_recipe.md                                  |    4 
 funasr/runtime/docs/docker_offline_cpu_en_lists                     |    8 
 funasr/runtime/onnxruntime/src/precomp.h                            |   21 
 funasr/runtime/onnxruntime/src/tpass-online-stream.cpp              |    1 
 24 files changed, 2,761 insertions(+), 57 deletions(-)

diff --git a/docs/academic_recipe/asr_recipe.md b/docs/academic_recipe/asr_recipe.md
index 5a11dc5..9e19c61 100644
--- a/docs/academic_recipe/asr_recipe.md
+++ b/docs/academic_recipe/asr_recipe.md
@@ -12,7 +12,7 @@
 Then you can directly start the recipe as follows:
 ```sh
 conda activate funasr
-. ./run.sh --CUDA_VISIBLE_DEVICES="0,1" --gpu_num=2
+bash run.sh --CUDA_VISIBLE_DEVICES "0,1" --gpu_num 2
 ```
 
 The training log files are saved in `${exp_dir}/exp/${model_dir}/log/train.log.*`锛� which can be viewed using the following command:
@@ -264,4 +264,4 @@
 
 ### Decoding by CPU or GPU
 
-We support CPU and GPU decoding. For CPU decoding, set `gpu_inference=false` and `njob` to specific the total number of CPU jobs. For GPU decoding, first set `gpu_inference=true`. Then set `gpuid_list` to specific which GPUs for decoding and `njob` to specific the number of decoding jobs on each GPU.
\ No newline at end of file
+We support CPU and GPU decoding. For CPU decoding, set `gpu_inference=false` and `njob` to specific the total number of CPU jobs. For GPU decoding, first set `gpu_inference=true`. Then set `gpuid_list` to specific which GPUs for decoding and `njob` to specific the number of decoding jobs on each GPU.
diff --git a/funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-en.sh b/funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-en.sh
new file mode 100644
index 0000000..47f47eb
--- /dev/null
+++ b/funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-en.sh
@@ -0,0 +1,1739 @@
+#!/usr/bin/env bash
+
+scriptVersion="0.0.1"
+scriptDate="20231010"
+
+
+# Set color
+RED="\033[31;1m"
+GREEN="\033[32;1m"
+YELLOW="\033[33;1m"
+BLUE="\033[34;1m"
+CYAN="\033[36;1m"
+PLAIN="\033[0m"
+
+# Info messages
+DONE="${GREEN}[DONE]${PLAIN}"
+ERROR="${RED}[ERROR]${PLAIN}"
+WARNING="${YELLOW}[WARNING]${PLAIN}"
+
+# Font Format
+BOLD="\033[1m"
+UNDERLINE="\033[4m"
+
+# Current folder
+CUR_DIR=`pwd`
+SUDO_CMD="sudo"
+
+
+DEFAULT_DOCKER_OFFLINE_CPU_EN_LISTS_OSS="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/docker_lists/docker_offline_cpu_en_lists"
+DEFAULT_DOCKER_OFFLINE_CPU_EN_LISTS_GIT="https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/docs/docker_offline_cpu_en_lists"
+DEFAULT_DOCKER_IMAGE_LISTS=$DEFAULT_DOCKER_OFFLINE_CPU_EN_LISTS_OSS
+DEFAULT_FUNASR_DOCKER_URL="registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr"
+DEFAULT_FUNASR_RUNTIME_RESOURCES="funasr-runtime-resources"
+DEFAULT_FUNASR_LOCAL_WORKSPACE=${CUR_DIR}/${DEFAULT_FUNASR_RUNTIME_RESOURCES}
+DEFAULT_FUNASR_CONFIG_DIR=""
+DEFAULT_FUNASR_CONFIG_DIR_BAK="/var/funasr"
+DEFAULT_FUNASR_CONFIG_FILE="${DEFAULT_FUNASR_CONFIG_DIR}/config"
+DEFAULT_FUNASR_SERVER_CONFIG_FILE="${DEFAULT_FUNASR_CONFIG_DIR}/server_config"
+DEFAULT_FUNASR_PROGRESS_TXT="${DEFAULT_FUNASR_CONFIG_DIR}/progress.txt"
+DEFAULT_FUNASR_SERVER_LOG="${DEFAULT_FUNASR_CONFIG_DIR}/server_console.log"
+DEFAULT_FUNASR_WORKSPACE_DIR="/workspace/models"
+DEFAULT_DOCKER_PORT="10095"
+DEFAULT_PROGRESS_FILENAME="progress.txt"
+DEFAULT_SERVER_EXEC_NAME="funasr-wss-server"
+DEFAULT_DOCKER_EXEC_DIR="/workspace/FunASR/funasr/runtime/websocket/build/bin"
+DEFAULT_DOCKER_EXEC_PATH=${DEFAULT_DOCKER_EXEC_DIR}/${DEFAULT_SERVER_EXEC_NAME}
+DEFAULT_SAMPLES_NAME="funasr_samples"
+DEFAULT_SAMPLES_DIR="samples"
+DEFAULT_SAMPLES_URL="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/sample/${DEFAULT_SAMPLES_NAME}.tar.gz"
+
+SAMPLE_CLIENTS=( \
+"Python" \
+"Linux_Cpp" \
+)
+DOCKER_IMAGES=()
+ASR_MODELS=()
+VAD_MODELS=()
+PUNC_MODELS=()
+
+# Handles the download progress bar
+asr_percent_int=0
+vad_percent_int=0
+punc_percent_int=0
+asr_title="Downloading"
+asr_percent="0"
+asr_speed="0KB/s"
+asr_revision=""
+vad_title="Downloading"
+vad_percent="0"
+vad_speed="0KB/s"
+vad_revision=""
+punc_title="Downloading"
+punc_percent="0"
+punc_speed="0KB/s"
+punc_revision=""
+serverProgress(){
+    status_flag="STATUS:"
+    stage=0
+    wait=0
+    server_status=""
+
+    while true
+    do
+        if [ -f "$DEFAULT_FUNASR_PROGRESS_TXT" ]; then
+            break
+        else
+            sleep 1
+            let wait=wait+1
+            if [ ${wait} -ge 6 ]; then
+                break
+            fi
+        fi
+    done
+
+    if [ ! -f "$DEFAULT_FUNASR_PROGRESS_TXT" ]; then
+        echo -e "    ${RED}The note of progress does not exist.($DEFAULT_FUNASR_PROGRESS_TXT) ${PLAIN}"
+        return 98
+    fi
+
+    stage=1
+    while read line
+    do
+        if [ $stage -eq 1 ]; then
+            result=$(echo $line | grep "STATUS:")
+            if [ "$result" != "" ]; then
+                stage=2
+                server_status=${line#*:}
+                status=`expr $server_status + 0`
+                if [ $status -eq 99 ]; then
+                    stage=99
+                fi
+                continue
+            fi
+        elif [ $stage -eq 2 ]; then
+            result=$(echo $line | grep "ASR")
+            if [ "$result" != "" ]; then
+                stage=3
+                continue
+            fi
+        elif [ $stage -eq 3 ]; then
+            result=$(echo $line | grep "VAD")
+            if [ "$result" != "" ]; then
+                stage=4
+                continue
+            fi
+            result=$(echo $line | grep "title:")
+            if [ "$result" != "" ]; then
+                asr_title=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "percent:")
+            if [ "$result" != "" ]; then
+                asr_percent=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "speed:")
+            if [ "$result" != "" ]; then
+                asr_speed=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "revision:")
+            if [ "$result" != "" ]; then
+                asr_revision=${line#*:}
+                continue
+            fi
+        elif [ $stage -eq 4 ]; then
+            result=$(echo $line | grep "PUNC")
+            if [ "$result" != "" ]; then
+                stage=5
+                continue
+            fi
+            result=$(echo $line | grep "title:")
+            if [ "$result" != "" ]; then
+                vad_title=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "percent:")
+            if [ "$result" != "" ]; then
+                vad_percent=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "speed:")
+            if [ "$result" != "" ]; then
+                vad_speed=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "revision:")
+            if [ "$result" != "" ]; then
+                vad_revision=${line#*:}
+                continue
+            fi
+        elif [ $stage -eq 5 ]; then
+            result=$(echo $line | grep "DONE")
+            if [ "$result" != "" ]; then
+                # Done and break.
+                stage=6
+                break
+            fi
+            result=$(echo $line | grep "title:")
+            if [ "$result" != "" ]; then
+                punc_title=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "percent:")
+            if [ "$result" != "" ]; then
+                punc_percent=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "speed:")
+            if [ "$result" != "" ]; then
+                punc_speed=${line#*:}
+                continue
+            fi
+            result=$(echo $line | grep "revision:")
+            if [ "$result" != "" ]; then
+                punc_revision=${line#*:}
+                continue
+            fi
+        elif [ $stage -eq 99 ]; then
+            echo -e "    ${RED}ERROR: $line${PLAIN}"
+        fi
+    done < $DEFAULT_FUNASR_PROGRESS_TXT
+
+    if [ $stage -ne 99 ]; then
+        drawProgress "ASR " $asr_title $asr_percent $asr_speed $asr_revision $asr_percent_int
+        asr_percent_int=$?
+        drawProgress "VAD " $vad_title $vad_percent $vad_speed $vad_revision $vad_percent_int
+        vad_percent_int=$?
+        drawProgress "PUNC" $punc_title $punc_percent $punc_speed $punc_revision $punc_percent_int
+        punc_percent_int=$?
+    fi
+
+    return $stage
+}
+
+drawProgress(){
+    model=$1
+    title=$2
+    percent_str=$3
+    speed=$4
+    revision=$5
+    latest_percent=$6
+
+    progress=0
+    if [ ! -z "$percent_str" ]; then
+        progress=`expr $percent_str + 0`
+        latest_percent=`expr $latest_percent + 0`
+        if [ $progress -ne 0 ] && [ $progress -lt $latest_percent ]; then
+            progress=$latest_percent
+        fi
+    fi
+
+    loading_flag="Loading"
+    if [ "$title" = "$loading_flag" ]; then
+        progress=100
+    fi
+
+    i=0
+    str=""
+    let max=progress/2
+    while [ $i -lt $max ]
+    do
+        let i++
+        str+='='
+    done
+    let color=36
+    let index=max*2
+    if [ -z "$speed" ]; then
+        printf "\r    \e[0;${CYAN}[%s][%-11s][%-50s][%d%%][%s]\e[0m" "$model" "$title" "$str" "$$index" "$revision"
+    else
+        printf "\r    \e[0;${CYAN}[%s][%-11s][%-50s][%3d%%][%8s][%s]\e[0m" "$model" "$title" "$str" "$index" "$speed" "$revision"
+    fi
+    printf "\n"
+
+    return $progress
+}
+
+menuSelection(){
+    local menu
+    menu=($(echo "$@"))
+    result=1
+    show_no=1
+    menu_no=0
+    len=${#menu[@]}
+
+    while true
+    do
+        echo -e "    ${BOLD}${show_no})${PLAIN} ${menu[menu_no]}"
+
+        let show_no++
+        let menu_no++
+        if [ $menu_no -ge $len ]; then
+            break
+        fi
+    done
+
+    while true
+    do
+        echo -e "  Enter your choice, default(${CYAN}1${PLAIN}): \c"
+        read result
+        if [ -z "$result" ]; then
+            result=1
+        fi
+
+        expr $result + 0 &>/dev/null
+        if [ $? -eq 0 ]; then
+            if [ $result -ge 1 ] && [ $result -le $len ]; then
+                break
+            else
+                echo -e "    ${RED}Input error, please input correct number!${PLAIN}"
+            fi
+        else
+            echo -e "    ${RED}Input error, please input correct number!${PLAIN}"
+        fi
+    done
+    
+    return $result
+}
+
+
+full_path=""
+relativePathToFullPath(){
+    relativePath=$1
+    firstChar=${relativePath: 0: 1}
+    if [[ "$firstChar" == "" ]]; then
+        full_path=$relativePath
+    elif [[ "$firstChar" == "/" ]]; then
+        full_path=$relativePath
+    fi
+
+    tmpPath1=`dirname $relativePath`
+    tmpFullpath1=`cd $tmpPath1 && pwd`
+    tmpPath2=`basename $relativePath`
+    full_path=${tmpFullpath1}/${tmpPath2}
+}
+
+initConfiguration(){
+    if [ -z "$DEFAULT_FUNASR_CONFIG_DIR" ];then
+        DEFAULT_FUNASR_CONFIG_DIR="$HOME"
+        if [ -z "$DEFAULT_FUNASR_CONFIG_DIR" ];then
+            $DEFAULT_FUNASR_CONFIG_DIR=$(echo ~/)
+            if [ -z "$DEFAULT_FUNASR_CONFIG_DIR" ];then
+                $DEFAULT_FUNASR_CONFIG_DIR=$DEFAULT_FUNASR_CONFIG_DIR_BAK
+            fi
+        fi
+        DEFAULT_FUNASR_CONFIG_DIR=${DEFAULT_FUNASR_CONFIG_DIR}/.funasr
+    fi
+
+    if [ ! -z "$DEFAULT_FUNASR_CONFIG_DIR" ]; then
+        $SUDO_CMD mkdir -p $DEFAULT_FUNASR_CONFIG_DIR
+    else
+        echo -e "    ${RED}DEFAULT_FUNASR_CONFIG_DIR is empty!${PLAIN}"
+        exit 1
+    fi
+    if [ ! -d "$DEFAULT_FUNASR_CONFIG_DIR" ]; then
+        echo -e "    ${RED}${DEFAULT_FUNASR_CONFIG_DIR} does not exist!${PLAIN}"
+        exit 2
+    fi
+
+    DEFAULT_FUNASR_CONFIG_FILE="${DEFAULT_FUNASR_CONFIG_DIR}/config"
+    DEFAULT_FUNASR_SERVER_CONFIG_FILE="${DEFAULT_FUNASR_CONFIG_DIR}/server_config"
+    DEFAULT_FUNASR_PROGRESS_TXT="${DEFAULT_FUNASR_CONFIG_DIR}/progress.txt"
+    DEFAULT_FUNASR_SERVER_LOG="${DEFAULT_FUNASR_CONFIG_DIR}/server_console.log"
+
+    if [ ! -f $DEFAULT_FUNASR_CONFIG_FILE ]; then
+        $SUDO_CMD touch $DEFAULT_FUNASR_CONFIG_FILE
+    fi
+    if [ ! -f $DEFAULT_FUNASR_SERVER_CONFIG_FILE ]; then
+        $SUDO_CMD touch $DEFAULT_FUNASR_SERVER_CONFIG_FILE
+    fi
+}
+
+initParameters(){
+    # Init workspace in local by new parameters.
+    PARAMS_FUNASR_SAMPLES_LOCAL_PATH=${PARAMS_FUNASR_LOCAL_WORKSPACE}/${DEFAULT_SAMPLES_NAME}.tar.gz
+    PARAMS_FUNASR_SAMPLES_LOCAL_DIR=${PARAMS_FUNASR_LOCAL_WORKSPACE}/${DEFAULT_SAMPLES_DIR}
+    PARAMS_FUNASR_LOCAL_MODELS_DIR="${PARAMS_FUNASR_LOCAL_WORKSPACE}/models"
+
+    if [ ! -z "$PARAMS_FUNASR_LOCAL_WORKSPACE" ]; then
+        mkdir -p $PARAMS_FUNASR_LOCAL_WORKSPACE
+    fi
+    if [ ! -z "$PARAMS_FUNASR_LOCAL_MODELS_DIR" ]; then
+        mkdir -p $PARAMS_FUNASR_LOCAL_MODELS_DIR
+    fi
+}
+
+# Parse the parameters from the docker list file.
+docker_info_cur_key=""
+docker_info_cur_val=""
+findTypeOfDockerInfo(){
+    line=$1
+    result=$(echo $line | grep ":")
+    if [ "$result" != "" ]; then
+        docker_info_cur_key=$result
+        docker_info_cur_val=""
+    else
+        docker_info_cur_val=$(echo $line)
+    fi
+}
+
+# Get a list of docker images.
+readDockerInfoFromUrl(){
+    while true
+    do
+        list_url=$DEFAULT_DOCKER_IMAGE_LISTS
+        content=$(curl --connect-timeout 10 -m 10 -s $list_url)
+        if [ ! -z "$content" ]; then
+            break
+        else
+            echo -e "    ${RED}Unable to get docker image list due to network issues, try again.${PLAIN}"
+
+            # switch sources of docker image lists
+            if [ "$list_url" = "$DEFAULT_DOCKER_OFFLINE_CPU_EN_LISTS_OSS" ]; then
+                DEFAULT_DOCKER_IMAGE_LISTS=$DEFAULT_DOCKER_OFFLINE_CPU_EN_LISTS_GIT
+            else
+                DEFAULT_DOCKER_IMAGE_LISTS=$DEFAULT_DOCKER_OFFLINE_CPU_EN_LISTS_OSS
+            fi
+        fi
+    done
+    array=($(echo "$content"))
+    len=${#array[@]}
+
+    for i in ${array[@]}
+    do
+        findTypeOfDockerInfo $i
+        if [ "$docker_info_cur_key" = "DOCKER:" ]; then
+            if [ ! -z "$docker_info_cur_val" ]; then
+                docker_name=${DEFAULT_FUNASR_DOCKER_URL}:${docker_info_cur_val}
+                DOCKER_IMAGES[${#DOCKER_IMAGES[*]}]=$docker_name
+            fi
+        elif [ "$docker_info_cur_key" = "DEFAULT_ASR_MODEL:" ]; then
+            if [ ! -z "$docker_info_cur_val" ]; then
+                ASR_MODELS[${#ASR_MODELS[*]}]=$docker_info_cur_val
+            fi
+        elif [ "$docker_info_cur_key" = "DEFAULT_VAD_MODEL:" ]; then
+            if [ ! -z "$docker_info_cur_val" ]; then
+                VAD_MODELS[${#VAD_MODELS[*]}]=$docker_info_cur_val
+            fi
+        elif [ "$docker_info_cur_key" = "DEFAULT_PUNC_MODEL:" ]; then
+            if [ ! -z "$docker_info_cur_val" ]; then
+                PUNC_MODELS[${#PUNC_MODELS[*]}]=$docker_info_cur_val
+            fi
+        fi
+    done
+    echo -e "    $DONE"
+}
+
+# Make sure root user.
+rootNess(){
+    echo -e "${UNDERLINE}${BOLD}[0/6]${PLAIN}"
+    echo -e "  ${YELLOW}Please check root access.${PLAIN}"
+
+    echo -e "    ${WARNING} MUST RUN AS ${RED}ROOT${PLAIN} USER!"
+    if [[ $EUID -ne 0 ]]; then
+        echo -e "  ${ERROR} MUST RUN AS ${RED}ROOT${PLAIN} USER!"
+    fi
+
+    check_sudo=$(which sudo | wc -l)
+    if [ $check_sudo -eq 0 ]; then
+        SUDO_CMD=""
+    fi
+
+    cd $CUR_DIR
+    echo
+}
+
+# Get a list of docker images and select them.
+selectDockerImages(){
+    echo -e "${UNDERLINE}${BOLD}[1/6]${PLAIN}"
+    echo -e "  ${YELLOW}Getting the list of docker images, please wait a few seconds.${PLAIN}"
+    readDockerInfoFromUrl
+    echo
+
+    the_latest_docker_image=$PARAMS_DOCKER_IMAGE
+
+    echo -e "  ${YELLOW}Please choose the Docker image.${PLAIN}"
+    menuSelection ${DOCKER_IMAGES[*]}
+    result=$?
+    index=`expr ${result} - 1`
+
+    PARAMS_DOCKER_IMAGE=${DOCKER_IMAGES[${index}]}
+    echo -e "  ${UNDERLINE}You have chosen the Docker image:${PLAIN} ${GREEN}${PARAMS_DOCKER_IMAGE}${PLAIN}"
+
+    if [ -z "$the_latest_docker_image" ] && [ -z "$PARAMS_FUNASR_DOCKER_ID" ]; then
+        result=0
+    else
+        #  0: DOCKER is not running
+        # 60: DOCKER_ID is empty
+        # 61: DOCKER_IMAGE is empty
+        # 62: DOCKER is running
+        # 63: DOCKER_ID and DOCKER_IMAGE are empty
+        checkDockerIdExist "install"
+        result=$?
+        result=`expr ${result} + 0`
+        if [ $result -eq 60 ]; then
+            result=0
+        elif [ $result -eq 61 ]; then
+            echo
+            echo -e "  ${RED}Please run (${PLAIN}${GREEN}${SUDO_CMD} bash funasr-runtime-deploy-offline-cpu-en.sh install${PLAIN}${RED}) to install Docker first.${PLAIN}"
+        elif [ $result -eq 62 ]; then
+            echo
+            echo -e "  ${RED}Docker: ${PARAMS_DOCKER_IMAGE} ${PARAMS_FUNASR_DOCKER_ID} has been launched, please run (${PLAIN}${GREEN}${SUDO_CMD} bash funasr-runtime-deploy-offline-cpu-en.sh remove${PLAIN}${RED}) to remove Docker first ant then install.${PLAIN}"
+        elif [ $result -eq 63 ]; then
+            result=0
+        fi
+    fi
+
+    echo
+}
+
+# Get a list of models and select them.
+selectModels(){
+    echo -e "${UNDERLINE}${BOLD}[2/6]${PLAIN}"
+    echo -e "  ${YELLOW}Get a list of selectable models.${PLAIN}"
+    echo
+
+    selectAsrModels
+    selectVadModels
+    selectPuncModels
+
+    echo
+}
+
+selectAsrModels(){
+    echo -e "  ${YELLOW}Please choose the ASR model.${PLAIN}"
+    menuSelection ${ASR_MODELS[*]}
+    result=$?
+    index=`expr ${result} - 1`
+
+    PARAMS_ASR_ID=${ASR_MODELS[${index}]}
+    echo -e "  ${UNDERLINE}You have chosen the ASR model:${PLAIN} ${GREEN}${PARAMS_ASR_ID}${PLAIN}"
+    echo
+}
+
+selectVadModels(){
+    echo -e "  ${YELLOW}Please choose the VAD model.${PLAIN}"
+    menuSelection ${VAD_MODELS[*]}
+    result=$?
+    index=`expr ${result} - 1`
+
+    PARAMS_VAD_ID=${VAD_MODELS[${index}]}
+    echo -e "  ${UNDERLINE}You have chosen the VAD model:${PLAIN} ${GREEN}${PARAMS_VAD_ID}${PLAIN}"
+    echo
+}
+
+selectPuncModels(){
+    echo -e "  ${YELLOW}Please choose the PUNC model.${PLAIN}"
+    menuSelection ${PUNC_MODELS[*]}
+    result=$?
+    index=`expr ${result} - 1`
+
+    PARAMS_PUNC_ID=${PUNC_MODELS[${index}]}
+    echo -e "  ${UNDERLINE}You have chosen the PUNC model:${PLAIN} ${GREEN}${PARAMS_PUNC_ID}${PLAIN}"
+    echo
+}
+
+# Configure FunASR server host port setting.
+setupHostPort(){
+    echo -e "${UNDERLINE}${BOLD}[3/6]${PLAIN}"
+
+    params_host_port=`sed '/^PARAMS_HOST_PORT=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ -z "$params_host_port" ]; then
+        PARAMS_HOST_PORT="10095"
+    else
+        PARAMS_HOST_PORT=$params_host_port
+    fi
+
+    while true
+    do
+        echo -e "  ${YELLOW}Please input the opened port in the host used for FunASR server.${PLAIN}"
+        echo -e "  Setting the opened host port [1-65535], default(${CYAN}${PARAMS_HOST_PORT}${PLAIN}): \c"
+        read PARAMS_HOST_PORT
+
+        if [ -z "$PARAMS_HOST_PORT" ]; then
+            params_host_port=`sed '/^PARAMS_HOST_PORT=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+            if [ -z "$params_host_port" ]; then
+                PARAMS_HOST_PORT="10095"
+            else
+                PARAMS_HOST_PORT=$params_host_port
+            fi
+        fi
+        expr $PARAMS_HOST_PORT + 0 &>/dev/null
+        if [ $? -eq 0 ]; then
+            if [ $PARAMS_HOST_PORT -ge 1 ] && [ $PARAMS_HOST_PORT -le 65535 ]; then
+                echo -e "  ${UNDERLINE}The port of the host is${PLAIN} ${GREEN}${PARAMS_HOST_PORT}${PLAIN}"
+                echo -e "  ${UNDERLINE}The port in Docker for FunASR server is${PLAIN} ${GREEN}${PARAMS_DOCKER_PORT}${PLAIN}"
+                break
+            else
+                echo -e "  ${RED}Input error, please input correct number!${PLAIN}"
+            fi
+        else
+            echo -e "  ${RED}Input error, please input correct number!${PLAIN}"
+        fi
+    done
+    echo
+}
+
+complementParameters(){
+    # parameters about ASR model
+    if [ ! -z "$PARAMS_ASR_ID" ]; then
+        PARAMS_DOCKER_ASR_PATH=${PARAMS_DOWNLOAD_MODEL_DIR}/${PARAMS_ASR_ID}
+        PARAMS_DOCKER_ASR_DIR=$(dirname "$PARAMS_DOCKER_ASR_PATH")
+        PARAMS_LOCAL_ASR_PATH=${PARAMS_FUNASR_LOCAL_MODELS_DIR}/${PARAMS_ASR_ID}
+        PARAMS_LOCAL_ASR_DIR=$(dirname "$PARAMS_LOCAL_ASR_PATH")
+    fi
+
+    # parameters about VAD model
+    if [ ! -z "$PARAMS_VAD_ID" ]; then
+            PARAMS_DOCKER_VAD_PATH=${PARAMS_DOWNLOAD_MODEL_DIR}/${PARAMS_VAD_ID}
+            PARAMS_DOCKER_VAD_DIR=$(dirname "$PARAMS_DOCKER_VAD_PATH")
+            PARAMS_LOCAL_VAD_PATH=${PARAMS_FUNASR_LOCAL_MODELS_DIR}/${PARAMS_VAD_ID}
+            PARAMS_LOCAL_VAD_DIR=$(dirname "$PARAMS_LOCAL_VAD_PATH")
+    fi
+
+    # parameters about PUNC model
+    if [ ! -z "$PARAMS_PUNC_ID" ]; then
+        PARAMS_DOCKER_PUNC_PATH=${PARAMS_DOWNLOAD_MODEL_DIR}/${PARAMS_PUNC_ID}
+        PARAMS_DOCKER_PUNC_DIR=$(dirname "${PARAMS_DOCKER_PUNC_PATH}")
+        PARAMS_LOCAL_PUNC_PATH=${PARAMS_FUNASR_LOCAL_MODELS_DIR}/${PARAMS_PUNC_ID}
+        PARAMS_LOCAL_PUNC_DIR=$(dirname "${PARAMS_LOCAL_PUNC_PATH}")
+    fi
+
+    # parameters about thread_num
+    params_decoder_thread_num=`sed '/^PARAMS_DECODER_THREAD_NUM=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ -z "$params_decoder_thread_num" ]; then
+        PARAMS_DECODER_THREAD_NUM=$CPUNUM
+    else
+        PARAMS_DECODER_THREAD_NUM=$params_decoder_thread_num
+    fi
+
+    multiple_io=4
+    PARAMS_DECODER_THREAD_NUM=`expr ${PARAMS_DECODER_THREAD_NUM} + 0`
+    PARAMS_IO_THREAD_NUM=`expr ${PARAMS_DECODER_THREAD_NUM} / ${multiple_io}`
+    if [ $PARAMS_IO_THREAD_NUM -eq 0 ]; then
+        PARAMS_IO_THREAD_NUM=1
+    fi
+}
+
+paramsFromDefault(){
+    initConfiguration
+
+    echo -e "  ${YELLOW}Load parameters from${PLAIN} ${GREEN}${DEFAULT_FUNASR_CONFIG_FILE}${PLAIN}"
+    echo
+
+    funasr_local_workspace=`sed '/^PARAMS_FUNASR_LOCAL_WORKSPACE=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$funasr_local_workspace" ]; then
+        PARAMS_FUNASR_LOCAL_WORKSPACE=$funasr_local_workspace
+    fi
+    funasr_samples_local_dir=`sed '/^PARAMS_FUNASR_SAMPLES_LOCAL_DIR=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$funasr_samples_local_dir" ]; then
+        PARAMS_FUNASR_SAMPLES_LOCAL_DIR=$funasr_samples_local_dir
+    fi
+    funasr_samples_local_path=`sed '/^PARAMS_FUNASR_SAMPLES_LOCAL_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$funasr_samples_local_path" ]; then
+        PARAMS_FUNASR_SAMPLES_LOCAL_PATH=$funasr_samples_local_path
+    fi
+    funasr_local_models_dir=`sed '/^PARAMS_FUNASR_LOCAL_MODELS_DIR=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$funasr_local_models_dir" ]; then
+        PARAMS_FUNASR_LOCAL_MODELS_DIR=$funasr_local_models_dir
+    fi
+
+    docker_image=`sed '/^PARAMS_DOCKER_IMAGE=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_image" ]; then
+        PARAMS_DOCKER_IMAGE=$docker_image
+    fi
+    download_model_dir=`sed '/^PARAMS_DOWNLOAD_MODEL_DIR=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$download_model_dir" ]; then
+        PARAMS_DOWNLOAD_MODEL_DIR=$download_model_dir
+    fi
+    PARAMS_LOCAL_ASR_PATH=`sed '/^PARAMS_LOCAL_ASR_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$local_asr_path" ]; then
+        PARAMS_LOCAL_ASR_PATH=$local_asr_path
+    fi
+    docker_asr_path=`sed '/^PARAMS_DOCKER_ASR_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_asr_path" ]; then
+        PARAMS_DOCKER_ASR_PATH=$docker_asr_path
+    fi
+    asr_id=`sed '/^PARAMS_ASR_ID=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$asr_id" ]; then
+        PARAMS_ASR_ID=$asr_id
+    fi
+    local_vad_path=`sed '/^PARAMS_LOCAL_VAD_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$local_vad_path" ]; then
+        PARAMS_LOCAL_VAD_PATH=$local_vad_path
+    fi
+    docker_vad_path=`sed '/^PARAMS_DOCKER_VAD_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_vad_path" ]; then
+        PARAMS_DOCKER_VAD_PATH=$docker_vad_path
+    fi
+    vad_id=`sed '/^PARAMS_VAD_ID=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$vad_id" ]; then
+        PARAMS_VAD_ID=$vad_id
+    fi
+    local_punc_path=`sed '/^PARAMS_LOCAL_PUNC_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$local_punc_path" ]; then
+        PARAMS_LOCAL_PUNC_PATH=$local_punc_path
+    fi
+    docker_punc_path=`sed '/^PARAMS_DOCKER_PUNC_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_punc_path" ]; then
+        PARAMS_DOCKER_PUNC_PATH=$docker_punc_path
+    fi
+    punc_id=`sed '/^PARAMS_PUNC_ID=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$punc_id" ]; then
+        PARAMS_PUNC_ID=$punc_id
+    fi
+    docker_exec_path=`sed '/^PARAMS_DOCKER_EXEC_PATH=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_exec_path" ]; then
+        PARAMS_DOCKER_EXEC_PATH=$docker_exec_path
+    fi
+    host_port=`sed '/^PARAMS_HOST_PORT=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$host_port" ]; then
+        PARAMS_HOST_PORT=$host_port
+    fi
+    docker_port=`sed '/^PARAMS_DOCKER_PORT=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_port" ]; then
+        PARAMS_DOCKER_PORT=$docker_port
+    fi
+    decode_thread_num=`sed '/^PARAMS_DECODER_THREAD_NUM=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$decode_thread_num" ]; then
+        PARAMS_DECODER_THREAD_NUM=$decode_thread_num
+    fi
+    io_thread_num=`sed '/^PARAMS_IO_THREAD_NUM=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$io_thread_num" ]; then
+        PARAMS_IO_THREAD_NUM=$io_thread_num
+    fi
+
+    ssl_flag=`sed '/^PARAMS_SSL_FLAG=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$ssl_flag" ]; then
+        PARAMS_SSL_FLAG=$ssl_flag
+    fi
+    docker_id=`sed '/^PARAMS_FUNASR_DOCKER_ID=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+    if [ ! -z "$docker_id" ]; then
+        PARAMS_FUNASR_DOCKER_ID=$docker_id
+    fi
+}
+
+saveParams(){
+    echo "$i" > $DEFAULT_FUNASR_CONFIG_FILE
+    echo -e "  ${GREEN}Parameters are stored in the file ${DEFAULT_FUNASR_CONFIG_FILE}${PLAIN}"
+
+    echo "PARAMS_DOCKER_IMAGE=${PARAMS_DOCKER_IMAGE}" > $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_FUNASR_LOCAL_WORKSPACE=${PARAMS_FUNASR_LOCAL_WORKSPACE}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_FUNASR_SAMPLES_LOCAL_DIR=${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_FUNASR_SAMPLES_LOCAL_PATH=${PARAMS_FUNASR_SAMPLES_LOCAL_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_FUNASR_LOCAL_MODELS_DIR=${PARAMS_FUNASR_LOCAL_MODELS_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_DOWNLOAD_MODEL_DIR=${PARAMS_DOWNLOAD_MODEL_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_DOCKER_EXEC_PATH=${PARAMS_DOCKER_EXEC_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_EXEC_DIR=${PARAMS_DOCKER_EXEC_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_LOCAL_ASR_PATH=${PARAMS_LOCAL_ASR_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_LOCAL_ASR_DIR=${PARAMS_LOCAL_ASR_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_ASR_PATH=${PARAMS_DOCKER_ASR_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_ASR_DIR=${PARAMS_DOCKER_ASR_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_ASR_ID=${PARAMS_ASR_ID}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_LOCAL_PUNC_PATH=${PARAMS_LOCAL_PUNC_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_LOCAL_PUNC_DIR=${PARAMS_LOCAL_PUNC_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_PUNC_PATH=${PARAMS_DOCKER_PUNC_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_PUNC_DIR=${PARAMS_DOCKER_PUNC_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_PUNC_ID=${PARAMS_PUNC_ID}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_LOCAL_VAD_PATH=${PARAMS_LOCAL_VAD_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_LOCAL_VAD_DIR=${PARAMS_LOCAL_VAD_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_VAD_PATH=${PARAMS_DOCKER_VAD_PATH}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_VAD_DIR=${PARAMS_DOCKER_VAD_DIR}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_VAD_ID=${PARAMS_VAD_ID}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    echo "PARAMS_HOST_PORT=${PARAMS_HOST_PORT}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DOCKER_PORT=${PARAMS_DOCKER_PORT}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_DECODER_THREAD_NUM=${PARAMS_DECODER_THREAD_NUM}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_IO_THREAD_NUM=${PARAMS_IO_THREAD_NUM}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_SSL_FLAG=${PARAMS_SSL_FLAG}" >> $DEFAULT_FUNASR_CONFIG_FILE
+    echo "PARAMS_FUNASR_DOCKER_ID=${PARAMS_FUNASR_DOCKER_ID}" >> $DEFAULT_FUNASR_CONFIG_FILE
+
+    serverConfigGeneration
+    echo "${daemon_server_config}" > $DEFAULT_FUNASR_SERVER_CONFIG_FILE
+}
+
+showAllParams(){
+    echo -e "${UNDERLINE}${BOLD}[4/6]${PLAIN}"
+    echo -e "  ${YELLOW}Show parameters of FunASR server setting and confirm to run ...${PLAIN}"
+    echo
+
+    only_show_flag=$1
+
+    if [ ! -z "$PARAMS_DOCKER_IMAGE" ]; then
+        echo -e "  The current Docker image is                                    : ${GREEN}${PARAMS_DOCKER_IMAGE}${PLAIN}"
+    fi
+    if [ ! -z "$PARAMS_FUNASR_LOCAL_WORKSPACE" ]; then
+        echo -e "  The local workspace path is                                    : ${GREEN}${PARAMS_FUNASR_LOCAL_WORKSPACE}${PLAIN}"
+    fi
+
+    if [ ! -z "$PARAMS_DOWNLOAD_MODEL_DIR" ]; then
+        echo -e "  The model will be automatically downloaded in Docker           : ${GREEN}${PARAMS_DOWNLOAD_MODEL_DIR}${PLAIN}"
+    fi
+    echo
+
+    if [ ! -z "$PARAMS_ASR_ID" ]; then
+        echo -e "  The ASR model_id used                                          : ${GREEN}${PARAMS_ASR_ID}${PLAIN}"
+    fi
+    if [ ! -z "$PARAMS_LOCAL_ASR_PATH" ]; then
+        echo -e "  The path to the local ASR model directory for the load         : ${GREEN}${PARAMS_LOCAL_ASR_PATH}${PLAIN}"
+    fi
+    echo -e "  The ASR model directory corresponds to the directory in Docker : ${GREEN}${PARAMS_DOCKER_ASR_PATH}${PLAIN}"
+
+    if [ ! -z "$PARAMS_VAD_ID" ]; then
+        echo -e "  The VAD model_id used                                          : ${GREEN}${PARAMS_VAD_ID}${PLAIN}"
+    fi
+    if [ ! -z "$PARAMS_LOCAL_VAD_PATH" ]; then
+        echo -e "  The path to the local VAD model directory for the load         : ${GREEN}${PARAMS_LOCAL_VAD_PATH}${PLAIN}"
+    fi
+    echo -e "  The VAD model directory corresponds to the directory in Docker : ${GREEN}${PARAMS_DOCKER_VAD_PATH}${PLAIN}"
+
+    if [ ! -z "$PARAMS_PUNC_ID" ]; then
+        echo -e "  The PUNC model_id used                                         : ${GREEN}${PARAMS_PUNC_ID}${PLAIN}"
+    fi
+    if [ ! -z "$PARAMS_LOCAL_PUNC_PATH" ]; then
+        echo -e "  The path to the local PUNC model directory for the load        : ${GREEN}${PARAMS_LOCAL_PUNC_PATH}${PLAIN}"
+    fi
+    echo -e "  The PUNC model directory corresponds to the directory in Docker: ${GREEN}${PARAMS_DOCKER_PUNC_PATH}${PLAIN}"
+    echo
+
+    echo -e "  The path in the docker of the FunASR service executor          : ${GREEN}${PARAMS_DOCKER_EXEC_PATH}${PLAIN}"
+
+    echo -e "  Set the host port used for use by the FunASR service           : ${GREEN}${PARAMS_HOST_PORT}${PLAIN}"
+    echo -e "  Set the docker port used by the FunASR service                 : ${GREEN}${PARAMS_DOCKER_PORT}${PLAIN}"
+
+    echo -e "  Set the number of threads used for decoding the FunASR service : ${GREEN}${PARAMS_DECODER_THREAD_NUM}${PLAIN}"
+    echo -e "  Set the number of threads used for IO the FunASR service       : ${GREEN}${PARAMS_IO_THREAD_NUM}${PLAIN}"
+    echo
+
+    if [ ! -z "$PARAMS_FUNASR_SAMPLES_LOCAL_DIR" ]; then
+        echo -e "  Sample code will be store in local                             : ${GREEN}${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}${PLAIN}"
+    fi
+    if [ ! -z "$PARAMS_SSL_FLAG" ]; then
+        echo -e "  The flag for the use of SSL                                    : ${GREEN}${PARAMS_SSL_FLAG}${PLAIN}"
+    fi
+    if [ "$only_show_flag" = "only_show" ] && [ ! -z "$PARAMS_FUNASR_DOCKER_ID" ]; then
+        echo -e "  The docker ID that already exists is                           : ${GREEN}${PARAMS_FUNASR_DOCKER_ID}${PLAIN}"
+    fi
+
+    echo
+
+    if [ "$only_show_flag" = "only_show" ]; then
+        return 0
+    fi
+
+    while true
+    do
+        params_confirm="y"
+        echo -e "  ${YELLOW}Please input [Y/n] to confirm the parameters.${PLAIN}"
+        echo -e "  [y] Verify that these parameters are correct and that the service will run."
+        echo -e "  [n] The parameters set are incorrect, it will be rolled out, please rerun."
+        echo -e "  read confirmation[${CYAN}Y${PLAIN}/n]: \c"
+        read params_confirm
+
+        if [ -z "$params_confirm" ]; then
+            params_confirm="y"
+        fi
+        YES="Y"
+        yes="y"
+        NO="N"
+        no="n"
+        echo
+        if [ "$params_confirm" = "$YES" ] || [ "$params_confirm" = "$yes" ]; then
+            echo -e "  ${GREEN}Will run FunASR server later ...${PLAIN}"
+            break
+        elif [ "$params_confirm" = "$NO" ] || [ "$params_confirm" = "$no" ]; then
+            echo -e "  ${RED}The parameters set are incorrect, please rerun ...${PLAIN}"
+            exit 1
+        else
+            echo "again ..."
+        fi
+    done
+
+    saveParams
+    echo
+    sleep 1
+}
+
+# Install docker
+installFunasrDocker(){
+    echo -e "${UNDERLINE}${BOLD}[5/6]${PLAIN}"
+
+    if [ $DOCKERINFOLEN -gt 30 ]; then
+        echo -e "  ${YELLOW}Docker has installed.${PLAIN}"
+    else
+        lowercase_osid=$(echo ${OSID} | tr '[A-Z]' '[a-z]')
+        echo -e "  ${YELLOW}Start install docker for ${lowercase_osid} ${PLAIN}"
+        DOCKER_INSTALL_CMD="curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun"
+        DOCKER_INSTALL_RUN_CMD=""
+
+        case "$lowercase_osid" in
+            ubuntu)
+                DOCKER_INSTALL_CMD="curl -fsSL https://test.docker.com -o test-docker.sh"
+                DOCKER_INSTALL_RUN_CMD="${SUDO_CMD} sh test-docker.sh"
+                ;;
+            centos)
+                DOCKER_INSTALL_CMD="curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun"
+                ;;
+            debian)
+                DOCKER_INSTALL_CMD="curl -fsSL https://get.docker.com -o get-docker.sh"
+                DOCKER_INSTALL_RUN_CMD="${SUDO_CMD} sh get-docker.sh"
+                ;;
+            \"alios\")
+                DOCKER_INSTALL_CMD="curl -fsSL https://get.docker.com -o get-docker.sh"
+                DOCKER_INSTALL_RUN_CMD="${SUDO_CMD} sh get-docker.sh"
+                ;;
+            \"alinux\")
+                DOCKER_INSTALL_CMD="${SUDO_CMD} yum -y install dnf"
+                DOCKER_INSTALL_RUN_CMD="${SUDO_CMD} dnf -y install docker"
+                ;;
+            *)
+                echo -e "  ${RED}$lowercase_osid is not supported.${PLAIN}"
+                ;;
+        esac
+
+        echo -e "  Get docker installer: ${GREEN}${DOCKER_INSTALL_CMD}${PLAIN}"
+        echo -e "  Get docker run: ${GREEN}${DOCKER_INSTALL_RUN_CMD}${PLAIN}"
+
+        $DOCKER_INSTALL_CMD
+        if [ ! -z "$DOCKER_INSTALL_RUN_CMD" ]; then
+            $DOCKER_INSTALL_RUN_CMD
+        fi
+        $SUDO_CMD systemctl start docker
+
+        DOCKERINFO=$(${SUDO_CMD} docker info | wc -l)
+        DOCKERINFOLEN=`expr ${DOCKERINFO} + 0`
+        if [ $DOCKERINFOLEN -gt 30 ]; then
+            echo -e "  ${GREEN}Docker install success, start docker server.${PLAIN}"
+            $SUDO_CMD systemctl start docker
+        else
+            echo -e "  ${RED}Docker install failed!${PLAIN}"
+            exit 1
+        fi
+    fi
+
+    echo
+    sleep 1
+
+    # Download docker image
+    echo -e "  ${YELLOW}Pull docker image(${PARAMS_DOCKER_IMAGE})...${PLAIN}"
+
+    ${SUDO_CMD} docker pull $PARAMS_DOCKER_IMAGE
+
+    echo
+    sleep 1
+}
+
+dockerRun(){
+    echo -e "${UNDERLINE}${BOLD}[6/6]${PLAIN}"
+    echo -e "  ${YELLOW}Construct command and run docker ...${PLAIN}"
+
+    start_flag=$1
+    if [ "$start_flag" = "install" ]; then
+        run_cmd="${SUDO_CMD} docker run"
+        port_map=" -p ${PARAMS_HOST_PORT}:${PARAMS_DOCKER_PORT}"
+        env_params=" --privileged=true"
+        dir_map_params=" -v ${DEFAULT_FUNASR_CONFIG_DIR}:/workspace/.config -v ${PARAMS_FUNASR_LOCAL_MODELS_DIR}:${PARAMS_DOWNLOAD_MODEL_DIR}"
+
+        serverConfigGeneration
+        env_params=" ${env_params} --env DAEMON_SERVER_CONFIG=${daemon_server_config}"
+
+        run_cmd="${run_cmd}${port_map}${dir_map_params}${env_params}"
+        run_cmd="${run_cmd} -it -d ${PARAMS_DOCKER_IMAGE}"
+    else
+        #  0: DOCKER is not running
+        # 60: DOCKER_ID is empty
+        # 61: DOCKER_IMAGE is empty
+        # 62: DOCKER is running
+        checkDockerIdExist $start_flag
+        result=$?
+        result=`expr ${result} + 0`
+        if [ $result -eq 60 ]; then
+            echo
+            echo -e "  ${RED}Please run (${PLAIN}${GREEN}${SUDO_CMD} bash funasr-runtime-deploy-offline-cpu-en.sh install${PLAIN}${RED}) to install Docker first.${PLAIN}"
+            return $result
+        elif [ $result -eq 61 ]; then
+            echo
+            echo -e "  ${RED}Please run (${PLAIN}${GREEN}${SUDO_CMD} bash funasr-runtime-deploy-offline-cpu-en.sh install${PLAIN}${RED}) to install Docker first.${PLAIN}"
+            return $result
+        elif [ $result -eq 62 ]; then
+            echo
+            echo -e "  ${RED}Docker: ${PARAMS_DOCKER_IMAGE} ${PARAMS_FUNASR_DOCKER_ID} has been launched, please run (${PLAIN}${GREEN}${SUDO_CMD} bash funasr-runtime-deploy-offline-cpu-en.sh stop${PLAIN}${RED}) to stop Docker first.${PLAIN}"
+            return $result
+        fi
+
+        run_cmd="${SUDO_CMD} docker restart ${PARAMS_FUNASR_DOCKER_ID}"
+    fi
+
+    rm -f ${DEFAULT_FUNASR_PROGRESS_TXT}
+    rm -f ${DEFAULT_FUNASR_SERVER_LOG}
+
+    $run_cmd
+
+    echo
+    echo -e "  ${YELLOW}Loading models:${PLAIN}"
+
+    getDockerId
+    saveParams
+
+    # Hide the cursor, start draw progress.
+    printf "\e[?25l"
+    while true
+    do
+        serverProgress
+        result=$?
+        stage=`expr ${result} + 0`
+        if [ ${stage} -eq 0 ]; then
+            break
+        elif [ ${stage} -gt 0 ] && [ ${stage} -lt 6 ]; then
+            sleep 0.1
+            # clear 3 lines
+            printf "\033[3A"
+        elif [ ${stage} -eq 6 ]; then
+            break
+        elif [ ${stage} -eq 98 ]; then
+            return 98
+        else
+            echo -e "  ${RED}Starting FunASR server failed.${PLAIN}"
+            echo
+            # Display the cursor
+            printf "\e[?25h"
+            return 99
+        fi
+    done
+    # Display the cursor
+    printf "\e[?25h"
+
+    echo -e "  ${GREEN}The service has been started.${PLAIN}"
+    echo
+
+    deploySamples
+    echo -e "  ${BOLD}The sample code is already stored in the ${PLAIN}(${GREEN}${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}${PLAIN}) ."
+    echo -e "  ${BOLD}If you want to see an example of how to use the client, you can run ${PLAIN}${GREEN}${SUDO_CMD} bash funasr-runtime-deploy-offline-cpu-en.sh client${PLAIN} ."
+    echo
+}
+
+daemon_server_config=""
+serverConfigGeneration(){
+    # params about models
+	if [ ! -z "$PARAMS_ASR_ID" ]; then
+        asr_params="\"--model-dir\":\"${PARAMS_ASR_ID}\""
+    else
+        if [ ! -z "$PARAMS_LOCAL_ASR_PATH" ]; then
+            dir_map_params="${dir_map_params} -v ${PARAMS_LOCAL_ASR_PATH}:${PARAMS_DOCKER_ASR_PATH}"
+        fi
+        asr_params="\"--model-dir\":\"${PARAMS_DOCKER_ASR_PATH}\""
+    fi
+    if [ ! -z "$PARAMS_VAD_ID" ]; then
+        vad_params="\"--vad-dir\":\"${PARAMS_VAD_ID}\""
+    else
+        if [ ! -z "$PARAMS_LOCAL_VAD_PATH" ]; then
+            dir_map_params="${dir_map_params} -v ${PARAMS_LOCAL_VAD_PATH}:${PARAMS_DOCKER_VAD_PATH}"
+        fi
+        vad_params="\"--vad-dir\":\"${PARAMS_DOCKER_VAD_PATH}\""
+    fi
+    if [ ! -z "$PARAMS_PUNC_ID" ]; then
+        punc_params="\"--punc-dir\":\"${PARAMS_PUNC_ID}\""
+    else
+        if [ ! -z "$PARAMS_LOCAL_PUNC_PATH" ]; then
+            dir_map_params="${dir_map_params} -v ${PARAMS_LOCAL_VAD_PATH}:${PARAMS_DOCKER_VAD_PATH}"
+        fi
+        punc_params="\"--punc-dir\":\"${PARAMS_DOCKER_PUNC_PATH}\""
+    fi
+    download_params="\"--download-model-dir\":\"${PARAMS_DOWNLOAD_MODEL_DIR}\""
+    model_params="${asr_params},${vad_params},${punc_params},${download_params}"
+
+    # params about thread_num
+    decoder_params="\"--decoder-thread-num\":\"${PARAMS_DECODER_THREAD_NUM}\""
+    io_params="\"--io-thread-num\":\"${PARAMS_IO_THREAD_NUM}\""
+    thread_params=${decoder_params},${io_params}
+
+    # params about port and ssl
+    port_params="\"--port\":\"${PARAMS_DOCKER_PORT}\""
+    if [ $PARAMS_SSL_FLAG -eq 0 ]; then
+        crt_path="\"--certfile\":\"\""
+        key_path="\"--keyfile\":\"\""
+    else
+        crt_path="\"--certfile\":\"/workspace/FunASR/funasr/runtime/ssl_key/server.crt\""
+        key_path="\"--keyfile\":\"/workspace/FunASR/funasr/runtime/ssl_key/server.key\""
+    fi
+
+    exec_params="\"exec\":\"${PARAMS_DOCKER_EXEC_PATH}\""
+
+    daemon_server_config="{\"server\":[{${exec_params},${model_params},${thread_params},${port_params},${crt_path},${key_path}}]}"
+}
+
+installPythonDependencyForPython(){
+    echo -e "${YELLOW}Install Python dependent environments ...${PLAIN}"
+
+    echo -e "  Export dependency of Cpp sample."
+    pre_cmd="export LD_LIBRARY_PATH=${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/cpp/libs:\$LD_LIBRARY_PATH"
+    $pre_cmd
+    echo
+
+    echo -e "  Install requirements of Python sample."
+    pre_cmd="pip3 install click>=8.0.4"
+    $pre_cmd
+    echo
+
+    pre_cmd="pip3 install -r ${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/python/requirements_client.txt"
+    echo -e "  Run ${BLUE}${pre_cmd}${PLAIN}"
+    $pre_cmd
+    echo
+
+    lowercase_osid=$(echo ${OSID} | tr '[A-Z]' '[a-z]')
+    case "$lowercase_osid" in
+        ubuntu)
+            pre_cmd="${SUDO_CMD} apt-get install -y ffmpeg"
+            ;;
+        centos)
+            pre_cmd="${SUDO_CMD} yum install -y ffmpeg"
+            ;;
+        debian)
+            pre_cmd="${SUDO_CMD} apt-get install -y ffmpeg"
+            ;;
+        \"alios\")
+            pre_cmd="${SUDO_CMD} yum install -y ffmpeg"
+            ;;
+        \"alinux\")
+            pre_cmd="${SUDO_CMD} yum install -y ffmpeg"
+            ;;
+        *)
+            echo -e "  ${RED}$lowercase_osid is not supported.${PLAIN}"
+            ;;
+    esac
+    echo -e "  Run ${BLUE}${pre_cmd}${PLAIN}"
+    echo
+
+    pre_cmd="pip3 install ffmpeg-python"
+    echo -e "  Run ${BLUE}${pre_cmd}${PLAIN}"
+    $pre_cmd
+    echo
+}
+
+deploySamples(){
+    if [ ! -d $PARAMS_FUNASR_SAMPLES_LOCAL_DIR ]; then
+        echo -e "${YELLOW}Downloading samples to${PLAIN} ${CYAN}${PARAMS_FUNASR_LOCAL_WORKSPACE}${PLAIN} ${YELLOW}...${PLAIN}"
+
+        download_cmd="curl ${DEFAULT_SAMPLES_URL} -o ${PARAMS_FUNASR_SAMPLES_LOCAL_PATH}"
+        untar_cmd="tar -zxf ${PARAMS_FUNASR_SAMPLES_LOCAL_PATH} -C ${PARAMS_FUNASR_LOCAL_WORKSPACE}"
+
+        if [ ! -f "$PARAMS_FUNASR_SAMPLES_LOCAL_PATH" ]; then
+            $download_cmd
+        fi
+        $untar_cmd
+        echo
+
+        installPythonDependencyForPython
+        echo
+    fi
+}
+
+getDockerId(){
+    id=""
+    array=($(${SUDO_CMD} docker ps -a | grep ${PARAMS_DOCKER_IMAGE} | awk '{print $1}'))
+    len=${#array[@]}
+    if [ $len -ge 1 ]; then
+        # get the first id
+        id=$array
+        if [ ! -z "$id" ]; then
+            PARAMS_FUNASR_DOCKER_ID=$id
+        fi
+    fi
+}
+
+checkDockerImageExist(){
+    result=1
+    if [ -z "$PARAMS_DOCKER_IMAGE" ]; then
+        return 50
+    else
+        result=$(${SUDO_CMD} docker ps | grep ${PARAMS_DOCKER_IMAGE} | wc -l)
+    fi
+    result=`expr ${result} + 0`
+    echo "checkDockerImageExist result0: " $result
+    if [ $result -ne 0 ]; then
+        # found docker
+        return 51
+    else
+        return 0
+    fi
+}
+
+checkDockerIdExist(){
+    result=0
+    if [ -z "$PARAMS_FUNASR_DOCKER_ID" ]; then
+        if [ -z "$PARAMS_DOCKER_IMAGE" ]; then
+            return 63
+        else
+            return 60
+        fi
+    else
+        if [ -z "$PARAMS_DOCKER_IMAGE" ]; then
+            return 61
+        else
+            if [ "$1" = "install" ]; then
+                result=$(${SUDO_CMD} docker ps -a | grep ${PARAMS_DOCKER_IMAGE} | grep ${PARAMS_FUNASR_DOCKER_ID} | wc -l)
+            else
+                result=$(${SUDO_CMD} docker ps | grep ${PARAMS_DOCKER_IMAGE} | grep ${PARAMS_FUNASR_DOCKER_ID} | wc -l)
+            fi
+        fi
+    fi
+    result=`expr ${result} + 0`
+    if [ $result -eq 1 ]; then
+        # found docker
+        return 62
+    else
+        return 0
+    fi
+}
+
+dockerStop(){
+    if [ -z "$PARAMS_FUNASR_DOCKER_ID" ]; then
+        echo -e "  ${RED}DOCKER_ID is empty, cannot stop docker.${PLAIN}"
+    else
+        echo -e "  ${YELLOW}Stop docker(${PLAIN}${GREEN}${PARAMS_DOCKER_IMAGE} ${PARAMS_FUNASR_DOCKER_ID}${PLAIN}${YELLOW}) server ...${PLAIN}"
+        ${SUDO_CMD} docker stop ${PARAMS_FUNASR_DOCKER_ID}
+    fi
+    echo
+}
+
+dockerRemove(){
+    if [ -z "$PARAMS_FUNASR_DOCKER_ID" ]; then
+        echo -e "  ${RED}DOCKER_ID is empty, cannot remove docker.${PLAIN}"
+    else
+        echo -e "  ${YELLOW}Remove docker(${PLAIN}${GREEN}${PARAMS_DOCKER_IMAGE} ${PARAMS_FUNASR_DOCKER_ID}${PLAIN}${YELLOW}) ...${PLAIN}"
+        ${SUDO_CMD} docker rm ${PARAMS_FUNASR_DOCKER_ID}
+    fi
+
+    echo
+}
+
+modelChange(){
+    model_type=$1
+    model_id=$2
+    local_flag=0
+
+    relativePathToFullPath $model_id
+    if [ -d "$full_path" ]; then
+        local_flag=1
+        model_id=$full_path
+    else
+        local_flag=0
+    fi
+    full_path=""
+
+    result=$(echo ${model_type} | grep "\-\-asr_model")
+    if [ "$result" != "" ]; then
+        if [ $local_flag -eq 0 ]; then
+            PARAMS_ASR_ID=$model_id
+            PARAMS_DOCKER_ASR_PATH=${PARAMS_DOWNLOAD_MODEL_DIR}/${PARAMS_ASR_ID}
+            PARAMS_DOCKER_ASR_DIR=$(dirname "${PARAMS_DOCKER_ASR_PATH}")
+            PARAMS_LOCAL_ASR_PATH=${PARAMS_FUNASR_LOCAL_MODELS_DIR}/${PARAMS_ASR_ID}
+            PARAMS_LOCAL_ASR_DIR=$(dirname "${PARAMS_LOCAL_ASR_PATH}")
+        else
+            PARAMS_ASR_ID=""
+            PARAMS_LOCAL_ASR_PATH=$model_id
+            if [ ! -d "$PARAMS_LOCAL_ASR_PATH" ]; then
+                echo -e "  ${RED}${PARAMS_LOCAL_ASR_PATH} does not exist, please set again.${PLAIN}"
+            else
+                model_name=$(basename "${PARAMS_LOCAL_ASR_PATH}")
+                PARAMS_LOCAL_ASR_DIR=$(dirname "${PARAMS_LOCAL_ASR_PATH}")
+                PARAMS_DOCKER_ASR_DIR=$PARAMS_DOWNLOAD_MODEL_DIR
+                PARAMS_DOCKER_ASR_PATH=${PARAMS_DOCKER_ASR_DIR}/${model_name}
+            fi
+        fi
+    fi
+    result=$(echo ${model_type} | grep "\-\-vad_model")
+    if [ "$result" != "" ]; then
+        if [ $local_flag -eq 0 ]; then
+            PARAMS_VAD_ID=$model_id
+            PARAMS_DOCKER_VAD_PATH=${PARAMS_DOWNLOAD_MODEL_DIR}/${PARAMS_VAD_ID}
+            PARAMS_DOCKER_VAD_DIR=$(dirname "${PARAMS_DOCKER_VAD_PATH}")
+            PARAMS_LOCAL_VAD_PATH=${PARAMS_FUNASR_LOCAL_MODELS_DIR}/${PARAMS_VAD_ID}
+            PARAMS_LOCAL_VAD_DIR=$(dirname "${PARAMS_LOCAL_VAD_PATH}")
+        else
+            PARAMS_VAD_ID=""
+            PARAMS_LOCAL_VAD_PATH=$model_id
+            if [ ! -d "$PARAMS_LOCAL_VAD_PATH" ]; then
+                echo -e "  ${RED}${PARAMS_LOCAL_VAD_PATH} does not exist, please set again.${PLAIN}"
+            else
+                model_name=$(basename "${PARAMS_LOCAL_VAD_PATH}")
+                PARAMS_LOCAL_VAD_DIR=$(dirname "${PARAMS_LOCAL_VAD_PATH}")
+                PARAMS_DOCKER_VAD_DIR=$PARAMS_DOWNLOAD_MODEL_DIR
+                PARAMS_DOCKER_VAD_PATH=${PARAMS_DOCKER_VAD_DIR}/${model_name}
+            fi
+        fi
+    fi
+    result=$(echo ${model_type} | grep "\-\-punc_model")
+    if [ "$result" != "" ]; then
+        if [ $local_flag -eq 0 ]; then
+            PARAMS_PUNC_ID=$model_id
+            PARAMS_DOCKER_PUNC_PATH=${PARAMS_DOWNLOAD_MODEL_DIR}/${PARAMS_PUNC_ID}
+            PARAMS_DOCKER_PUNC_DIR=$(dirname "${PARAMS_DOCKER_PUNC_PATH}")
+            PARAMS_LOCAL_PUNC_PATH=${PARAMS_FUNASR_LOCAL_MODELS_DIR}/${PARAMS_PUNC_ID}
+            PARAMS_LOCAL_PUNC_DIR=$(dirname "${PARAMS_LOCAL_PUNC_PATH}")
+        else
+            model_name=$(basename "${PARAMS_LOCAL_PUNC_PATH}")
+            PARAMS_LOCAL_PUNC_DIR=$(dirname "${PARAMS_LOCAL_PUNC_PATH}")
+            PARAMS_DOCKER_PUNC_DIR=$PARAMS_DOWNLOAD_MODEL_DIR
+            PARAMS_DOCKER_PUNC_PATH=${PARAMS_DOCKER_PUNC_DIR}/${model_name}
+        fi
+    fi
+}
+
+threadNumChange() {
+    type=$1
+    val=$2
+
+    if [ -z "$val"]; then
+        num=`expr ${val} + 0`
+        if [ $num -ge 1 ] && [ $num -le 1024 ]; then
+            result=$(echo ${type} | grep "\-\-decode_thread_num")
+            if [ "$result" != "" ]; then
+                PARAMS_DECODER_THREAD_NUM=$num
+            fi
+            result=$(echo ${type} | grep "\-\-io_thread_num")
+            if [ "$result" != "" ]; then
+                PARAMS_IO_THREAD_NUM=$num
+            fi
+        fi
+    fi
+}
+
+portChange() {
+    type=$1
+    val=$2
+
+    if [ ! -z "$val" ]; then
+        port=`expr ${val} + 0`
+        if [ $port -ge 1 ] && [ $port -le 65536 ]; then
+            result=$(echo ${type} | grep "host_port")
+            if [ "$result" != "" ]; then
+                PARAMS_HOST_PORT=$port
+            fi
+            result=$(echo ${type} | grep "docker_port")
+            if [ "$result" != "" ]; then
+                PARAMS_DOCKER_PORT=$port
+            fi
+        fi
+    fi
+}
+
+sampleClientRun(){
+    echo -e "${YELLOW}Will download sample tools for the client to show how speech recognition works.${PLAIN}"
+
+    download_cmd="curl ${DEFAULT_SAMPLES_URL} -o ${PARAMS_FUNASR_SAMPLES_LOCAL_PATH}"
+    untar_cmd="tar -zxf ${PARAMS_FUNASR_SAMPLES_LOCAL_PATH} -C ${PARAMS_FUNASR_LOCAL_WORKSPACE}"
+
+    if [ ! -f "$PARAMS_FUNASR_SAMPLES_LOCAL_PATH" ]; then
+        $download_cmd
+    fi    
+    if [ -f "$PARAMS_FUNASR_SAMPLES_LOCAL_PATH" ]; then
+        $untar_cmd
+    fi
+    if [ -d "$PARAMS_FUNASR_SAMPLES_LOCAL_DIR" ]; then
+        echo -e "  Please select the client you want to run."
+        menuSelection ${SAMPLE_CLIENTS[*]}
+        result=$?
+        index=`expr ${result} - 1`
+        lang=${SAMPLE_CLIENTS[${index}]}
+        echo
+
+        server_ip="127.0.0.1"
+        echo -e "  Please enter the IP of server, default(${CYAN}${server_ip}${PLAIN}): \c"
+        read server_ip
+        if [ -z "$server_ip" ]; then
+            server_ip="127.0.0.1"
+        fi
+
+        host_port=`sed '/^PARAMS_HOST_PORT=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+        if [ -z "$host_port" ]; then
+            host_port="10095"
+        fi
+        echo -e "  Please enter the port of server, default(${CYAN}${host_port}${PLAIN}): \c"
+        read host_port
+        if [ -z "$host_port" ]; then
+            host_port=`sed '/^PARAMS_HOST_PORT=/!d;s/.*=//' ${DEFAULT_FUNASR_CONFIG_FILE}`
+            if [ -z "$host_port" ]; then
+                host_port="10095"
+            fi
+        fi
+
+        wav_path="${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/audio/asr_example.wav"
+        echo -e "  Please enter the audio path, default(${CYAN}${wav_path}${PLAIN}): \c"
+        read WAV_PATH
+        if [ -z "$wav_path" ]; then
+            wav_path="${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/audio/asr_example.wav"
+        fi
+
+        echo
+        pre_cmd=鈥濃��
+        case "$lang" in
+            Linux_Cpp)
+                client_exec="${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/cpp/funasr-wss-client"
+                run_cmd="${client_exec} --server-ip ${server_ip} --port ${host_port} --wav-path ${wav_path}"
+                ;;
+            Python)
+                client_exec="${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/python/wss_client_asr.py"
+                run_cmd="python3 ${client_exec} --host ${server_ip} --port ${host_port} --mode offline --audio_in ${wav_path} --send_without_sleep --output_dir ${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/python"
+                pre_cmd="pip3 install click>=8.0.4"
+                echo -e "  Run ${BLUE}${pre_cmd}${PLAIN}"
+                $pre_cmd
+                echo
+                pre_cmd="pip3 install -r ${PARAMS_FUNASR_SAMPLES_LOCAL_DIR}/python/requirements_client.txt"
+                echo -e "  Run ${BLUE}${pre_cmd}${PLAIN}"
+                $pre_cmd
+                echo
+                ;;
+            *)
+                echo "${lang} is not supported."
+                ;;
+        esac
+
+        echo -e "  Run ${BLUE}${run_cmd}${PLAIN}"
+        $run_cmd
+        echo
+        echo -e "  If failed, you can try (${GREEN}${run_cmd}${PLAIN}) in your Shell."
+        echo
+    fi
+}
+
+paramsConfigure(){
+    initConfiguration
+    initParameters
+    selectDockerImages
+    selectModels
+    result=$?
+    result=`expr ${result} + 0`
+    if [ $result -ne 0 ]; then
+        return $result
+    fi
+
+    setupHostPort
+    complementParameters
+    return 0
+}
+
+# Display Help info
+displayHelp(){
+    echo -e "${UNDERLINE}Usage${PLAIN}:"
+    echo -e "  $0 [OPTIONAL FLAGS]"
+    echo
+    echo -e "funasr-runtime-deploy-offline-cpu-en.sh - a Bash script to install&run FunASR docker."
+    echo
+    echo -e "${UNDERLINE}Options${PLAIN}:"
+    echo -e "   ${BOLD}-i, install, --install${PLAIN}    Install and run FunASR docker."
+    echo -e "                install [--workspace] <workspace in local>"
+    echo -e "                install [--ssl] <0: close SSL; 1: open SSL, default:1>"
+    echo -e "   ${BOLD}-s, start  , --start${PLAIN}      Run FunASR docker with configuration that has already been set."
+    echo -e "   ${BOLD}-p, stop   , --stop${PLAIN}       Stop FunASR docker."
+    echo -e "   ${BOLD}-m, remove , --remove${PLAIN}     Remove FunASR docker installed."
+    echo -e "   ${BOLD}-r, restart, --restart${PLAIN}    Restart FunASR docker."
+    echo -e "   ${BOLD}-u, update , --update${PLAIN}     Update parameters that has already been set."
+    echo -e "                update [--workspace] <workspace in local>"
+    echo -e "                update [--asr_model | --vad_model | --punc_model] <model_id or local model path>"
+    echo -e "                update [--host_port | --docker_port] <port number>"
+    echo -e "                update [--decode_thread_num | io_thread_num] <the number of threads>"
+    echo -e "                update [--ssl] <0: close SSL; 1: open SSL, default:1>"
+    echo -e "   ${BOLD}-c, client , --client${PLAIN}     Get a client example to show how to initiate speech recognition."
+    echo -e "   ${BOLD}-o, show   , --show${PLAIN}       Displays all parameters that have been set."
+    echo -e "   ${BOLD}-v, version, --version${PLAIN}    Display current script version."
+    echo -e "   ${BOLD}-h, help   , --help${PLAIN}       Display this help."
+    echo
+    echo -e "   Version    : ${scriptVersion} "
+    echo -e "   Modify Date: ${scriptDate}"
+}
+
+parseInput(){
+    local menu
+    menu=($(echo "$@"))
+    len=${#menu[@]}
+
+    stage=""
+    if [ $len -ge 2 ]; then
+        for val in ${menu[@]}
+        do
+            result=$(echo $val | grep "\-\-")
+            if [ "$result" != "" ]; then
+                stage=$result
+            else
+                if [ "$stage" = "--workspace" ]; then
+                    relativePathToFullPath $val
+                    PARAMS_FUNASR_LOCAL_WORKSPACE=$full_path
+                    full_path=""
+                    if [ ! -z "$PARAMS_FUNASR_LOCAL_WORKSPACE" ]; then
+                        mkdir -p $PARAMS_FUNASR_LOCAL_WORKSPACE
+                    fi
+                elif [ "$stage" = "--ssl" ]; then
+                    PARAMS_SSL_FLAG=`expr ${val} + 0`
+                fi
+            fi
+        done
+    fi
+}
+
+# OS
+OSID=$(grep ^ID= /etc/os-release | cut -d= -f2)
+OSVER=$(lsb_release -cs)
+OSNUM=$(grep -oE  "[0-9.]+" /etc/issue)
+CPUNUM=$(cat /proc/cpuinfo | grep "processor"|wc -l)
+DOCKERINFO=$(${SUDO_CMD} docker info | wc -l)
+DOCKERINFOLEN=`expr ${DOCKERINFO} + 0`
+
+# PARAMS
+#  The workspace for FunASR in local
+PARAMS_FUNASR_LOCAL_WORKSPACE=$DEFAULT_FUNASR_LOCAL_WORKSPACE
+#  The dir stored sample code in local
+PARAMS_FUNASR_SAMPLES_LOCAL_DIR=${PARAMS_FUNASR_LOCAL_WORKSPACE}/${DEFAULT_SAMPLES_DIR}
+#  The path of sample code in local
+PARAMS_FUNASR_SAMPLES_LOCAL_PATH=${PARAMS_FUNASR_LOCAL_WORKSPACE}/${DEFAULT_SAMPLES_NAME}.tar.gz
+#  The dir stored models in local
+PARAMS_FUNASR_LOCAL_MODELS_DIR="${PARAMS_FUNASR_LOCAL_WORKSPACE}/models"
+#  The id of started docker
+PARAMS_FUNASR_DOCKER_ID=""
+
+#  The server excutor in local
+PARAMS_DOCKER_EXEC_PATH=$DEFAULT_DOCKER_EXEC_PATH
+#  The dir stored server excutor in docker
+PARAMS_DOCKER_EXEC_DIR=$DEFAULT_DOCKER_EXEC_DIR
+
+#  The dir for downloading model in docker
+PARAMS_DOWNLOAD_MODEL_DIR=$DEFAULT_FUNASR_WORKSPACE_DIR
+#  The Docker image name
+PARAMS_DOCKER_IMAGE=""
+
+#  The dir stored punc model in local
+PARAMS_LOCAL_PUNC_DIR=""
+#  The path of punc model in local
+PARAMS_LOCAL_PUNC_PATH=""
+#  The dir stored punc model in docker
+PARAMS_DOCKER_PUNC_DIR=""
+#  The path of punc model in docker
+PARAMS_DOCKER_PUNC_PATH=""
+#  The punc model ID in ModelScope
+PARAMS_PUNC_ID="damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx"
+
+#  The dir stored vad model in local
+PARAMS_LOCAL_VAD_DIR=""
+#  The path of vad model in local
+PARAMS_LOCAL_VAD_PATH=""
+#  The dir stored vad model in docker
+PARAMS_DOCKER_VAD_DIR=""
+#  The path of vad model in docker
+PARAMS_DOCKER_VAD_PATH=""
+#  The vad model ID in ModelScope
+PARAMS_VAD_ID="damo/speech_fsmn_vad_zh-cn-16k-common-onnx"
+
+#  The dir stored asr model in local
+PARAMS_LOCAL_ASR_DIR=""
+#  The path of asr model in local
+PARAMS_LOCAL_ASR_PATH=""
+#  The dir stored asr model in docker
+PARAMS_DOCKER_ASR_DIR=""
+#  The path of asr model in docker
+PARAMS_DOCKER_ASR_PATH=""
+#  The asr model ID in ModelScope
+PARAMS_ASR_ID="damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx"
+
+PARAMS_HOST_PORT="10095"
+PARAMS_DOCKER_PORT="10095"
+PARAMS_DECODER_THREAD_NUM="32"
+PARAMS_IO_THREAD_NUM="8"
+PARAMS_SSL_FLAG=1
+
+
+echo -e "#############################################################"
+echo -e "#          ${RED}OS${PLAIN}: ${OSID} ${OSNUM} ${OSVER}"
+echo -e "#      ${RED}Kernel${PLAIN}: $(uname -m) Linux $(uname -r)"
+echo -e "#         ${RED}CPU${PLAIN}: $(grep 'model name' /proc/cpuinfo | uniq | awk -F : '{print $2}' | sed 's/^[ \t]*//g' | sed 's/ \+/ /g') "
+echo -e "#     ${RED}CPU NUM${PLAIN}: ${CPUNUM}"
+echo -e "#         ${RED}RAM${PLAIN}: $(cat /proc/meminfo | grep 'MemTotal' | awk -F : '{print $2}' | sed 's/^[ \t]*//g') "
+echo -e "#"
+echo -e "#     ${RED}Version${PLAIN}: ${scriptVersion} "
+echo -e "# ${RED}Modify Date${PLAIN}: ${scriptDate}"
+echo -e "#############################################################"
+echo
+
+# Initialization step
+case "$1" in
+    install|-i|--install)
+        rootNess
+        paramsFromDefault
+        parseInput $@
+        paramsConfigure
+        result=$?
+        result=`expr ${result} + 0`
+        if [ $result -eq 0 ]; then
+            showAllParams "install"
+            installFunasrDocker
+            dockerRun "install"
+            result=$?
+
+            try_count=1
+            while true
+            do
+                stage=`expr ${result} + 0`
+                if [ $try_count -ge 10 ]; then
+                    break
+                else
+                    # 98: cannot find progress from Docker
+                    if [ $stage -eq 98 ]; then
+                        dockerStop
+                        dockerRun "start"
+                        result=$?
+                        let try_count=try_count+1
+                    else
+                        break
+                    fi
+                fi
+            done
+        fi
+        ;;
+    start|-s|--start)
+        rootNess
+        paramsFromDefault
+        showAllParams "only_show"
+        dockerRun "start"
+        result=$?
+
+        try_count=1
+        while true
+        do
+            stage=`expr ${result} + 0`
+            if [ $try_count -ge 10 ]; then
+                break
+            else
+                # 98: cannot find progress from Docker
+                if [ $stage -eq 98 ]; then
+                    dockerStop
+                    dockerRun "start"
+                    result=$?
+                    let try_count=try_count+1
+                else
+                    break
+                fi
+            fi
+        done
+        ;;
+    restart|-r|--restart)
+        rootNess
+        paramsFromDefault
+        showAllParams "only_show"
+        dockerStop
+        dockerRun "start"
+        result=$?
+        
+        try_count=1
+        while true
+        do
+            stage=`expr ${result} + 0`
+            if [ $try_count -ge 10 ]; then
+                break
+            else
+                # 98: cannot find progress from Docker
+                if [ $stage -eq 98 ]; then
+                    dockerStop
+                    dockerRun "start"
+                    result=$?
+                    let try_count=try_count+1
+                else
+                    break
+                fi
+            fi
+        done
+        ;;
+    stop|-p|--stop)
+        rootNess
+        paramsFromDefault
+        dockerStop
+        ;;
+    remove|-m|--remove)
+        rootNess
+        paramsFromDefault
+        dockerStop
+        dockerRemove
+        rm -f ${DEFAULT_FUNASR_CONFIG_FILE}
+        rm -f ${DEFAULT_FUNASR_SERVER_CONFIG_FILE}
+        ;;
+    update|-u|--update)
+        rootNess
+        paramsFromDefault
+
+        if [ $# -eq 3 ]; then
+            type=$2
+            val=$3
+            if [ "$type" = "--asr_model" ] || [ "$type" = "--vad_model" ] || [ "$type" = "--punc_model" ]; then
+                modelChange $type $val
+            elif [ "$type" = "--decode_thread_num" ] || [ "$type" = "--io_thread_num" ]; then
+                threadNumChange $type $val
+            elif [ "$type" = "--host_port" ] || [ "$type" = "--docker_port" ]; then
+                portChange $type $val
+            elif [ "$type" = "--workspace" ]; then
+                relativePathToFullPath $val
+                PARAMS_FUNASR_LOCAL_WORKSPACE=$full_path
+                if [ ! -z "$PARAMS_FUNASR_LOCAL_WORKSPACE" ]; then
+                    mkdir -p $PARAMS_FUNASR_LOCAL_WORKSPACE
+                fi
+            elif [ "$type" = "--ssl" ]; then
+                switch=`expr ${val} + 0`
+                if [ $switch -eq 0 ]; then
+                    PARAMS_SSL_FLAG=0
+                else
+                    PARAMS_SSL_FLAG=1
+                fi
+            else
+                displayHelp
+            fi
+        else
+            displayHelp
+        fi
+
+        initParameters
+        complementParameters
+        showAllParams "install"
+        dockerStop
+        dockerRun "start"
+        result=$?
+
+        try_count=1
+        while true
+        do
+            stage=`expr ${result} + 0`
+            if [ $try_count -ge 10 ]; then
+                break
+            else
+                # 98: cannot find progress from Docker
+                # 60: DOCKER_ID is empty
+                if [ $stage -eq 98 ] || [ $stage -eq 60 ]; then
+                    dockerStop
+                    dockerRun "start"
+                    result=$?
+                    let try_count=try_count+1
+                else
+                    break
+                fi
+            fi
+        done
+        ;;
+    client|-c|--client)
+        rootNess
+        paramsFromDefault
+        parseInput $@
+        sampleClientRun
+        ;;
+    show|-o|--show)
+        rootNess
+        paramsFromDefault
+        showAllParams "only_show"
+        ;;
+    *)
+        displayHelp
+        exit 0
+        ;;
+esac
diff --git a/funasr/runtime/docs/SDK_advanced_guide_offline_en.md b/funasr/runtime/docs/SDK_advanced_guide_offline_en.md
new file mode 100644
index 0000000..cf460aa
--- /dev/null
+++ b/funasr/runtime/docs/SDK_advanced_guide_offline_en.md
@@ -0,0 +1,211 @@
+ # Advanced Development Guide (File transcription service)
+ 
+FunASR provides a English offline file transcription service that can be deployed locally or on a cloud server with just one click. The core of the service is the FunASR runtime SDK, which has been open-sourced. FunASR-runtime combines various capabilities such as speech endpoint detection (VAD), large-scale speech recognition (ASR) using Paraformer-large, and punctuation detection (PUNC), which have all been open-sourced by the speech laboratory of DAMO Academy on the Modelscope community. This enables accurate and efficient high-concurrency transcription of audio files.
+
+This document serves as a development guide for the FunASR offline file transcription service. If you wish to quickly experience the offline file transcription service, please refer to the one-click deployment example for the FunASR offline file transcription service ([docs](./SDK_tutorial.md)).
+
+## Installation of Docker
+
+The following steps are for manually installing Docker and Docker images. If your Docker image has already been launched, you can ignore this step.
+
+### Installation of Docker environment
+
+```shell
+# Ubuntu锛�
+curl -fsSL https://test.docker.com -o test-docker.sh 
+sudo sh test-docker.sh 
+# Debian锛�
+curl -fsSL https://get.docker.com -o get-docker.sh 
+sudo sh get-docker.sh 
+# CentOS锛�
+curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 
+# MacOS锛�
+brew install --cask --appdir=/Applications docker
+```
+
+More details could ref to [docs](https://alibaba-damo-academy.github.io/FunASR/en/installation/docker.html)
+
+### Starting Docker
+
+```shell
+sudo systemctl start docker
+```
+
+### Pulling and launching images
+
+Use the following command to pull and launch the Docker image for the FunASR runtime-SDK:
+
+```shell
+sudo docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.0
+
+sudo docker run -p 10095:10095 -it --privileged=true -v /root:/workspace/models registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.0
+```
+
+Introduction to command parameters: 
+```text
+-p <host port>:<mapped docker port>: In the example, host machine (ECS) port 10095 is mapped to port 10095 in the Docker container. Make sure that port 10095 is open in the ECS security rules.
+
+-v <host path>:<mounted Docker path>: In the example, the host machine path /root is mounted to the Docker path /workspace/models.
+
+```
+
+
+## Starting the server
+
+Use the flollowing script to start the server 锛�
+```shell
+nohup bash run_server.sh \
+  --download-model-dir /workspace/models \
+  --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
+  --model-dir damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx  \
+  --punc-dir damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx > log.out 2>&1 &
+
+# If you want to close ssl锛宲lease add锛�--certfile 0
+
+```
+
+More details about the script run_server.sh:
+
+The FunASR-wss-server supports downloading models from Modelscope. You can set the model download address (--download-model-dir, default is /workspace/models) and the model ID (--model-dir, --vad-dir, --punc-dir). Here is an example:
+
+```shell
+cd /workspace/FunASR/funasr/runtime/websocket/build/bin
+./funasr-wss-server  \
+  --download-model-dir /workspace/models \
+  --model-dir damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx \
+  --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
+  --punc-dir damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx \
+  --decoder-thread-num 32 \
+  --io-thread-num  8 \
+  --port 10095 \
+  --certfile  ../../../ssl_key/server.crt \
+  --keyfile ../../../ssl_key/server.key
+ ```
+
+Introduction to command parameters: 
+
+```text
+--download-model-dir: Model download address, download models from Modelscope by setting the model ID.
+--model-dir: Modelscope model ID.
+--quantize: True for quantized ASR model, False for non-quantized ASR model. Default is True.
+--vad-dir: Modelscope model ID.
+--vad-quant: True for quantized VAD model, False for non-quantized VAD model. Default is True.
+--punc-dir: Modelscope model ID.
+--punc-quant: True for quantized PUNC model, False for non-quantized PUNC model. Default is True.
+--itn-dir modelscope model ID
+--port: Port number that the server listens on. Default is 10095.
+--decoder-thread-num: Number of inference threads that the server starts. Default is 8.
+--io-thread-num: Number of IO threads that the server starts. Default is 1.
+--certfile <string>: SSL certificate file. Default is ../../../ssl_key/server.crt. If you want to close ssl锛宻et ""
+--keyfile <string>: SSL key file. Default is ../../../ssl_key/server.key. If you want to close ssl锛宻et ""
+```
+
+The FunASR-wss-server also supports loading models from a local path (see Preparing Model Resources for detailed instructions on preparing local model resources). Here is an example:
+
+```shell
+cd /workspace/FunASR/funasr/runtime/websocket/build/bin
+./funasr-wss-server  \
+  --model-dir /workspace/models/damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx \
+  --vad-dir /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
+  --punc-dir /workspace/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx \
+  --decoder-thread-num 32 \
+  --io-thread-num  8 \
+  --port 10095 \
+  --certfile  ../../../ssl_key/server.crt \
+  --keyfile ../../../ssl_key/server.key
+ ```
+
+After executing the above command, the real-time speech transcription service will be started. If the model is specified as a ModelScope model id, the following models will be automatically downloaded from ModelScope:
+[FSMN-VAD](https://www.modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx/summary)
+[Paraformer-lagre](https://www.modelscope.cn/models/damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx/summary)
+[CT-Transformer](https://www.modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx/summary)
+
+If you wish to deploy your fine-tuned model (e.g., 10epoch.pb), you need to manually rename the model to model.pb and replace the original model.pb in ModelScope. Then, specify the path as `model_dir`.
+
+## Starting the client
+
+After completing the deployment of FunASR offline file transcription service on the server, you can test and use the service by following these steps. Currently, FunASR-bin supports multiple ways to start the client. The following are command-line examples based on python-client, c++-client, and custom client Websocket communication protocol: 
+
+### python-client
+```shell
+python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "./data/wav.scp" --send_without_sleep --output_dir "./results"
+```
+
+Introduction to command parameters:
+
+```text
+--host: the IP address of the server. It can be set to 127.0.0.1 for local testing.
+--port: the port number of the server listener.
+--audio_in: the audio input. Input can be a path to a wav file or a wav.scp file (a Kaldi-formatted wav list in which each line includes a wav_id followed by a tab and a wav_path).
+--output_dir: the path to the recognition result output.
+--ssl: whether to use SSL encryption. The default is to use SSL.
+--mode: offline mode.
+--hotword: If am is hotword model, setting hotword: *.txt(one hotword perline) or hotwords seperate by space (could be: 闃块噷宸村反 杈炬懇闄�)
+--use_itn: whether to use itn, the default value is 1 for enabling and 0 for disabling.
+```
+
+### c++-client
+```shell
+. /funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path test.wav --thread-num 1 --is-ssl 1
+```
+
+Introduction to command parameters:
+
+```text
+--server-ip: the IP address of the server. It can be set to 127.0.0.1 for local testing.
+--port: the port number of the server listener.
+--wav-path: the audio input. Input can be a path to a wav file or a wav.scp file (a Kaldi-formatted wav list in which each line includes a wav_id followed by a tab and a wav_path).
+--is-ssl: whether to use SSL encryption. The default is to use SSL.
+--hotword: If am is hotword model, setting hotword: *.txt(one hotword perline) or hotwords seperate by space (could be: 闃块噷宸村反 杈炬懇闄�)
+--use-itn: whether to use itn, the default value is 1 for enabling and 0 for disabling.
+```
+
+### Custom client
+
+If you want to define your own client, see the [Websocket communication protocol](./websocket_protocol.md)
+
+## How to customize service deployment
+
+The code for FunASR-runtime is open source. If the server and client cannot fully meet your needs, you can further develop them based on your own requirements:
+
+### C++ client
+
+https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/websocket
+
+### Python client
+
+https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/python/websocket
+
+### C++ server
+
+#### VAD
+```c++
+// The use of the VAD model consists of two steps: FsmnVadInit and FsmnVadInfer:
+FUNASR_HANDLE vad_hanlde=FsmnVadInit(model_path, thread_num);
+// Where: model_path contains "model-dir" and "quantize", thread_num is the ONNX thread count;
+FUNASR_RESULT result=FsmnVadInfer(vad_hanlde, wav_file.c_str(), NULL, 16000);
+// Where: vad_hanlde is the return value of FunOfflineInit, wav_file is the path to the audio file, and sampling_rate is the sampling rate (default 16k).
+```
+
+See the usage example for details [docs](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/onnxruntime/bin/funasr-onnx-offline-vad.cpp)
+
+#### ASR
+```text
+// The use of the ASR model consists of two steps: FunOfflineInit and FunOfflineInfer:
+FUNASR_HANDLE asr_hanlde=FunOfflineInit(model_path, thread_num);
+// Where: model_path contains "model-dir" and "quantize", thread_num is the ONNX thread count;
+FUNASR_RESULT result=FunOfflineInfer(asr_hanlde, wav_file.c_str(), RASR_NONE, NULL, 16000);
+// Where: asr_hanlde is the return value of FunOfflineInit, wav_file is the path to the audio file, and sampling_rate is the sampling rate (default 16k).
+```
+
+See the usage example for details, [docs](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/onnxruntime/bin/funasr-onnx-offline.cpp)
+
+#### PUNC
+```text
+// The use of the PUNC model consists of two steps: CTTransformerInit and CTTransformerInfer:
+FUNASR_HANDLE punc_hanlde=CTTransformerInit(model_path, thread_num);
+// Where: model_path contains "model-dir" and "quantize", thread_num is the ONNX thread count;
+FUNASR_RESULT result=CTTransformerInfer(punc_hanlde, txt_str.c_str(), RASR_NONE, NULL);
+// Where: punc_hanlde is the return value of CTTransformerInit, txt_str is the text
+```
+See the usage example for details, [docs](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp)
diff --git a/funasr/runtime/docs/SDK_advanced_guide_offline_en_zh.md b/funasr/runtime/docs/SDK_advanced_guide_offline_en_zh.md
new file mode 100644
index 0000000..67d8535
--- /dev/null
+++ b/funasr/runtime/docs/SDK_advanced_guide_offline_en_zh.md
@@ -0,0 +1,271 @@
+# FunASR鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟寮�鍙戞寚鍗�
+
+FunASR鎻愪緵鍙竴閿湰鍦版垨鑰呬簯绔湇鍔″櫒閮ㄧ讲鐨勮嫳鏂囩绾挎枃浠惰浆鍐欐湇鍔★紝鍐呮牳涓篎unASR宸插紑婧恟untime-SDK銆侳unASR-runtime缁撳悎浜嗚揪鎽╅櫌璇煶瀹為獙瀹ゅ湪Modelscope绀惧尯寮�婧愮殑璇煶绔偣妫�娴�(VAD)銆丳araformer-large璇煶璇嗗埆(ASR)銆佹爣鐐规娴�(PUNC) 绛夌浉鍏宠兘鍔涳紝鍙互鍑嗙‘銆侀珮鏁堢殑瀵归煶棰戣繘琛岄珮骞跺彂杞啓銆�
+
+鏈枃妗d负FunASR绂荤嚎鏂囦欢杞啓鏈嶅姟寮�鍙戞寚鍗椼�傚鏋滄偍鎯冲揩閫熶綋楠岀绾挎枃浠惰浆鍐欐湇鍔★紝鍙弬鑰僛蹇�熶笂鎵媇(#蹇�熶笂鎵�)銆�
+
+## 鏈嶅姟鍣ㄩ厤缃�
+
+鐢ㄦ埛鍙互鏍规嵁鑷繁鐨勪笟鍔¢渶姹傦紝閫夋嫨鍚堥�傜殑鏈嶅姟鍣ㄩ厤缃紝鎺ㄨ崘閰嶇疆涓猴細
+- 閰嶇疆1: 锛圶86锛岃绠楀瀷锛夛紝4鏍竩CPU锛屽唴瀛�8G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�32璺殑璇锋眰
+- 閰嶇疆2: 锛圶86锛岃绠楀瀷锛夛紝16鏍竩CPU锛屽唴瀛�32G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�64璺殑璇锋眰
+- 閰嶇疆3: 锛圶86锛岃绠楀瀷锛夛紝64鏍竩CPU锛屽唴瀛�128G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�200璺殑璇锋眰
+
+璇︾粏鎬ц兘娴嬭瘯鎶ュ憡锛圼鐐瑰嚮姝ゅ](./benchmark_onnx_cpp.md)锛�
+
+浜戞湇鍔″巶鍟嗭紝閽堝鏂扮敤鎴凤紝鏈�3涓湀鍏嶈垂璇曠敤娲诲姩锛岀敵璇锋暀绋嬶紙[鐐瑰嚮姝ゅ](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/docs/aliyun_server_tutorial.md)锛�
+
+
+## 蹇�熶笂鎵�
+### 闀滃儚鍚姩
+
+閫氳繃涓嬭堪鍛戒护鎷夊彇骞跺惎鍔‵unASR runtime-SDK鐨刣ocker闀滃儚锛�
+
+```shell
+sudo docker pull \
+  registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.0
+mkdir -p ./funasr-runtime-resources/models
+sudo docker run -p 10095:10095 -it --privileged=true \
+  -v $PWD/funasr-runtime-resources/models:/workspace/models \
+  registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.0
+```
+濡傛灉鎮ㄦ病鏈夊畨瑁卍ocker锛屽彲鍙傝�僛Docker瀹夎](#Docker瀹夎)
+
+### 鏈嶅姟绔惎鍔�
+
+docker鍚姩涔嬪悗锛屽惎鍔� funasr-wss-server鏈嶅姟绋嬪簭锛�
+```shell
+cd FunASR/funasr/runtime
+nohup bash run_server.sh \
+  --download-model-dir /workspace/models \
+  --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
+  --model-dir damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx  \
+  --punc-dir damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx  > log.out 2>&1 &
+
+# 濡傛灉鎮ㄦ兂鍏抽棴ssl锛屽鍔犲弬鏁帮細--certfile 0
+
+```
+鏈嶅姟绔缁嗗弬鏁颁粙缁嶅彲鍙傝�僛鏈嶅姟绔弬鏁颁粙缁峕(#鏈嶅姟绔弬鏁颁粙缁�)
+### 瀹㈡埛绔祴璇曚笌浣跨敤
+
+涓嬭浇瀹㈡埛绔祴璇曞伐鍏风洰褰晄amples
+```shell
+wget https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/sample/funasr_samples.tar.gz
+```
+鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屾敮鎸佸绉嶉煶棰戞牸寮忚緭鍏ワ紙.wav, .pcm, .mp3绛夛級锛屼篃鏀寔瑙嗛杈撳叆(.mp4绛�)锛屼互鍙婂鏂囦欢鍒楄〃wav.scp杈撳叆锛屽叾浠栫増鏈鎴风璇峰弬鑰冩枃妗o紙[鐐瑰嚮姝ゅ](#瀹㈡埛绔敤娉曡瑙�)锛夛紝瀹氬埗鏈嶅姟閮ㄧ讲璇峰弬鑰僛濡備綍瀹氬埗鏈嶅姟閮ㄧ讲](#濡備綍瀹氬埗鏈嶅姟閮ㄧ讲)
+```shell
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav"
+```
+
+------------------
+## Docker瀹夎
+
+涓嬭堪姝ラ涓烘墜鍔ㄥ畨瑁卍ocker鐜鐨勬楠わ細
+
+### docker鐜瀹夎
+```shell
+# Ubuntu锛�
+curl -fsSL https://test.docker.com -o test-docker.sh 
+sudo sh test-docker.sh 
+# Debian锛�
+curl -fsSL https://get.docker.com -o get-docker.sh 
+sudo sh get-docker.sh 
+# CentOS锛�
+curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 
+# MacOS锛�
+brew install --cask --appdir=/Applications docker
+```
+
+瀹夎璇﹁锛歨ttps://alibaba-damo-academy.github.io/FunASR/en/installation/docker.html
+
+### docker鍚姩
+
+```shell
+sudo systemctl start docker
+```
+
+
+## 瀹㈡埛绔敤娉曡瑙�
+
+鍦ㄦ湇鍔″櫒涓婂畬鎴怓unASR鏈嶅姟閮ㄧ讲浠ュ悗锛屽彲浠ラ�氳繃濡備笅鐨勬楠ゆ潵娴嬭瘯鍜屼娇鐢ㄧ绾挎枃浠惰浆鍐欐湇鍔°��
+鐩墠鍒嗗埆鏀寔浠ヤ笅鍑犵缂栫▼璇█瀹㈡埛绔�
+
+- [Python](#python-client)
+- [CPP](#cpp-client)
+- [html缃戦〉鐗堟湰](#Html缃戦〉鐗�)
+- [Java](#Java-client)
+
+### python-client
+鑻ユ兂鐩存帴杩愯client杩涜娴嬭瘯锛屽彲鍙傝�冨涓嬬畝鏄撹鏄庯紝浠ython鐗堟湰涓轰緥锛�
+
+```shell
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline \
+        --audio_in "../audio/asr_example.wav" --output_dir "./results"
+```
+
+鍛戒护鍙傛暟璇存槑锛�
+```text
+--host 涓篎unASR runtime-SDK鏈嶅姟閮ㄧ讲鏈哄櫒ip锛岄粯璁や负鏈満ip锛�127.0.0.1锛夛紝濡傛灉client涓庢湇鍔′笉鍦ㄥ悓涓�鍙版湇鍔″櫒锛�
+       闇�瑕佹敼涓洪儴缃叉満鍣╥p
+--port 10095 閮ㄧ讲绔彛鍙�
+--mode offline琛ㄧず绂荤嚎鏂囦欢杞啓
+--audio_in 闇�瑕佽繘琛岃浆鍐欑殑闊抽鏂囦欢锛屾敮鎸佹枃浠惰矾寰勶紝鏂囦欢鍒楄〃wav.scp
+--thread_num 璁剧疆骞跺彂鍙戦�佺嚎绋嬫暟锛岄粯璁や负1
+--ssl 璁剧疆鏄惁寮�鍚痵sl璇佷功鏍¢獙锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+--hotword 濡傛灉妯″瀷涓虹儹璇嶆ā鍨嬶紝鍙互璁剧疆鐑瘝: *.txt(姣忚涓�涓儹璇�) 鎴栬�呯┖鏍煎垎闅旂殑鐑瘝瀛楃涓�(闃块噷宸村反 杈炬懇闄�)
+--use_itn 璁剧疆鏄惁浣跨敤itn锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+```
+
+### cpp-client
+杩涘叆samples/cpp鐩綍鍚庯紝鍙互鐢╟pp杩涜娴嬭瘯锛屾寚浠ゅ涓嬶細
+```shell
+./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav
+```
+
+鍛戒护鍙傛暟璇存槑锛�
+
+```text
+--server-ip 涓篎unASR runtime-SDK鏈嶅姟閮ㄧ讲鏈哄櫒ip锛岄粯璁や负鏈満ip锛�127.0.0.1锛夛紝濡傛灉client涓庢湇鍔′笉鍦ㄥ悓涓�鍙版湇鍔″櫒锛�
+            闇�瑕佹敼涓洪儴缃叉満鍣╥p
+--port 10095 閮ㄧ讲绔彛鍙�
+--wav-path 闇�瑕佽繘琛岃浆鍐欑殑闊抽鏂囦欢锛屾敮鎸佹枃浠惰矾寰�
+--hotword 濡傛灉妯″瀷涓虹儹璇嶆ā鍨嬶紝鍙互璁剧疆鐑瘝: *.txt(姣忚涓�涓儹璇�) 鎴栬�呯┖鏍煎垎闅旂殑鐑瘝瀛楃涓� (闃块噷宸村反 杈炬懇闄�)
+--use-itn 璁剧疆鏄惁浣跨敤itn锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+```
+
+### Html缃戦〉鐗�
+
+鍦ㄦ祻瑙堝櫒涓墦寮� html/static/index.html锛屽嵆鍙嚭鐜板涓嬮〉闈紝鏀寔楹﹀厠椋庤緭鍏ヤ笌鏂囦欢涓婁紶锛岀洿鎺ヨ繘琛屼綋楠�
+
+<img src="images/html.png"  width="900"/>
+
+### Java-client
+
+```shell
+FunasrWsClient --host localhost --port 10095 --audio_in ./asr_example.wav --mode offline
+```
+璇︾粏鍙互鍙傝�冩枃妗o紙[鐐瑰嚮姝ゅ](../java/readme.md)锛�
+
+
+
+## 鏈嶅姟绔弬鏁颁粙缁嶏細
+
+funasr-wss-server鏀寔浠嶮odelscope涓嬭浇妯″瀷锛岃缃ā鍨嬩笅杞藉湴鍧�锛�--download-model-dir锛岄粯璁や负/workspace/models锛夊強model ID锛�--model-dir銆�--vad-dir銆�--punc-dir锛�,绀轰緥濡備笅锛�
+```shell
+cd /workspace/FunASR/funasr/runtime/websocket/build/bin
+./funasr-wss-server  \
+  --download-model-dir /workspace/models \
+  --model-dir damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx \
+  --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
+  --punc-dir damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx \
+  --decoder-thread-num 32 \
+  --io-thread-num  8 \
+  --port 10095 \
+  --certfile  ../../../ssl_key/server.crt \
+  --keyfile ../../../ssl_key/server.key
+ ```
+鍛戒护鍙傛暟浠嬬粛锛�
+```text
+--download-model-dir 妯″瀷涓嬭浇鍦板潃锛岄�氳繃璁剧疆model ID浠嶮odelscope涓嬭浇妯″瀷
+--model-dir  modelscope model ID
+--quantize  True涓洪噺鍖朅SR妯″瀷锛孎alse涓洪潪閲忓寲ASR妯″瀷锛岄粯璁ゆ槸True
+--vad-dir  modelscope model ID
+--vad-quant   True涓洪噺鍖朧AD妯″瀷锛孎alse涓洪潪閲忓寲VAD妯″瀷锛岄粯璁ゆ槸True
+--punc-dir  modelscope model ID
+--punc-quant   True涓洪噺鍖朠UNC妯″瀷锛孎alse涓洪潪閲忓寲PUNC妯″瀷锛岄粯璁ゆ槸True
+--itn-dir modelscope model ID
+--port  鏈嶅姟绔洃鍚殑绔彛鍙凤紝榛樿涓� 10095
+--decoder-thread-num  鏈嶅姟绔惎鍔ㄧ殑鎺ㄧ悊绾跨▼鏁帮紝榛樿涓� 8
+--io-thread-num  鏈嶅姟绔惎鍔ㄧ殑IO绾跨▼鏁帮紝榛樿涓� 1
+--certfile  ssl鐨勮瘉涔︽枃浠讹紝榛樿涓猴細../../../ssl_key/server.crt锛屽鏋滈渶瑕佸叧闂璼sl锛屽弬鏁拌缃负鈥濃��
+--keyfile   ssl鐨勫瘑閽ユ枃浠讹紝榛樿涓猴細../../../ssl_key/server.key锛屽鏋滈渶瑕佸叧闂璼sl锛屽弬鏁拌缃负鈥濃��
+```
+
+funasr-wss-server鍚屾椂涔熸敮鎸佷粠鏈湴璺緞鍔犺浇妯″瀷锛堟湰鍦版ā鍨嬭祫婧愬噯澶囪瑙乕妯″瀷璧勬簮鍑嗗](#妯″瀷璧勬簮鍑嗗)锛夌ず渚嬪涓嬶細
+```shell
+cd /workspace/FunASR/funasr/runtime/websocket/build/bin
+./funasr-wss-server  \
+  --model-dir /workspace/models/damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx \
+  --vad-dir /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
+  --punc-dir /workspace/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx \
+  --decoder-thread-num 32 \
+  --io-thread-num  8 \
+  --port 10095 \
+  --certfile  ../../../ssl_key/server.crt \
+  --keyfile ../../../ssl_key/server.key
+ ```
+鍛戒护鍙傛暟浠嬬粛锛�
+```text
+--model-dir  ASR妯″瀷璺緞锛岄粯璁や负锛�/workspace/models/asr
+--quantize   True涓洪噺鍖朅SR妯″瀷锛孎alse涓洪潪閲忓寲ASR妯″瀷锛岄粯璁ゆ槸True
+--vad-dir  VAD妯″瀷璺緞锛岄粯璁や负锛�/workspace/models/vad
+--vad-quant   True涓洪噺鍖朧AD妯″瀷锛孎alse涓洪潪閲忓寲VAD妯″瀷锛岄粯璁ゆ槸True
+--punc-dir  PUNC妯″瀷璺緞锛岄粯璁や负锛�/workspace/models/punc
+--punc-quant   True涓洪噺鍖朠UNC妯″瀷锛孎alse涓洪潪閲忓寲PUNC妯″瀷锛岄粯璁ゆ槸True
+--itn-dir modelscope model ID
+--port  鏈嶅姟绔洃鍚殑绔彛鍙凤紝榛樿涓� 10095
+--decoder-thread-num  鏈嶅姟绔惎鍔ㄧ殑鎺ㄧ悊绾跨▼鏁帮紝榛樿涓� 8
+--io-thread-num  鏈嶅姟绔惎鍔ㄧ殑IO绾跨▼鏁帮紝榛樿涓� 1
+--certfile ssl鐨勮瘉涔︽枃浠讹紝榛樿涓猴細../../../ssl_key/server.crt锛屽鏋滈渶瑕佸叧闂璼sl锛屽弬鏁拌缃负鈥濃��
+--keyfile  ssl鐨勫瘑閽ユ枃浠讹紝榛樿涓猴細../../../ssl_key/server.key锛屽鏋滈渶瑕佸叧闂璼sl锛屽弬鏁拌缃负鈥濃��
+```
+
+鎵ц涓婅堪鎸囦护鍚庯紝鍚姩绂荤嚎鏂囦欢杞啓鏈嶅姟銆傚鏋滄ā鍨嬫寚瀹氫负ModelScope涓璵odel id锛屼細鑷姩浠嶮oldeScope涓笅杞藉涓嬫ā鍨嬶細
+[FSMN-VAD妯″瀷](https://www.modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx/summary)锛�
+[Paraformer-lagre妯″瀷](https://www.modelscope.cn/models/damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx/summary)
+[CT-Transformer鏍囩偣棰勬祴妯″瀷](https://www.modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx/summary)
+
+濡傛灉锛屾偍甯屾湜閮ㄧ讲鎮╢inetune鍚庣殑妯″瀷锛堜緥濡�10epoch.pb锛夛紝闇�瑕佹墜鍔ㄥ皢妯″瀷閲嶅懡鍚嶄负model.pb锛屽苟灏嗗師modelscope涓ā鍨媘odel.pb鏇挎崲鎺夛紝灏嗚矾寰勬寚瀹氫负`model_dir`鍗冲彲銆�
+
+
+## 濡備綍瀹氬埗鏈嶅姟閮ㄧ讲
+
+FunASR-runtime鐨勪唬鐮佸凡寮�婧愶紝濡傛灉鏈嶅姟绔拰瀹㈡埛绔笉鑳藉緢濂界殑婊¤冻鎮ㄧ殑闇�姹傦紝鎮ㄥ彲浠ユ牴鎹嚜宸辩殑闇�姹傝繘琛岃繘涓�姝ョ殑寮�鍙戯細
+### c++ 瀹㈡埛绔細
+
+https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/websocket
+
+### python 瀹㈡埛绔細
+
+https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/python/websocket
+
+### 鑷畾涔夊鎴风锛�
+
+濡傛灉鎮ㄦ兂瀹氫箟鑷繁鐨刢lient锛屽弬鑰僛websocket閫氫俊鍗忚](./websocket_protocol_zh.md)
+
+
+```
+
+### c++ 鏈嶅姟绔細
+
+#### VAD
+```c++
+// VAD妯″瀷鐨勪娇鐢ㄥ垎涓篎smnVadInit鍜孎smnVadInfer涓や釜姝ラ锛�
+FUNASR_HANDLE vad_hanlde=FsmnVadInit(model_path, thread_num);
+// 鍏朵腑锛歮odel_path 鍖呭惈"model-dir"銆�"quantize"锛宼hread_num涓簅nnx绾跨▼鏁帮紱
+FUNASR_RESULT result=FsmnVadInfer(vad_hanlde, wav_file.c_str(), NULL, 16000);
+// 鍏朵腑锛歷ad_hanlde涓篎unOfflineInit杩斿洖鍊硷紝wav_file涓洪煶棰戣矾寰勶紝sampling_rate涓洪噰鏍风巼(榛樿16k)
+```
+
+浣跨敤绀轰緥璇﹁锛歨ttps://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/onnxruntime/bin/funasr-onnx-offline-vad.cpp
+
+#### ASR
+```text
+// ASR妯″瀷鐨勪娇鐢ㄥ垎涓篎unOfflineInit鍜孎unOfflineInfer涓や釜姝ラ锛�
+FUNASR_HANDLE asr_hanlde=FunOfflineInit(model_path, thread_num);
+// 鍏朵腑锛歮odel_path 鍖呭惈"model-dir"銆�"quantize"锛宼hread_num涓簅nnx绾跨▼鏁帮紱
+FUNASR_RESULT result=FunOfflineInfer(asr_hanlde, wav_file.c_str(), RASR_NONE, NULL, 16000);
+// 鍏朵腑锛歛sr_hanlde涓篎unOfflineInit杩斿洖鍊硷紝wav_file涓洪煶棰戣矾寰勶紝sampling_rate涓洪噰鏍风巼(榛樿16k)
+```
+
+浣跨敤绀轰緥璇﹁锛歨ttps://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/onnxruntime/bin/funasr-onnx-offline.cpp
+
+#### PUNC
+```text
+// PUNC妯″瀷鐨勪娇鐢ㄥ垎涓篊TTransformerInit鍜孋TTransformerInfer涓や釜姝ラ锛�
+FUNASR_HANDLE punc_hanlde=CTTransformerInit(model_path, thread_num);
+// 鍏朵腑锛歮odel_path 鍖呭惈"model-dir"銆�"quantize"锛宼hread_num涓簅nnx绾跨▼鏁帮紱
+FUNASR_RESULT result=CTTransformerInfer(punc_hanlde, txt_str.c_str(), RASR_NONE, NULL);
+// 鍏朵腑锛歱unc_hanlde涓篊TTransformerInit杩斿洖鍊硷紝txt_str涓烘枃鏈�
+```
+浣跨敤绀轰緥璇﹁锛歨ttps://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/onnxruntime/bin/funasr-onnx-offline-punc.cpp
diff --git a/funasr/runtime/docs/SDK_advanced_guide_offline_zh.md b/funasr/runtime/docs/SDK_advanced_guide_offline_zh.md
index 09f4cdc..c5b4563 100644
--- a/funasr/runtime/docs/SDK_advanced_guide_offline_zh.md
+++ b/funasr/runtime/docs/SDK_advanced_guide_offline_zh.md
@@ -26,7 +26,7 @@
   registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.2.2
 mkdir -p ./funasr-runtime-resources/models
 sudo docker run -p 10095:10095 -it --privileged=true \
-  -v ./funasr-runtime-resources/models:/workspace/models \
+  -v $PWD/funasr-runtime-resources/models:/workspace/models \
   registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.2.2
 ```
 濡傛灉鎮ㄦ病鏈夊畨瑁卍ocker锛屽彲鍙傝�僛Docker瀹夎](#Docker瀹夎)
diff --git a/funasr/runtime/docs/SDK_advanced_guide_online.md b/funasr/runtime/docs/SDK_advanced_guide_online.md
index 204e544..4298bb8 100644
--- a/funasr/runtime/docs/SDK_advanced_guide_online.md
+++ b/funasr/runtime/docs/SDK_advanced_guide_online.md
@@ -10,7 +10,7 @@
 ```shell
 sudo docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.2
 mkdir -p ./funasr-runtime-resources/models
-sudo docker run -p 10095:10095 -it --privileged=true -v ./funasr-runtime-resources/models:/workspace/models registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.2
+sudo docker run -p 10095:10095 -it --privileged=true -v $PWD/funasr-runtime-resources/models:/workspace/models registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.2
 ```
 If you do not have Docker installed, please refer to [Docker Installation](https://alibaba-damo-academy.github.io/FunASR/en/installation/docker.html)
 
diff --git a/funasr/runtime/docs/SDK_advanced_guide_online_zh.md b/funasr/runtime/docs/SDK_advanced_guide_online_zh.md
index 52f325f..bb68371 100644
--- a/funasr/runtime/docs/SDK_advanced_guide_online_zh.md
+++ b/funasr/runtime/docs/SDK_advanced_guide_online_zh.md
@@ -15,7 +15,7 @@
   registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.2
 mkdir -p ./funasr-runtime-resources/models
 sudo docker run -p 10095:10095 -it --privileged=true \
-  -v ./funasr-runtime-resources/models:/workspace/models \
+  -v $PWD/funasr-runtime-resources/models:/workspace/models \
   registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.2
 ```
 濡傛灉鎮ㄦ病鏈夊畨瑁卍ocker锛屽彲鍙傝�僛Docker瀹夎](https://alibaba-damo-academy.github.io/FunASR/en/installation/docker_zh.html)
diff --git a/funasr/runtime/docs/SDK_tutorial_en.md b/funasr/runtime/docs/SDK_tutorial_en.md
new file mode 100644
index 0000000..be47332
--- /dev/null
+++ b/funasr/runtime/docs/SDK_tutorial_en.md
@@ -0,0 +1,198 @@
+([绠�浣撲腑鏂嘳(./SDK_tutorial_en_zh.md)|English)
+
+# Highlights
+**FunASR offline file transcription service 1.0 has been released. Feel free to deploy and experience it!**
+
+# FunASR Offline File Transcription Service
+
+FunASR provides an offline file transcription service that can be easily deployed on a local or cloud server. The core is the FunASR open-source runtime-SDK. It integrates various capabilities such as speech endpoint detection (VAD) and Paraformer-large speech recognition (ASR) and punctuation restoration (PUNC) released by the speech laboratory of the Damo Academy in the Modelscope community. It has a complete speech recognition chain and can recognize audio or video of tens of hours into punctuated text. Moreover, it supports transcription for hundreds of simultaneous requests.
+
+## Server Configuration
+
+Users can choose appropriate server configurations based on their business needs. The recommended configurations are:
+- Configuration 1: (X86, computing-type) 4-core vCPU, 8GB memory, and a single machine can support about 32 requests.
+- Configuration 2: (X86, computing-type) 16-core vCPU, 32GB memory, and a single machine can support about 64 requests.
+- Configuration 3: (X86, computing-type) 64-core vCPU, 128GB memory, and a single machine can support about 200 requests. 
+
+Detailed performance [report](./benchmark_onnx_cpp.md)
+
+Cloud service providers offer a 3-month free trial for new users. Application tutorial ([docs](./aliyun_server_tutorial.md)).
+
+## Quick Start
+
+### Server Startup
+
+`Note`: The one-click deployment tool process includes installing Docker, downloading Docker images, and starting the service. If the user wants to start from the FunASR Docker image, please refer to the development guide ([docs](./SDK_advanced_guide_offline.md).
+
+Download the deployment tool `funasr-runtime-deploy-offline-cpu-en.sh`
+
+```shell
+curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-en.sh;
+# If there is a network problem, users in mainland China can use the following command:
+# curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-offline-cpu-en.sh;
+```
+
+Execute the deployment tool and press the Enter key at the prompt to complete the installation and deployment of the server. Currently, the convenient deployment tool only supports Linux environments. For other environments, please refer to the development guide ([docs](./SDK_advanced_guide_offline_en.md)).
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh install --workspace /root/funasr-runtime-resources
+```
+
+### Client Testing and Usage
+
+After running the above installation instructions, the client testing tool directory samples will be downloaded in the default installation directory /root/funasr-runtime-resources ([download click](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/sample/funasr_samples.tar.gz)).
+We take the Python language client as an example to explain that it supports multiple audio format inputs (such as .wav, .pcm, .mp3, etc.), video inputs (.mp4, etc.), and multiple file list wav.scp inputs. For other client versions, please refer to the [documentation](#Detailed-Description-of-Client-Usage).
+
+```shell
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav"
+```
+
+## Detailed Description of Client Usage
+
+After completing the FunASR runtime-SDK service deployment on the server, you can test and use the offline file transcription service through the following steps. Currently, the following programming language client versions are supported:
+
+- [Python](#python-client)
+- [CPP](#cpp-client)
+- [html](#html-client)
+- [java](#java-client)
+
+For more client version support, please refer to the [development guide](./SDK_advanced_guide_offline_zh.md).
+
+### python-client
+If you want to run the client directly for testing, you can refer to the following simple instructions, using the Python version as an example:
+
+```shell
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav"
+```
+
+Command parameter instructions:
+```text
+--host is the IP address of the FunASR runtime-SDK service deployment machine, which defaults to the local IP address (127.0.0.1). If the client and the service are not on the same server, it needs to be changed to the deployment machine IP address.
+--port 10095 deployment port number
+--mode offline represents offline file transcription
+--audio_in is the audio file that needs to be transcribed, supporting file paths and file list wav.scp
+--thread_num sets the number of concurrent sending threads, default is 1
+--ssl sets whether to enable SSL certificate verification, default is 1 to enable, and 0 to disable
+--hotword If am is hotword model, setting hotword: *.txt(one hotword perline) or hotwords seperate by space (could be: 闃块噷宸村反 杈炬懇闄�)
+--use_itn: whether to use itn, the default value is 1 for enabling and 0 for disabling.
+```
+
+### cpp-client
+
+After entering the samples/cpp directory, you can test it with CPP. The command is as follows:
+```shell
+./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav
+```
+
+Command parameter description:
+```text
+--server-ip specifies the IP address of the machine where the FunASR runtime-SDK service is deployed. The default value is the local IP address (127.0.0.1). If the client and the service are not on the same server, the IP address needs to be changed to the IP address of the deployment machine.
+--port specifies the deployment port number as 10095.
+--wav-path specifies the audio file to be transcribed, and supports file paths.
+--thread_num sets the number of concurrent send threads, with a default value of 1.
+--ssl sets whether to enable SSL certificate verification, with a default value of 1 for enabling and 0 for disabling.
+--hotword If am is hotword model, setting hotword: *.txt(one hotword perline) or hotwords seperate by space (could be: 闃块噷宸村反 杈炬懇闄�)
+--use-itn: whether to use itn, the default value is 1 for enabling and 0 for disabling.
+```
+
+### html-client
+
+To experience it directly, open `html/static/index.html` in your browser. You will see the following page, which supports microphone input and file upload.
+<img src="images/html.png"  width="900"/>
+
+### java-client
+
+```shell
+FunasrWsClient --host localhost --port 10095 --audio_in ./asr_example.wav --mode offline
+```
+For more details, please refer to the [docs](../java/readme.md)
+
+## Server Usage Details
+
+### Start the deployed FunASR service
+
+If you have restarted the computer or shut down Docker after one-click deployment, you can start the FunASR service directly with the following command. The startup configuration is the same as the last one-click deployment.
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh start
+```
+
+### Stop the FunASR service
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh stop
+```
+
+### Release the FunASR service
+
+Release the deployed FunASR service.
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh remove
+```
+
+### Restart the FunASR service
+
+Restart the FunASR service with the same configuration as the last one-click deployment.
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh restart
+```
+
+### Replace the model and restart the FunASR service
+
+Replace the currently used model, and restart the FunASR service. The model must be an ASR/VAD/PUNC model in ModelScope, or a finetuned model from ModelScope.
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--asr_model | --vad_model | --punc_model] <model_id or local model path>
+
+e.g
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --asr_model damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
+```
+
+### Update parameters and restart the FunASR service
+
+Update the configured parameters and restart the FunASR service to take effect. The parameters that can be updated include the host and Docker port numbers, as well as the number of inference and IO threads.
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--host_port | --docker_port] <port number>
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--decode_thread_num | --io_thread_num] <the number of threads>
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--workspace] <workspace in local>
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--ssl] <0: close SSL; 1: open SSL, default:1>
+
+e.g
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --decode_thread_num 32
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --workspace /root/funasr-runtime-resources
+```
+
+### Set SSL
+
+SSL verification is enabled by default. If you need to disable it, you can set it when starting.
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --ssl 0
+```
+
+
+
+## Contact Us
+
+If you encounter any problems during use, please join our user group for feedback.
+
+
+|                                DingDing Group                                |                             Wechat                             |
+|:----------------------------------------------------------------------------:|:--------------------------------------------------------------:|
+| <div align="left"><img src="../../../docs/images/dingding.jpg" width="250"/> | <img src="../../../docs/images/wechat.png" width="232"/></div> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/funasr/runtime/docs/SDK_tutorial_en_zh.md b/funasr/runtime/docs/SDK_tutorial_en_zh.md
new file mode 100644
index 0000000..015036a
--- /dev/null
+++ b/funasr/runtime/docs/SDK_tutorial_en_zh.md
@@ -0,0 +1,204 @@
+(绠�浣撲腑鏂噟[English](./SDK_tutorial_en.md))
+
+
+# FunASR鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟渚挎嵎閮ㄧ讲鏁欑▼
+FunASR鎻愪緵鍙究鎹锋湰鍦版垨鑰呬簯绔湇鍔″櫒閮ㄧ讲鐨勭绾挎枃浠惰浆鍐欐湇鍔★紝鍐呮牳涓篎unASR宸插紑婧恟untime-SDK銆�
+闆嗘垚浜嗚揪鎽╅櫌璇煶瀹為獙瀹ゅ湪Modelscope绀惧尯寮�婧愮殑璇煶绔偣妫�娴�(VAD)銆丳araformer-large璇煶璇嗗埆(ASR)銆佹爣鐐规仮澶�(PUNC) 绛夌浉鍏宠兘鍔涳紝鎷ユ湁瀹屾暣鐨勮闊宠瘑鍒摼璺紝鍙互灏嗗嚑鍗佷釜灏忔椂鐨勯煶棰戞垨瑙嗛璇嗗埆鎴愬甫鏍囩偣鐨勬枃瀛楋紝鑰屼笖鏀寔涓婄櫨璺姹傚悓鏃惰繘琛岃浆鍐欍��
+
+# 鍙戝竷鏃ュ織
+**FunASR鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟1.0宸插彂甯冿紝娆㈣繋閮ㄧ讲浣撻獙[蹇�熶笂鎵媇(#蹇�熶笂鎵�)**
+
+## 鏈嶅姟鍣ㄩ厤缃�
+
+鐢ㄦ埛鍙互鏍规嵁鑷繁鐨勪笟鍔¢渶姹傦紝閫夋嫨鍚堥�傜殑鏈嶅姟鍣ㄩ厤缃紝鎺ㄨ崘閰嶇疆涓猴細
+- 閰嶇疆1: 锛圶86锛岃绠楀瀷锛夛紝4鏍竩CPU锛屽唴瀛�8G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�32璺殑璇锋眰
+- 閰嶇疆2: 锛圶86锛岃绠楀瀷锛夛紝16鏍竩CPU锛屽唴瀛�32G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�64璺殑璇锋眰
+- 閰嶇疆3: 锛圶86锛岃绠楀瀷锛夛紝64鏍竩CPU锛屽唴瀛�128G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�200璺殑璇锋眰
+
+璇︾粏鎬ц兘娴嬭瘯鎶ュ憡锛圼鐐瑰嚮姝ゅ](./benchmark_onnx_cpp.md)锛�
+
+浜戞湇鍔″巶鍟嗭紝閽堝鏂扮敤鎴凤紝鏈�3涓湀鍏嶈垂璇曠敤娲诲姩锛岀敵璇锋暀绋嬶紙[鐐瑰嚮姝ゅ](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/docs/aliyun_server_tutorial.md)锛�
+
+## 蹇�熶笂鎵�
+
+### 鏈嶅姟绔惎鍔�
+
+`娉ㄦ剰`锛氫竴閿儴缃插伐鍏凤紝杩囩▼鍒嗕负锛氬畨瑁卍ocker銆佷笅杞絛ocker闀滃儚銆佸惎鍔ㄦ湇鍔°�傚鏋滅敤鎴峰笇鏈涚洿鎺ヤ粠FunASR docker闀滃儚鍚姩锛屽彲浠ュ弬鑰冨紑鍙戞寚鍗楋紙[鐐瑰嚮姝ゅ](./SDK_advanced_guide_offline_en_zh.md)锛�
+
+涓嬭浇閮ㄧ讲宸ュ叿`funasr-runtime-deploy-offline-cpu-en.sh`
+
+```shell
+curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-en.sh;
+# 濡傞亣鍒扮綉缁滈棶棰橈紝涓浗澶ч檰鐢ㄦ埛锛屽彲浠ヤ娇鐢ㄤ笅闈㈢殑鍛戒护锛�
+# curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-offline-cpu-en.sh;
+```
+
+鎵ц閮ㄧ讲宸ュ叿锛屽湪鎻愮ず澶勮緭鍏ュ洖杞﹂敭鍗冲彲瀹屾垚鏈嶅姟绔畨瑁呬笌閮ㄧ讲銆傜洰鍓嶄究鎹烽儴缃插伐鍏锋殏鏃朵粎鏀寔Linux鐜锛屽叾浠栫幆澧冮儴缃插弬鑰冨紑鍙戞寚鍗楋紙[鐐瑰嚮姝ゅ](./SDK_advanced_guide_offline_zh.md)锛�
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh install --workspace ./funasr-runtime-resources
+```
+
+### 瀹㈡埛绔祴璇曚笌浣跨敤
+
+杩愯涓婇潰瀹夎鎸囦护鍚庯紝浼氬湪/root/funasr-runtime-resources锛堥粯璁ゅ畨瑁呯洰褰曪級涓笅杞藉鎴风娴嬭瘯宸ュ叿鐩綍samples锛堟墜鍔ㄤ笅杞斤紝[鐐瑰嚮姝ゅ](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/sample/funasr_samples.tar.gz)锛夛紝
+鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屾敮鎸佸绉嶉煶棰戞牸寮忚緭鍏ワ紙.wav, .pcm, .mp3绛夛級锛屼篃鏀寔瑙嗛杈撳叆(.mp4绛�)锛屼互鍙婂鏂囦欢鍒楄〃wav.scp杈撳叆锛屽叾浠栫増鏈鎴风璇峰弬鑰冩枃妗o紙[鐐瑰嚮姝ゅ](#瀹㈡埛绔敤娉曡瑙�)锛�
+
+```shell
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav"
+```
+
+## 瀹㈡埛绔敤娉曡瑙�
+
+鍦ㄦ湇鍔″櫒涓婂畬鎴怓unASR鏈嶅姟閮ㄧ讲浠ュ悗锛屽彲浠ラ�氳繃濡備笅鐨勬楠ゆ潵娴嬭瘯鍜屼娇鐢ㄧ绾挎枃浠惰浆鍐欐湇鍔°��
+鐩墠鍒嗗埆鏀寔浠ヤ笅鍑犵缂栫▼璇█瀹㈡埛绔�
+
+- [Python](#python-client)
+- [CPP](#cpp-client)
+- [html](#html-client)
+- [java](#java-client)
+
+鏇村鐗堟湰瀹㈡埛绔敮鎸佽鍙傝�僛websocket/grpc鍗忚](./websocket_protocol_zh.md)
+
+### python-client
+鑻ユ兂鐩存帴杩愯client杩涜娴嬭瘯锛屽彲鍙傝�冨涓嬬畝鏄撹鏄庯紝浠ython鐗堟湰涓轰緥锛�
+
+```shell
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav"
+```
+
+鍛戒护鍙傛暟璇存槑锛�
+```text
+--host 涓篎unASR runtime-SDK鏈嶅姟閮ㄧ讲鏈哄櫒ip锛岄粯璁や负鏈満ip锛�127.0.0.1锛夛紝濡傛灉client涓庢湇鍔′笉鍦ㄥ悓涓�鍙版湇鍔″櫒锛�
+        闇�瑕佹敼涓洪儴缃叉満鍣╥p
+--port 10095 閮ㄧ讲绔彛鍙�
+--mode offline琛ㄧず绂荤嚎鏂囦欢杞啓
+--audio_in 闇�瑕佽繘琛岃浆鍐欑殑闊抽鏂囦欢锛屾敮鎸佹枃浠惰矾寰勶紝鏂囦欢鍒楄〃wav.scp
+--thread_num 璁剧疆骞跺彂鍙戦�佺嚎绋嬫暟锛岄粯璁や负1
+--ssl 璁剧疆鏄惁寮�鍚痵sl璇佷功鏍¢獙锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+--hotword 濡傛灉妯″瀷涓虹儹璇嶆ā鍨嬶紝鍙互璁剧疆鐑瘝: *.txt(姣忚涓�涓儹璇�) 鎴栬�呯┖鏍煎垎闅旂殑鐑瘝瀛楃涓� (闃块噷宸村反 杈炬懇闄�)
+--use_itn 璁剧疆鏄惁浣跨敤itn锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+```
+
+### cpp-client
+杩涘叆samples/cpp鐩綍鍚庯紝鍙互鐢╟pp杩涜娴嬭瘯锛屾寚浠ゅ涓嬶細
+```shell
+./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav
+```
+
+鍛戒护鍙傛暟璇存槑锛�
+
+```text
+--server-ip 涓篎unASR runtime-SDK鏈嶅姟閮ㄧ讲鏈哄櫒ip锛岄粯璁や负鏈満ip锛�127.0.0.1锛夛紝濡傛灉client涓庢湇鍔′笉鍦ㄥ悓涓�鍙版湇鍔″櫒锛�
+            闇�瑕佹敼涓洪儴缃叉満鍣╥p
+--port 10095 閮ㄧ讲绔彛鍙�
+--wav-path 闇�瑕佽繘琛岃浆鍐欑殑闊抽鏂囦欢锛屾敮鎸佹枃浠惰矾寰�
+--thread_num 璁剧疆骞跺彂鍙戦�佺嚎绋嬫暟锛岄粯璁や负1
+--ssl 璁剧疆鏄惁寮�鍚痵sl璇佷功鏍¢獙锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+--hotword 濡傛灉妯″瀷涓虹儹璇嶆ā鍨嬶紝鍙互璁剧疆鐑瘝: *.txt(姣忚涓�涓儹璇�) 鎴栬�呯┖鏍煎垎闅旂殑鐑瘝瀛楃涓� (闃块噷宸村反 杈炬懇闄�)
+--use-itn 璁剧疆鏄惁浣跨敤itn锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
+```
+
+### html-client
+
+鍦ㄦ祻瑙堝櫒涓墦寮� html/static/index.html锛屽嵆鍙嚭鐜板涓嬮〉闈紝鏀寔楹﹀厠椋庤緭鍏ヤ笌鏂囦欢涓婁紶锛岀洿鎺ヨ繘琛屼綋楠�
+
+<img src="images/html.png"  width="900"/>
+
+### java-client
+
+```shell
+FunasrWsClient --host localhost --port 10095 --audio_in ./asr_example.wav --mode offline
+```
+璇︾粏鍙互鍙傝�冩枃妗o紙[鐐瑰嚮姝ゅ](../java/readme.md)锛�
+
+## 鏈嶅姟绔敤娉曡瑙�
+
+### 鍚姩宸茬粡閮ㄧ讲杩囩殑FunASR鏈嶅姟
+涓�閿儴缃插悗鑻ュ嚭鐜伴噸鍚數鑴戠瓑鍏抽棴Docker鐨勫姩浣滐紝鍙�氳繃濡備笅鍛戒护鐩存帴鍚姩FunASR鏈嶅姟锛屽惎鍔ㄩ厤缃负涓婃涓�閿儴缃茬殑璁剧疆銆�
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh start
+```
+
+### 鍏抽棴FunASR鏈嶅姟
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh stop
+```
+
+### 閲婃斁FunASR鏈嶅姟
+
+閲婃斁宸茬粡閮ㄧ讲鐨凢unASR鏈嶅姟銆�
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh remove
+```
+
+### 閲嶅惎FunASR鏈嶅姟
+
+鏍规嵁涓婃涓�閿儴缃茬殑璁剧疆閲嶅惎鍚姩FunASR鏈嶅姟銆�
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh restart
+```
+
+### 鏇挎崲妯″瀷骞堕噸鍚疐unASR鏈嶅姟
+
+鏇挎崲姝e湪浣跨敤鐨勬ā鍨嬶紝骞堕噸鏂板惎鍔‵unASR鏈嶅姟銆傛ā鍨嬮渶涓篗odelScope涓殑ASR/VAD/PUNC妯″瀷锛屾垨鑰呬粠ModelScope涓ā鍨媐inetune鍚庣殑妯″瀷銆�
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--asr_model | --vad_model | --punc_model] <model_id or local model path>
+
+e.g
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --asr_model damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
+```
+
+### 鏇存柊鍙傛暟骞堕噸鍚疐unASR鏈嶅姟
+
+鏇存柊宸查厤缃弬鏁帮紝骞堕噸鏂板惎鍔‵unASR鏈嶅姟鐢熸晥銆傚彲鏇存柊鍙傛暟鍖呮嫭瀹夸富鏈哄拰Docker鐨勭鍙e彿锛屼互鍙婃帹鐞嗗拰IO鐨勭嚎绋嬫暟閲忋��
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--host_port | --docker_port] <port number>
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--decode_thread_num | --io_thread_num] <the number of threads>
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--workspace] <workspace in local>
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update [--ssl] <0: close SSL; 1: open SSL, default:1>
+
+e.g
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --decode_thread_num 32
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --workspace /root/funasr-runtime-resources
+```
+
+### 鍏抽棴SSL璇佷功
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-en.sh update --ssl 0
+```
+
+
+
+## 鑱旂郴鎴戜滑
+
+鍦ㄦ偍浣跨敤杩囩▼涓紝濡傛灉閬囧埌闂锛屾杩庡姞鍏ョ敤鎴风兢杩涜鍙嶉
+
+
+|                                    閽夐拤鐢ㄦ埛缇�                                     |                                      寰俊               |
+|:----------------------------------------------------------------------------:|:-----------------------------------------------------:|
+| <div align="left"><img src="../../../docs/images/dingding.jpg" width="250"/> | <img src="../../../docs/images/wechat.png" width="232"/></div> |
+
+
+## 瑙嗛demo
+
+[鐐瑰嚮姝ゅ]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/funasr/runtime/docs/docker_offline_cpu_en_lists b/funasr/runtime/docs/docker_offline_cpu_en_lists
new file mode 100644
index 0000000..e826c74
--- /dev/null
+++ b/funasr/runtime/docs/docker_offline_cpu_en_lists
@@ -0,0 +1,8 @@
+DOCKER:
+  funasr-runtime-sdk-en-cpu-0.1.0
+DEFAULT_ASR_MODEL:
+  damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx
+DEFAULT_VAD_MODEL:
+  damo/speech_fsmn_vad_zh-cn-16k-common-onnx
+DEFAULT_PUNC_MODEL:
+  damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx
diff --git a/funasr/runtime/onnxruntime/include/funasrruntime.h b/funasr/runtime/onnxruntime/include/funasrruntime.h
index 14f6122..3b5ae8f 100644
--- a/funasr/runtime/onnxruntime/include/funasrruntime.h
+++ b/funasr/runtime/onnxruntime/include/funasrruntime.h
@@ -18,10 +18,6 @@
 #define FUNASR_CALLBCK_PREFIX __stdcall
 #endif
 
-#ifdef __cplusplus 
-
-extern "C" {
-#endif
 
 typedef void* FUNASR_HANDLE;
 typedef void* FUNASR_RESULT;
@@ -122,7 +118,4 @@
 _FUNASRAPI void				FunTpassUninit(FUNASR_HANDLE handle);
 _FUNASRAPI void				FunTpassOnlineUninit(FUNASR_HANDLE handle);
 
-#ifdef __cplusplus 
 
-}
-#endif
diff --git a/funasr/runtime/onnxruntime/src/audio.cpp b/funasr/runtime/onnxruntime/src/audio.cpp
index d62151e..6bc6015 100644
--- a/funasr/runtime/onnxruntime/src/audio.cpp
+++ b/funasr/runtime/onnxruntime/src/audio.cpp
@@ -9,6 +9,9 @@
 #include "audio.h"
 #include "precomp.h"
 
+#ifdef _MSC_VER
+#pragma warning(disable:4996)
+#endif
 
 #if defined(__APPLE__)
 #include <string.h>
@@ -423,7 +426,7 @@
     return false;
 #else
     // from buf
-    char* buf_copy = (char *)malloc(n_file_len);
+    void* buf_copy = av_malloc(n_file_len);
     memcpy(buf_copy, buf, n_file_len);
 
     AVIOContext* avio_ctx = avio_alloc_context(
diff --git a/funasr/runtime/onnxruntime/src/commonfunc.h b/funasr/runtime/onnxruntime/src/commonfunc.h
index d7e5f13..9bd2a00 100644
--- a/funasr/runtime/onnxruntime/src/commonfunc.h
+++ b/funasr/runtime/onnxruntime/src/commonfunc.h
@@ -1,29 +1,34 @@
 #pragma once 
 #include <algorithm>
+#ifdef _WIN32
+#include <codecvt>
+#endif
 
 namespace funasr {
 typedef struct
 {
-    std::string msg="";
-    std::string stamp="";
-    std::string tpass_msg="";
-    float snippet_time=0;
+    std::string msg;
+    std::string stamp;
+    std::string tpass_msg;
+    float snippet_time;
 }FUNASR_RECOG_RESULT;
 
 typedef struct
 {
     std::vector<std::vector<int>>* segments;
-    float  snippet_time=0;
+    float  snippet_time;
 }FUNASR_VAD_RESULT;
 
 typedef struct
 {
-    string msg="";
+    string msg;
     vector<string> arr_cache;
 }FUNASR_PUNC_RESULT;
 
 #ifdef _WIN32
-#include <codecvt>
+
+#define ORTSTRING(str) StrToWstr(str)
+#define ORTCHAR(str) StrToWstr(str).c_str()
 
 inline std::wstring String2wstring(const std::string& str, const std::string& locale)
 {
@@ -39,8 +44,15 @@
 
 }
 
+#else
+
+#define ORTSTRING(str) str
+#define ORTCHAR(str) str
+
 #endif
 
+
+
 inline void GetInputName(Ort::Session* session, string& inputName,int nIndex=0) {
     size_t numInputNodes = session->GetInputCount();
     if (numInputNodes > 0) {
diff --git a/funasr/runtime/onnxruntime/src/ct-transformer-online.cpp b/funasr/runtime/onnxruntime/src/ct-transformer-online.cpp
index 51f2a6a..2198667 100644
--- a/funasr/runtime/onnxruntime/src/ct-transformer-online.cpp
+++ b/funasr/runtime/onnxruntime/src/ct-transformer-online.cpp
@@ -17,7 +17,7 @@
     session_options.DisableCpuMemArena();
 
     try{
-        m_session = std::make_unique<Ort::Session>(env_, punc_model.c_str(), session_options);
+        m_session = std::make_unique<Ort::Session>(env_, ORTSTRING(punc_model).c_str(), session_options);
         LOG(INFO) << "Successfully load model from " << punc_model;
     }
     catch (std::exception const &e) {
@@ -74,8 +74,8 @@
     for (size_t i = 0; i < InputData.size(); i += TOKEN_LEN)
     {
         nDiff = (i + TOKEN_LEN) < InputData.size() ? (0) : (i + TOKEN_LEN - InputData.size());
-        vector<int32_t> InputIDs(InputData.begin() + i, InputData.begin() + i + TOKEN_LEN - nDiff);
-        vector<string> InputStr(strOut.begin() + i, strOut.begin() + i + TOKEN_LEN - nDiff);
+        vector<int32_t> InputIDs(InputData.begin() + i, InputData.begin() + i + (TOKEN_LEN - nDiff));
+        vector<string> InputStr(strOut.begin() + i, strOut.begin() + i + (TOKEN_LEN - nDiff));
         InputIDs.insert(InputIDs.begin(), RemainIDs.begin(), RemainIDs.end()); // RemainIDs+InputIDs;
         InputStr.insert(InputStr.begin(), RemainStr.begin(), RemainStr.end()); // RemainStr+InputStr;
 
@@ -102,10 +102,10 @@
                 nSentEnd = nLastCommaIndex;
                 Punction[nSentEnd] = PERIOD_INDEX;
             }
-            RemainStr.assign(InputStr.begin() + nSentEnd + 1, InputStr.end());
-            RemainIDs.assign(InputIDs.begin() + nSentEnd + 1, InputIDs.end());
-            InputStr.assign(InputStr.begin(), InputStr.begin() + nSentEnd + 1);  // minit_sentence
-            Punction.assign(Punction.begin(), Punction.begin() + nSentEnd + 1);
+            RemainStr.assign(InputStr.begin() + (nSentEnd + 1), InputStr.end());
+            RemainIDs.assign(InputIDs.begin() + (nSentEnd + 1), InputIDs.end());
+            InputStr.assign(InputStr.begin(), InputStr.begin() + (nSentEnd + 1));  // minit_sentence
+            Punction.assign(Punction.begin(), Punction.begin() + (nSentEnd + 1));
         }
         
         for (auto& item : Punction)  
@@ -149,7 +149,7 @@
             break;
         }
     }
-    arr_cache.assign(sentence_words_list.begin() + nSentEnd + 1, sentence_words_list.end());
+    arr_cache.assign(sentence_words_list.begin() + (nSentEnd + 1), sentence_words_list.end());
 
     if (sentenceOut.size() > 0 && m_tokenizer.IsPunc(sentenceOut[sentenceOut.size() - 1]))
     {
diff --git a/funasr/runtime/onnxruntime/src/ct-transformer.cpp b/funasr/runtime/onnxruntime/src/ct-transformer.cpp
index 64a70da..71a8847 100644
--- a/funasr/runtime/onnxruntime/src/ct-transformer.cpp
+++ b/funasr/runtime/onnxruntime/src/ct-transformer.cpp
@@ -17,7 +17,7 @@
     session_options.DisableCpuMemArena();
 
     try{
-        m_session = std::make_unique<Ort::Session>(env_, punc_model.c_str(), session_options);
+        m_session = std::make_unique<Ort::Session>(env_, ORTSTRING(punc_model).c_str(), session_options);
         LOG(INFO) << "Successfully load model from " << punc_model;
     }
     catch (std::exception const &e) {
@@ -66,8 +66,8 @@
     for (size_t i = 0; i < InputData.size(); i += TOKEN_LEN)
     {
         nDiff = (i + TOKEN_LEN) < InputData.size() ? (0) : (i + TOKEN_LEN - InputData.size());
-        vector<int32_t> InputIDs(InputData.begin() + i, InputData.begin() + i + TOKEN_LEN - nDiff);
-        vector<string> InputStr(strOut.begin() + i, strOut.begin() + i + TOKEN_LEN - nDiff);
+        vector<int32_t> InputIDs(InputData.begin() + i, InputData.begin() + i + (TOKEN_LEN - nDiff));
+        vector<string> InputStr(strOut.begin() + i, strOut.begin() + i + (TOKEN_LEN - nDiff));
         InputIDs.insert(InputIDs.begin(), RemainIDs.begin(), RemainIDs.end()); // RemainIDs+InputIDs;
         InputStr.insert(InputStr.begin(), RemainStr.begin(), RemainStr.end()); // RemainStr+InputStr;
 
@@ -94,10 +94,10 @@
                 nSentEnd = nLastCommaIndex;
                 Punction[nSentEnd] = PERIOD_INDEX;
             }
-            RemainStr.assign(InputStr.begin() + nSentEnd + 1, InputStr.end());
-            RemainIDs.assign(InputIDs.begin() + nSentEnd + 1, InputIDs.end());
-            InputStr.assign(InputStr.begin(), InputStr.begin() + nSentEnd + 1);  // minit_sentence
-            Punction.assign(Punction.begin(), Punction.begin() + nSentEnd + 1);
+            RemainStr.assign(InputStr.begin() + (nSentEnd + 1), InputStr.end());
+            RemainIDs.assign(InputIDs.begin() + (nSentEnd + 1), InputIDs.end());
+            InputStr.assign(InputStr.begin(), InputStr.begin() + (nSentEnd + 1));  // minit_sentence
+            Punction.assign(Punction.begin(), Punction.begin() + (nSentEnd + 1));
         }
         
         NewPunctuation.insert(NewPunctuation.end(), Punction.begin(), Punction.end());
diff --git a/funasr/runtime/onnxruntime/src/fsmn-vad.cpp b/funasr/runtime/onnxruntime/src/fsmn-vad.cpp
index fb79ad7..db633b0 100644
--- a/funasr/runtime/onnxruntime/src/fsmn-vad.cpp
+++ b/funasr/runtime/onnxruntime/src/fsmn-vad.cpp
@@ -54,7 +54,7 @@
 void FsmnVad::ReadModel(const char* vad_model) {
     try {
         vad_session_ = std::make_shared<Ort::Session>(
-                env_, vad_model, session_options_);
+                env_, ORTCHAR(vad_model), session_options_);
         LOG(INFO) << "Successfully load model from " << vad_model;
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load vad onnx model: " << e.what();
diff --git a/funasr/runtime/onnxruntime/src/funasrruntime.cpp b/funasr/runtime/onnxruntime/src/funasrruntime.cpp
index 73738c7..91ef188 100644
--- a/funasr/runtime/onnxruntime/src/funasrruntime.cpp
+++ b/funasr/runtime/onnxruntime/src/funasrruntime.cpp
@@ -1,9 +1,6 @@
 #include "precomp.h"
 #include <vector>
-#ifdef __cplusplus 
 
-extern "C" {
-#endif
 
 	// APIs for Init
 	_FUNASRAPI FUNASR_HANDLE  FunASRInit(std::map<std::string, std::string>& model_path, int thread_num, ASR_TYPE type)
@@ -257,11 +254,15 @@
 		int n_total = audio.GetQueueSize();
 		float start_time = 0.0;
 		std::string cur_stamp = "[";
+		std::string lang = (offline_stream->asr_handle)->GetLang();
 		while (audio.Fetch(buff, len, flag, start_time) > 0) {
 			string msg = (offline_stream->asr_handle)->Forward(buff, len, true, hw_emb);
 			std::vector<std::string> msg_vec = funasr::split(msg, '|');
 			if(msg_vec.size()==0){
 				continue;
+			}
+			if(lang == "en-bpe" and p_result->msg != ""){
+				p_result->msg += " ";
 			}
 			p_result->msg += msg_vec[0];
 			//timestamp
@@ -282,7 +283,6 @@
 			p_result->stamp += cur_stamp + "]";
 		}
 		if(offline_stream->UsePunc()){
-			string lang = (offline_stream->asr_handle)->GetLang();
 			string punc_res = (offline_stream->punc_handle)->AddPunc((p_result->msg).c_str(), lang);
 			p_result->msg = punc_res;
 		}
@@ -338,11 +338,15 @@
 		int n_total = audio.GetQueueSize();
 		float start_time = 0.0;
 		std::string cur_stamp = "[";
+		std::string lang = (offline_stream->asr_handle)->GetLang();
 		while (audio.Fetch(buff, len, flag, start_time) > 0) {
 			string msg = (offline_stream->asr_handle)->Forward(buff, len, true, hw_emb);
 			std::vector<std::string> msg_vec = funasr::split(msg, '|');
 			if(msg_vec.size()==0){
 				continue;
+			}
+			if(lang == "en-bpe" and p_result->msg != ""){
+				p_result->msg += " ";
 			}
 			p_result->msg += msg_vec[0];
 			//timestamp
@@ -364,7 +368,6 @@
 			p_result->stamp += cur_stamp + "]";
 		}
 		if(offline_stream->UsePunc()){
-			string lang = (offline_stream->asr_handle)->GetLang();
 			string punc_res = (offline_stream->punc_handle)->AddPunc((p_result->msg).c_str(), lang);
 			p_result->msg = punc_res;
 		}
@@ -688,8 +691,4 @@
 		delete tpass_online_stream;
 	}
 
-#ifdef __cplusplus 
-
-}
-#endif
 
diff --git a/funasr/runtime/onnxruntime/src/offline-stream.cpp b/funasr/runtime/onnxruntime/src/offline-stream.cpp
index 50d0188..caea72e 100644
--- a/funasr/runtime/onnxruntime/src/offline-stream.cpp
+++ b/funasr/runtime/onnxruntime/src/offline-stream.cpp
@@ -1,5 +1,4 @@
 #include "precomp.h"
-#include <unistd.h>
 
 namespace funasr {
 OfflineStream::OfflineStream(std::map<std::string, std::string>& model_path, int thread_num)
diff --git a/funasr/runtime/onnxruntime/src/paraformer.cpp b/funasr/runtime/onnxruntime/src/paraformer.cpp
index a2dd038..5bbaeef 100644
--- a/funasr/runtime/onnxruntime/src/paraformer.cpp
+++ b/funasr/runtime/onnxruntime/src/paraformer.cpp
@@ -37,7 +37,7 @@
     session_options_.DisableCpuMemArena();
 
     try {
-        m_session_ = std::make_unique<Ort::Session>(env_, am_model.c_str(), session_options_);
+        m_session_ = std::make_unique<Ort::Session>(env_, ORTSTRING(am_model).c_str(), session_options_);
         LOG(INFO) << "Successfully load model from " << am_model;
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load am onnx model: " << e.what();
@@ -90,7 +90,7 @@
     session_options_.DisableCpuMemArena();
 
     try {
-        encoder_session_ = std::make_unique<Ort::Session>(env_, en_model.c_str(), session_options_);
+        encoder_session_ = std::make_unique<Ort::Session>(env_, ORTSTRING(en_model).c_str(), session_options_);
         LOG(INFO) << "Successfully load model from " << en_model;
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load am encoder model: " << e.what();
@@ -98,7 +98,7 @@
     }
 
     try {
-        decoder_session_ = std::make_unique<Ort::Session>(env_, de_model.c_str(), session_options_);
+        decoder_session_ = std::make_unique<Ort::Session>(env_, ORTSTRING(de_model).c_str(), session_options_);
         LOG(INFO) << "Successfully load model from " << de_model;
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load am decoder model: " << e.what();
@@ -153,7 +153,7 @@
 
     // offline
     try {
-        m_session_ = std::make_unique<Ort::Session>(env_, am_model.c_str(), session_options_);
+        m_session_ = std::make_unique<Ort::Session>(env_, ORTSTRING(am_model).c_str(), session_options_);
         LOG(INFO) << "Successfully load model from " << am_model;
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load am onnx model: " << e.what();
@@ -250,7 +250,7 @@
     hw_session_options.DisableCpuMemArena();
 
     try {
-        hw_m_session = std::make_unique<Ort::Session>(hw_env_, hw_model.c_str(), hw_session_options);
+        hw_m_session = std::make_unique<Ort::Session>(hw_env_, ORTSTRING(hw_model).c_str(), hw_session_options);
         LOG(INFO) << "Successfully load model from " << hw_model;
     } catch (std::exception const &e) {
         LOG(ERROR) << "Error when load hw compiler onnx model: " << e.what();
diff --git a/funasr/runtime/onnxruntime/src/precomp.h b/funasr/runtime/onnxruntime/src/precomp.h
index 59e594e..5c49fd6 100644
--- a/funasr/runtime/onnxruntime/src/precomp.h
+++ b/funasr/runtime/onnxruntime/src/precomp.h
@@ -17,6 +17,25 @@
 #include <numeric>
 #include <cstring>
 
+#ifdef _WIN32
+#include<io.h>
+#ifndef R_OK
+#define R_OK 4
+#endif
+#ifndef W_OK
+#define W_OK 2
+#endif
+#ifndef X_OK
+#define X_OK 0 
+#endif
+#ifndef F_OK
+#define F_OK 0
+#endif
+#define access _access
+#else
+#include <unistd.h>
+#endif
+
 using namespace std;
 // third part
 #if defined(__APPLE__)
@@ -33,6 +52,8 @@
 
 // mine
 #include <glog/logging.h>
+
+
 #include "common-struct.h"
 #include "com-define.h"
 #include "commonfunc.h"
diff --git a/funasr/runtime/onnxruntime/src/tpass-online-stream.cpp b/funasr/runtime/onnxruntime/src/tpass-online-stream.cpp
index 832cfd1..7788e0b 100644
--- a/funasr/runtime/onnxruntime/src/tpass-online-stream.cpp
+++ b/funasr/runtime/onnxruntime/src/tpass-online-stream.cpp
@@ -1,5 +1,4 @@
 #include "precomp.h"
-#include <unistd.h>
 
 namespace funasr {
 TpassOnlineStream::TpassOnlineStream(TpassStream* tpass_stream, std::vector<int> chunk_size){
diff --git a/funasr/runtime/onnxruntime/src/tpass-stream.cpp b/funasr/runtime/onnxruntime/src/tpass-stream.cpp
index 47734af..a3e1b0e 100644
--- a/funasr/runtime/onnxruntime/src/tpass-stream.cpp
+++ b/funasr/runtime/onnxruntime/src/tpass-stream.cpp
@@ -1,5 +1,4 @@
 #include "precomp.h"
-#include <unistd.h>
 
 namespace funasr {
 TpassStream::TpassStream(std::map<std::string, std::string>& model_path, int thread_num)
diff --git a/funasr/runtime/readme.md b/funasr/runtime/readme.md
index bbc96aa..1de0655 100644
--- a/funasr/runtime/readme.md
+++ b/funasr/runtime/readme.md
@@ -6,9 +6,33 @@
 
 - File transcription service, Mandarin, CPU version, done
 - The real-time transcription service, Mandarin (CPU), done
+- File transcription service, English, CPU version, done
 - File transcription service, Mandarin, GPU version, in progress
-- File transcription service, English, in progress
 - and more.
+
+## File Transcription Service, English (CPU)
+
+Currently, the FunASR runtime-SDK supports the deployment of file transcription service, English (CPU version), with a complete speech recognition chain that can transcribe tens of hours of audio into punctuated text, and supports recognition for more than a hundred concurrent streams. 
+
+To meet the needs of different users, we have prepared different tutorials with text and images for both novice and advanced developers.
+
+### Technical Principles
+
+The technical principles and documentation behind FunASR explain the underlying technology, recognition accuracy, computational efficiency, and core advantages of the framework, including convenience, high precision, high efficiency, and support for long audio chains. For detailed information, please refer to the documentation available by [docs](https://mp.weixin.qq.com/s/DHQwbgdBWcda0w_L60iUww). 
+
+### Deployment Tutorial
+
+The documentation mainly targets novice users who have no need for modifications or customization. It supports downloading model deployments from modelscope and also supports deploying models that users have fine-tuned. For detailed tutorials, please refer to [docs](docs/SDK_tutorial_en.md).
+
+### Advanced Development Guide
+
+The documentation mainly targets advanced developers who require modifications and customization of the service. It supports downloading model deployments from modelscope and also supports deploying models that users have fine-tuned. For detailed information, please refer to the documentation available by [docs](./docs/SDK_advanced_guide_offline_en.md)
+
+### latest version & image ID
+| image version                |  image ID | INFO |
+|------------------------------|-----|------|
+| funasr-runtime-sdk-en-cpu-0.1.0 |  4ce696fe9ba5   |      |
+
 
 ## The real-time transcription service, Mandarin (CPU)
 
@@ -36,13 +60,13 @@
 
 ## File Transcription Service, Mandarin (CPU)
 
-Currently, the FunASR runtime-SDK-0.0.1 version supports the deployment of file transcription service, Mandarin (CPU version), with a complete speech recognition chain that can transcribe tens of hours of audio into punctuated text, and supports recognition for more than a hundred concurrent streams. 
+Currently, the FunASR runtime-SDK supports the deployment of file transcription service, Mandarin (CPU version), with a complete speech recognition chain that can transcribe tens of hours of audio into punctuated text, and supports recognition for more than a hundred concurrent streams. 
 
 To meet the needs of different users, we have prepared different tutorials with text and images for both novice and advanced developers.
 
 ### Technical Principles
 
-The technical principles and documentation behind FunASR explain the underlying technology, recognition accuracy, computational efficiency, and core advantages of the framework, including convenience, high precision, high efficiency, and support for long audio chains. For detailed information, please refer to the documentation available by [docs](https://mp.weixin.qq.com/s?__biz=MzA3MTQ0NTUyMw==&tempkey=MTIyNF84d05USjMxSEpPdk5GZXBJUFNJNzY0bU1DTkxhV19mcWY4MTNWQTJSYXhUaFgxOWFHZTZKR0JzWC1JRmRCdUxCX2NoQXg0TzFpNmVJX2R1WjdrcC02N2FEcUc3MDhzVVhpNWQ5clU4QUdqNFdkdjFYb18xRjlZMmc5c3RDOTl0U0NiRkJLb05ZZ0RmRlVkVjFCZnpXNWFBVlRhbXVtdWs4bUMwSHZnfn4%3D&chksm=1f2c3254285bbb42bc8f76a82e9c5211518a0bb1ff8c357d085c1b78f675ef2311f3be6e282c#rd). 
+The technical principles and documentation behind FunASR explain the underlying technology, recognition accuracy, computational efficiency, and core advantages of the framework, including convenience, high precision, high efficiency, and support for long audio chains. For detailed information, please refer to the documentation available by [docs](https://mp.weixin.qq.com/s/DHQwbgdBWcda0w_L60iUww). 
 
 ### Deployment Tutorial
 
diff --git a/funasr/runtime/readme_cn.md b/funasr/runtime/readme_cn.md
index 47aee86..dbd582f 100644
--- a/funasr/runtime/readme_cn.md
+++ b/funasr/runtime/readme_cn.md
@@ -7,10 +7,34 @@
 
 - 涓枃绂荤嚎鏂囦欢杞啓鏈嶅姟锛圕PU鐗堟湰锛夛紝宸插畬鎴�
 - 涓枃娴佸紡璇煶璇嗗埆鏈嶅姟锛圕PU鐗堟湰锛夛紝宸插畬鎴�
+- 鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟锛圕PU鐗堟湰锛夛紝宸插畬鎴�
 - 涓枃绂荤嚎鏂囦欢杞啓鏈嶅姟锛圙PU鐗堟湰锛夛紝杩涜涓�
-- 鑻辨枃绂荤嚎杞啓鏈嶅姟锛岃繘琛屼腑
 - 鏇村鏀寔涓�
 
+## 鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟锛圕PU鐗堟湰锛�
+
+鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟閮ㄧ讲锛圕PU鐗堟湰锛夛紝鎷ユ湁瀹屾暣鐨勮闊宠瘑鍒摼璺紝鍙互灏嗗嚑鍗佷釜灏忔椂鐨勯暱闊抽涓庤棰戣瘑鍒垚甯︽爣鐐圭殑鏂囧瓧锛岃�屼笖鏀寔涓婄櫨璺姹傚悓鏃惰繘琛岃浆鍐欍��
+涓轰簡鏀寔涓嶅悓鐢ㄦ埛鐨勯渶姹傦紝閽堝涓嶅悓鍦烘櫙锛屽噯澶囦簡涓嶅悓鐨勫浘鏂囨暀绋嬶細
+
+### 渚挎嵎閮ㄧ讲鏁欑▼
+
+閫傜敤鍦烘櫙涓猴紝瀵规湇鍔¢儴缃睸DK鏃犱慨鏀归渶姹傦紝閮ㄧ讲妯″瀷鏉ヨ嚜浜嶮odelScope锛屾垨鑰呯敤鎴穎inetune锛岃缁嗘暀绋嬪弬鑰冿紙[鐐瑰嚮姝ゅ](./docs/SDK_tutorial_en_zh.md)锛�
+
+
+### 寮�鍙戞寚鍗�
+
+閫傜敤鍦烘櫙涓猴紝瀵规湇鍔¢儴缃睸DK鏈変慨鏀归渶姹傦紝閮ㄧ讲妯″瀷鏉ヨ嚜浜嶮odelScope锛屾垨鑰呯敤鎴穎inetune锛岃缁嗘枃妗e弬鑰冿紙[鐐瑰嚮姝ゅ](./docs/SDK_advanced_guide_offline_en_zh.md)锛�
+
+### 鎶�鏈師鐞嗘彮绉�
+
+鏂囨。浠嬬粛浜嗚儗鍚庢妧鏈師鐞嗭紝璇嗗埆鍑嗙‘鐜囷紝璁$畻鏁堢巼绛夛紝浠ュ強鏍稿績浼樺娍浠嬬粛锛氫究鎹枫�侀珮绮惧害銆侀珮鏁堢巼銆侀暱闊抽閾捐矾锛岃缁嗘枃妗e弬鑰冿紙[鐐瑰嚮姝ゅ](https://mp.weixin.qq.com/s/DHQwbgdBWcda0w_L60iUww)锛�
+
+### 鏈�鏂扮増鏈強image ID
+| image version                |  image ID | INFO |
+|------------------------------|-----|------|
+| funasr-runtime-sdk-en-cpu-0.1.0 |  4ce696fe9ba5   |      |
+
+
 ## 涓枃瀹炴椂璇煶鍚啓鏈嶅姟锛圕PU鐗堟湰锛�
 
 FunASR瀹炴椂璇煶鍚啓鏈嶅姟杞欢鍖咃紝鏃㈠彲浠ュ疄鏃跺湴杩涜璇煶杞枃瀛楋紝鑰屼笖鑳藉鍦ㄨ璇濆彞灏剧敤楂樼簿搴︾殑杞啓鏂囧瓧淇杈撳嚭锛岃緭鍑烘枃瀛楀甫鏈夋爣鐐癸紝鏀寔楂樺苟鍙戝璺姹傘��

--
Gitblit v1.9.1