service-api.md
552 Bytes
ACR Service API
Endpoints
GET /health
返回服务健康状态。
POST /recognize
请求体:
{
"query_path": "data/synthetic_v2/segments/song_0021_seg_01_augmented.wav",
"data_dir": "data/synthetic_v2",
"model_path": "data/models_v3/best_model.pt",
"index_prefix": "data/index_v3/reference",
"top_n": 5,
"device": "cpu"
}
POST /index/build
请求体:
{
"data_dir": "data/synthetic_v2",
"model_path": "data/models_v3/best_model.pt",
"output_dir": "data/index_v3",
"device": "cpu"
}