#!/bin/bash
# 启动 LatentSync 模型服务
# 注意: 需要根据服务器实际情况修改 Python 路径

cd "$(dirname "$0")/models/LatentSync"

# 请根据您的 Miniconda/Anaconda 安装路径修改此处
PYTHON_PATH="/home/rongye/ProgramFiles/miniconda3/envs/latentsync/bin/python"

if [ -f "$PYTHON_PATH" ]; then
    "$PYTHON_PATH" -m scripts.server
else
    echo "❌ 错误: 找不到 Python 解释器: $PYTHON_PATH"
    echo "请编辑此脚本 (run_latentsync.sh) 修改 PYTHON_PATH 为您的实际路径:"
    echo "conda activate latentsync && which python"
    exit 1
fi
