# shellcheck shell=dash

___x_cmd_whisper_model_import(){
    local model_path="$1"
    local model_name="$2"

    [ -f "$model_path" ] || N=whisper M="Model [file=$model_path] not found" log:ret:1
    [ -n "$model_name" ] || N=whisper M="model name is required" log:ret:64

    local tarfp="$___X_CMD_ROOT_DATA/model/${model_name}.bin"
    ___x_cmd ensurefp "$tarfp"

    whisper:info "Placing the model [file=$model_path] into $___X_CMD_ROOT_DATA/model/${model_name}.bin"
    ___x_cmd_cmds cp "$model_path" "$tarfp"
}
