20 lines
493 B
Python
20 lines
493 B
Python
import os
|
|
import sys
|
|
import random
|
|
# Change to project directory這個是針對C#的環境
|
|
os.chdir(r"F:\GPT-SoVITS\GPT-SoVITS-v2pro-20250604")
|
|
sys.path.insert(0, os.getcwd())
|
|
|
|
now_dir = os.getcwd()
|
|
sys.path.append(now_dir)
|
|
sys.path.append("%s/GPT_SoVITS" % (now_dir))
|
|
|
|
print(f"Current directory: {now_dir}")
|
|
print(f"Python path: {sys.executable}")
|
|
|
|
from gpt_sovits_api import GPTSoVITSAPI
|
|
|
|
print("\nInitializing GPT-SoVITS API...")
|
|
api = GPTSoVITSAPI(version="v2ProPlus")
|
|
|