Download run_cpp_ax650.sh from HY-2012/Sortformer.AXERA: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/HY-2012/Sortformer.AXERA/resolve/main/run_cpp_ax650.sh
- Command line
-
hf download hf://HY-2012/Sortformer.AXERA/run_cpp_ax650.sh
-
curl -L -o run_cpp_ax650.sh https://huggingface.co/HY-2012/Sortformer.AXERA/resolve/main/run_cpp_ax650.sh
707 Bytes
| # Sortformer 一键说话人日志 (C++, 预编译可执行文件) | |
| # 用法: ./run_cpp_ax650.sh [input.wav] [output.rttm] [--fast] | |
| set -euo pipefail | |
| cd "$(dirname "$0")" | |
| export LD_LIBRARY_PATH=/soc/lib:${LD_LIBRARY_PATH:-} | |
| WAV="${1:-samples/sample_meeting.wav}" | |
| RTTM="${2:-$(basename "${WAV%.*}").rttm}" | |
| FAST=0 | |
| for arg in "$@"; do | |
| [[ "$arg" == "--fast" ]] && FAST=1 | |
| done | |
| if [[ "$FAST" == "1" ]]; then | |
| ENCODER=models/encoder_fifo40.axmodel | |
| EXTRA="--fifo-len 40 --spkcache-update-period 31" | |
| else | |
| ENCODER=models/encoder.axmodel | |
| EXTRA="" | |
| fi | |
| ./bin/sortformer_ax650 \ | |
| --preencode models/preencode.axmodel --encoder "$ENCODER" \ | |
| --wav "$WAV" --rttm "$RTTM" --threads 8 $EXTRA | |