mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-09 00:10:00 +08:00
Make API Great Again
This commit is contained in:
parent
4e43f6097f
commit
a1de2d9987
136
README.md
136
README.md
@ -178,6 +178,142 @@ Example:
|
||||
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
|
||||
```
|
||||
|
||||
## Main Branch API Usage Guide
|
||||
|
||||
```bash
|
||||
python api.py -dr "123.wav" -dt "one two three." -dl "en"
|
||||
```
|
||||
|
||||
### Execution Parameters
|
||||
|
||||
Required parameters:
|
||||
- `-s` - Path to the SoVITS model, which can be specified in `config.py`.
|
||||
- `-g` - GPath to the GPT model, which can be specified in `config.py`.
|
||||
|
||||
Used when the request lacks reference audio:
|
||||
- `-dr` - Default reference audio path, used when no reference audio is provided in the request.
|
||||
- `-dt` - Text corresponding to the default reference audio.
|
||||
- `-dl` - Language of the default reference audio, options include "all_zh", "en", "all_ja", "zh",, "ja".
|
||||
|
||||
Optional parameters:
|
||||
- `-d` - Inference device, options include "cuda", "cpu".
|
||||
- `-a` - Binding address, default is "127.0.0.1".
|
||||
- `-p` - Binding port, default is 9880, which can be specified in `config.py`.
|
||||
- `-fp` - Use full precision to override the settings in `config.py`.
|
||||
- `-hp` - Use half precision to override the settings in `config.py`.
|
||||
- `-sm` - Streaming return mode, not enabled by default, options include "close", "c", "normal", "n".
|
||||
- `-mt` - The audio encoding format of the return, default is ogg for streaming and wav for non-streaming, options include "wav", "ogg", "aac".
|
||||
- `-cp` - Text segmentation symbol setting, default is empty, entered as a string such as ",.!?".
|
||||
|
||||
- `-hb` - Path to cnhubert model.
|
||||
- `-b` - Path to bert model.
|
||||
|
||||
### Inference
|
||||
|
||||
#### Endpoint: `/`
|
||||
|
||||
Inference using the reference audio and text segmentation symbol specified in the execution parameters. Can use GET or POST methods:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?text=The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival. &text_language=en
|
||||
`
|
||||
|
||||
POST:
|
||||
```json
|
||||
{
|
||||
"text": "The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.",
|
||||
"text_language": "en"
|
||||
}
|
||||
```
|
||||
|
||||
Use the reference audio specified in the execution parameters and set the segmentation symbol. Can use GET or POST methods:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?text=The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.&text_language=en&cut_punc=,.
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"text": "The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.",
|
||||
"text_language": "en",
|
||||
"cut_punc": ",."
|
||||
}
|
||||
```
|
||||
|
||||
Manually specify the reference audio used for this inference. Can use GET or POST methods:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?refer_wav_path=Genshin.wav&prompt_text=I like playing Genshin Impact.&prompt_language=en&text=The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.&text_language=en&cut_punc=,.
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "Genshin.wav",
|
||||
"prompt_text": "I like playing Genshin Impact.",
|
||||
"prompt_language": "en",
|
||||
"text": "The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.",
|
||||
"text_language": "en",
|
||||
"cut_punc": ",."
|
||||
}
|
||||
```
|
||||
|
||||
On success, returns the wav audio stream directly with HTTP status code 200. On failure, returns a JSON containing the error message with HTTP status code 400.
|
||||
|
||||
### Change Default Reference Audio
|
||||
|
||||
#### Endpoint: `/change_refer`
|
||||
|
||||
Manually change the default reference audio used. Can use GET or POST methods:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/change_refer?refer_wav_path=Genshin.wav&prompt_text=I like playing Genshin Impact.&prompt_language=en`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "Genshin.wav",
|
||||
"prompt_text": "I like playing Genshin Impact.",
|
||||
"prompt_language": "en"
|
||||
}
|
||||
```
|
||||
|
||||
On success, returns JSON with HTTP status code 200. On failure, returns JSON with HTTP status code 400.
|
||||
|
||||
### Command Control
|
||||
|
||||
#### Endpoint: `/control`
|
||||
|
||||
Commands include: "restart" (to restart the operation) and "exit" (to end the operation). Can use GET or POST methods:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/control?command=restart
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "restart"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Todo List
|
||||
|
||||
- [ ] **High Priority:**
|
||||
|
@ -176,6 +176,140 @@ vocal_path|speaker_name|language|text
|
||||
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
|
||||
```
|
||||
|
||||
## 主分支 API 使用指南
|
||||
|
||||
```bash
|
||||
python api.py -dr "123.wav" -dt "一二三。" -dl "zh"
|
||||
```
|
||||
|
||||
### 执行参数
|
||||
|
||||
必要参数:
|
||||
- `-s` - SoVITS模型路径,可以在`config.py`中指定。
|
||||
- `-g` - GPT模型路径,可以在`config.py`中指定。
|
||||
|
||||
调用请求缺少参考音频时使用:
|
||||
- `-dr` - 默认参考音频路径,当请求中未提供参考音频时使用。
|
||||
- `-dt` - 默认参考音频对应的文本。
|
||||
- `-dl` - 默认参考音频的语言,选项包括"all_zh"、"en"、"all_ja","zh"、"ja"。
|
||||
|
||||
可选参数:
|
||||
- `-d` - 推理设备,选项包括"cuda"、"cpu"。
|
||||
- `-a` - 绑定地址,默认为"127.0.0.1"。
|
||||
- `-p` - 绑定端口,默认为9880,可以在`config.py`中指定。
|
||||
- `-fp` - 使用全精度覆盖`config.py`的设置。
|
||||
- `-hp` - 使用半精度覆盖`config.py`的设置。
|
||||
- `-sm` - 流式返回模式,默认不启用,选项包括"close"、"c"、"normal"、"n"、"keepalive"、"k"。
|
||||
- `-mt` - 返回的音频编码格式,流式默认为ogg,非流式默认为wav,选项包括"wav"、"ogg"、"aac"。
|
||||
- `-cp` - 文本切分符号设置,默认为空,以",。?!"字符串的方式传入。
|
||||
|
||||
- `-hb` - cnhubert路径。
|
||||
- `-b` - bert路径。
|
||||
|
||||
### 推理
|
||||
|
||||
#### 端点: `/`
|
||||
|
||||
使用执行参数指定的参考音频和切分符号进行推理。可使用GET或POST方法:
|
||||
|
||||
GET:
|
||||
`
|
||||
http://127.0.0.1:9880?text=先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。&text_language=zh
|
||||
`
|
||||
|
||||
POST:
|
||||
```json
|
||||
{
|
||||
"text": "先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。",
|
||||
"text_language": "zh"
|
||||
}
|
||||
```
|
||||
|
||||
使用执行参数指定的参考音频并设置分割符号。可使用GET或POST方法:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?text=先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。&text_language=zh&cut_punc=,。
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"text": "先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。",
|
||||
"text_language": "zh",
|
||||
"cut_punc": ",。"
|
||||
}
|
||||
```
|
||||
|
||||
手动指定当次推理所使用的参考音频。可使用GET或POST方法:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?refer_wav_path=123.wav&prompt_text=一二三。&prompt_language=zh&text=先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。&text_language=zh&cut_punc=,。
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "三国杀.wav",
|
||||
"prompt_text": "这就是玩三国杀,带给我的自信。",
|
||||
"prompt_language": "zh",
|
||||
"text": "先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。",
|
||||
"text_language": "zh",
|
||||
"cut_punc": ",。"
|
||||
}
|
||||
```
|
||||
|
||||
成功时,直接返回wav音频流,HTTP状态码为200。失败时,返回包含错误信息的JSON,HTTP状态码为400。
|
||||
|
||||
### 更换默认参考音频
|
||||
|
||||
#### 端点: `/change_refer`
|
||||
|
||||
手动更换所使用的默认参考音频。可使用GET或POST方法:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/change_refer?refer_wav_path=三国杀.wav&prompt_text=这就是玩三国杀,带给我的自信。&prompt_language=zh`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "三国杀.wav",
|
||||
"prompt_text": "这就是玩三国杀,带给我的自信。",
|
||||
"prompt_language": "zh"
|
||||
}
|
||||
```
|
||||
|
||||
成功时,返回JSON,HTTP状态码为200。失败时,返回JSON,HTTP状态码为400。
|
||||
|
||||
### 命令控制
|
||||
|
||||
#### 端点: `/control`
|
||||
|
||||
命令包括:"restart"(重新运行)和"exit"(结束运行)。可使用GET或POST方法:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/control?command=restart`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "restart"
|
||||
}
|
||||
```
|
||||
|
||||
## 待办事项清单
|
||||
|
||||
- [ ] **高优先级:**
|
||||
|
@ -154,12 +154,148 @@ vocal_path|speaker_name|language|text
|
||||
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
|
||||
```
|
||||
|
||||
## メインブランチ API 使用ガイド
|
||||
|
||||
```bash
|
||||
python api.py -dr "123.wav" -dt "一二三。" -dl "all_ja"
|
||||
```
|
||||
|
||||
### 実行パラメータ
|
||||
|
||||
必須パラメータ:
|
||||
- `-s` - SoVITSモデルのパス。`config.py`で指定できます。
|
||||
- `-g` - GPTモデルのパス。`config.py`で指定できます。
|
||||
|
||||
参照音声がリクエストに含まれていない場合に使用:
|
||||
- `-dr` - デフォルトの参照音声パス。リクエストに参照音声が提供されていない場合に使用します。
|
||||
- `-dt` - デフォルト参照音声に対応するテキスト。
|
||||
- `-dl` - デフォルト参照音声の言語。選択肢には"all_zh"、"en"、"all_ja"、"zh"、"ja"が含まれます。
|
||||
|
||||
オプションパラメータ:
|
||||
- `-d` - 推論デバイス。選択肢には"cuda"、"cpu"が含まれます。
|
||||
- `-a` - バインドアドレス。デフォルトは"127.0.0.1"。
|
||||
- `-p` - バインドポート。デフォルトは9880で、`config.py`で指定できます。
|
||||
- `-fp` - `config.py`の設定を上書きして全精度を使用。
|
||||
- `-hp` - `config.py`の設定を上書きして半精度を使用。
|
||||
- `-sm` - ストリーミング返信モード。デフォルトでは無効で、選択肢には"close"、"c"、"normal"、"n"、"keepalive"、"k"が含まれます。
|
||||
- `-mt` - 返信の音声エンコード形式。ストリーミングではデフォルトでogg、非ストリーミングではデフォルトでwav、選択肢には"wav"、"ogg"、"aac"が含まれます。
|
||||
- `-cp` - テキスト分割記号設定。デフォルトでは空で、",。?!"の文字列として入力します。
|
||||
|
||||
- `-hb` - cnhubertのパス。
|
||||
- `-b` - bertのパス。
|
||||
|
||||
### 推論
|
||||
|
||||
#### エンドポイント: `/`
|
||||
|
||||
指定された実行パラメータや参照音声、区切り記号を使用して推論を行います。GETまたはPOSTメソッドを使用できます:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?text=先帝が創業の途中で急逝し、今や世界は三分され、益州は疲弊しています。これは真に危機的な存亡の秋です。&text_language=all_ja
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"text": "先帝が創業の途中で急逝し、今や世界は三分され、益州は疲弊しています。これは真に危機的な存亡の秋です。",
|
||||
"text_language": "all_ja"
|
||||
}
|
||||
```
|
||||
|
||||
実行パラメータで指定された参照音声を使用し、分割記号を設定して推論を行います。GETまたはPOSTメソッドを使用できます:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?text=先帝が創業の途中で急逝し、今や世界は三分され、益州は疲弊しています。これは真に危機的な存亡の秋です。&text_language=all_ja&cut_punc=,。
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"text":"先帝が創業の途中で急逝し、今や世界は三分され、益州は疲弊しています。これは真に危機的な存亡の秋です。",
|
||||
"text_language": "all_ja",
|
||||
"cut_punc": ",。"
|
||||
}
|
||||
```
|
||||
|
||||
この推論に使用する参照音声を手動で指定します。GETまたはPOSTメソッドを使用できます:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?refer_wav_path=123.wav&prompt_text=一二三。&prompt_language=all_ja&text=先帝が創業の途中で急逝し、今や世界は三分され、益州は疲弊しています。これは真に危機的な存亡の秋です。&text_language=all_ja&cut_punc=,。
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "まつお ばしょう.wav",
|
||||
"prompt_text": "月日は百代の過客にして、行きかふ年も又旅人也。",
|
||||
"prompt_language": "all_ja",
|
||||
"text": "先帝が創業の途中で急逝し、今や世界は三分され、益州は疲弊しています。これは真に危機的な存亡の秋です。",
|
||||
"text_language": "all_ja",
|
||||
"cut_punc": ",。"
|
||||
}
|
||||
```
|
||||
|
||||
成功時、直接wav音声ストリームを返し、HTTPステータスコードは 200 です。失敗時、エラーメッセージを含むJSONを返し、HTTPステータスコードは 400 です。
|
||||
|
||||
### デフォルト参照音声の変更
|
||||
|
||||
#### エンドポイント: `/change_refer`
|
||||
|
||||
使用するデフォルトの参照音声を手動で変更します。GETまたはPOSTメソッドを使用できます:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/change_refer?refer_wav_path=まつお ばしょう.wav&prompt_text=月日は百代の過客にして、行きかふ年も又旅人也。&prompt_language=all_ja`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "まつお ばしょう.wav",
|
||||
"prompt_text": "月日は百代の過客にして、行きかふ年も又旅人也。",
|
||||
"prompt_language": "all_ja"
|
||||
}
|
||||
```
|
||||
|
||||
成功時、JSONを返し、HTTPステータスコードは 200 です。失敗時、JSONを返し、HTTPステータスコードは 400 です。
|
||||
|
||||
### コマンド制御
|
||||
|
||||
#### エンドポイント: `/control`
|
||||
|
||||
コマンドには、「restart」(再起動)と「exit」(終了)が含まれます。GETまたはPOSTメソッドを使用できます:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/control?command=restart`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "restart"
|
||||
}
|
||||
```
|
||||
|
||||
## Todo リスト
|
||||
|
||||
- [ ] **優先度 高:**
|
||||
|
||||
- [x] 日本語と英語でのローカライズ。
|
||||
- [] ユーザーガイド。
|
||||
- [ ] ユーザーガイド。
|
||||
- [x] 日本語データセットと英語データセットのファインチューニングトレーニング。
|
||||
|
||||
- [ ] **機能:**
|
||||
|
@ -157,6 +157,141 @@ vocal_path|speaker_name|language|text
|
||||
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
|
||||
```
|
||||
|
||||
## 메인 브랜치 API 사용 가이드
|
||||
|
||||
```bash
|
||||
python api.py -dr "123.wav" -dt "one two three" -dl "en"
|
||||
```
|
||||
|
||||
### 실행 매개변수
|
||||
|
||||
필수 매개변수:
|
||||
- `-s` - SoVITS 모델 경로, `config.py`에서 지정할 수 있습니다.
|
||||
- `-g` - GPT 모델 경로, `config.py`에서 지정할 수 있습니다.
|
||||
|
||||
요청에 참조 오디오가 누락될 경우 사용:
|
||||
- `-dr` - 기본 참조 오디오 경로, 요청에 참조 오디오가 제공되지 않을 때 사용합니다.
|
||||
- `-dt` - 기본 참조 오디오에 해당하는 텍스트.
|
||||
- `-dl` - 기본 참조 오디오의 언어, 옵션은 "all_zh", "en", "all_ja", "zh", "ja"를 포함합니다.
|
||||
|
||||
선택적 매개변수:
|
||||
- `-d` - 추론 장치, 옵션에는 "cuda", "cpu"가 있습니다.
|
||||
- `-a` - 바인딩 주소, 기본값은 "127.0.0.1"입니다.
|
||||
- `-p` - 바인딩 포트, 기본값은 9880이며, `config.py`에서 지정할 수 있습니다.
|
||||
- `-fp` - `config.py`의 설정을 덮어쓰고 전체 정밀도를 사용합니다.
|
||||
- `-hp` - `config.py`의 설정을 덮어쓰고 반정밀도를 사용합니다.
|
||||
- `-sm` - 스트리밍 반환 모드, 기본적으로 사용하지 않으며, 옵션에는 "close", "c", "normal", "n", "keepalive", "k"가 있습니다.
|
||||
- `-mt` - 반환하는 오디오의 인코딩 형식, 스트리밍의 경우 기본값은 ogg, 비스트리밍의 경우 기본값은 wav이며, 옵션에는 "wav", "ogg", "aac"가 있습니다.
|
||||
- `-cp` - 텍스트 분할 기호 설정, 기본값은 비어 있으며, ",。?!" 문자열로 입력합니다.
|
||||
|
||||
- `-hb` - cnhubert 경로.
|
||||
- `-b` - bert 경로.
|
||||
|
||||
### 추론
|
||||
|
||||
#### 엔드포인트: `/`
|
||||
|
||||
실행 매개변수가 지정된 참조 오디오와 분할 기호를 사용하여 추론을 수행합니다.. GET 또는 POST 방법을 사용할 수 있습니다:
|
||||
|
||||
GET:
|
||||
`
|
||||
http://127.0.0.1:9880?text= The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.&text_language=en
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"text": " The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.",
|
||||
"text_language": "en"
|
||||
}
|
||||
```
|
||||
|
||||
실행 매개변수로 지정된 참조 오디오를 할 기호를 설정하여 추론을 수행합니다. GET 또는 POST 방법을 사용할 수 있습니다:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?text= The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.&text_language=en&cut_punc=,.
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"text": " The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.",
|
||||
"text_language": "en",
|
||||
"cut_punc": ",."
|
||||
}
|
||||
```
|
||||
|
||||
이번 추론에 사용할 참조 오디오를 수동으로 지정합니다. GET 또는 POST 방법을 사용할 수 있습니다:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880?refer_wav_path=123.wav&prompt_text=one two three。&prompt_language=en&text= The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.&text_language=en&cut_punc=,.
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "123.wav",
|
||||
"prompt_text": "one two three",
|
||||
"prompt_language": "en",
|
||||
"text": " The founding emperor's endeavors were not yet halfway completed when he suddenly passed away. Now, the world is divided into three kingdoms, and our Shu Han dynasty finds itself in dire straits, facing a critical moment of survival.",
|
||||
"text_language": "en",
|
||||
"cut_punc": ",."
|
||||
}
|
||||
```
|
||||
|
||||
성공 시, 직접 wav 오디오 스트림을 반환하고, HTTP 상태 코드는 200 입니다. 실패 시, 오류 메시지를 포함한 JSON을 반환하고, HTTP 상태 코드는 400 입니다.
|
||||
|
||||
### 기본 참조 오디오 변경
|
||||
|
||||
#### 엔드포인트: `/change_refer`
|
||||
|
||||
사용하는 기본 참조 오디오를 수동으로 변경합니다. GET 또는 POST 방법을 사용할 수 있습니다:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/change_refer?refer_wav_path=Genshin.wav&prompt_text=I like playing Genshin Impact.&prompt_language=en`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"refer_wav_path": "Genshin.wav",
|
||||
"prompt_text": "I like playing Genshin Impact.",
|
||||
"prompt_language": "zh"
|
||||
}
|
||||
```
|
||||
|
||||
성공 시, JSON을 반환하고, HTTP 상태 코드는 200 입니다. 실패 시, JSON을 반환하고, HTTP 상태 코드는 400 입니다.
|
||||
|
||||
### 명령 제어
|
||||
|
||||
#### 엔드포인트: `/control`
|
||||
|
||||
명령에는 "restart"(다시 시작)와 "exit"(종료)가 포함됩니다. GET 또는 POST 방법을 사용할 수 있습니다:
|
||||
|
||||
GET:
|
||||
|
||||
`
|
||||
http://127.0.0.1:9880/control?command=restart`
|
||||
`
|
||||
|
||||
POST:
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "restart"
|
||||
}
|
||||
```
|
||||
|
||||
## 할 일 목록
|
||||
|
||||
- [ ] **최우선순위:**
|
||||
|
Loading…
x
Reference in New Issue
Block a user