add document for inference api

This commit is contained in:
Ftps
2024-03-26 23:55:57 +09:00
parent 04bdcd7591
commit 5e3dce38f4
3 changed files with 44 additions and 11 deletions

View File

@@ -120,12 +120,23 @@ poetry run poe rvc-api
```
#### Inference Audio
##### Get as blob
```sh
curl -X 'POST' \
'http://127.0.0.1:8000/inference' \
'http://127.0.0.1:8000/inference?res_type=blob' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'modelpath={model.pth}' \
-F 'input={input audio path}' \
-o {output audio path}
-F 'input={input audio path}'
```
##### Get as json(include time)
```sh
curl -X 'POST' \
'http://127.0.0.1:8000/inference?res_type=json' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'modelpath={model.pth}' \
-F 'input={input audio path}'
```

View File

@@ -120,12 +120,23 @@ poetry run poe rvc-api
```
#### Inferir audio
##### Obtener como blob
```sh
curl -X 'POST' \
'http://127.0.0.1:8000/inference' \
'http://127.0.0.1:8000/inference?res_type=blob' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'modelpath={modelo.pth}' \
-F 'input={ruta del audio de entrada}' \
-o {ruta del audio de salida}
```
-F 'modelpath={model.pth}' \
-F 'input={input audio path}'
```
##### Obtener como json(incluir tiempo)
```sh
curl -X 'POST' \
'http://127.0.0.1:8000/inference?res_type=json' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'modelpath={model.pth}' \
-F 'input={input audio path}'
```

View File

@@ -95,14 +95,25 @@ rvc-api
poetry run poe rvc-api
```
にて実行されます。
#### Inference Audio
##### blobでレスポンスを受け取る
```sh
curl -X 'POST' \
'http://127.0.0.1:8000/inference' \
'http://127.0.0.1:8000/inference?res_type=blob' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'modelpath={model.pth}' \
-F 'input={input audio path}' \
-o {output audio path}
-F 'input={input audio path}'
```
##### jsonでレスポンス(include time)
```sh
curl -X 'POST' \
'http://127.0.0.1:8000/inference?res_type=json' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'modelpath={model.pth}' \
-F 'input={input audio path}'
```