add document for inference api
This commit is contained in:
17
README.md
17
README.md
@@ -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}'
|
||||
```
|
||||
|
||||
@@ -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}'
|
||||
```
|
||||
|
||||
@@ -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}'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user