132 lines
4.8 KiB
Markdown
132 lines
4.8 KiB
Markdown
# \ApiApi
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**get_voices_hl_api302_hl_router_sync_get_voices_get**](ApiApi.md#get_voices_hl_api302_hl_router_sync_get_voices_get) | **GET** /api/302/hl_router/sync/get/voices | 查询克隆的音色ID, 【接口来自官方, 302没有对应的中转接口】
|
|
[**hl_tts_api302_hl_router_sync_generate_speech_post**](ApiApi.md#hl_tts_api302_hl_router_sync_generate_speech_post) | **POST** /api/302/hl_router/sync/generate/speech | 海螺同步生成音频
|
|
[**upload_material_file_api302_hl_router_sync_file_upload_post**](ApiApi.md#upload_material_file_api302_hl_router_sync_file_upload_post) | **POST** /api/302/hl_router/sync/file/upload | 上传素材到302ai,用于复刻
|
|
[**voice_clone_api302_hl_router_sync_voice_clone_post**](ApiApi.md#voice_clone_api302_hl_router_sync_voice_clone_post) | **POST** /api/302/hl_router/sync/voice/clone | 声音克隆
|
|
|
|
|
|
|
|
## get_voices_hl_api302_hl_router_sync_get_voices_get
|
|
|
|
> serde_json::Value get_voices_hl_api302_hl_router_sync_get_voices_get()
|
|
查询克隆的音色ID, 【接口来自官方, 302没有对应的中转接口】
|
|
|
|
### Parameters
|
|
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**serde_json::Value**](serde_json::Value.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## hl_tts_api302_hl_router_sync_generate_speech_post
|
|
|
|
> serde_json::Value hl_tts_api302_hl_router_sync_generate_speech_post(text, voice_id, speed, vol, emotion)
|
|
海螺同步生成音频
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Required | Notes
|
|
------------- | ------------- | ------------- | ------------- | -------------
|
|
**text** | **String** | tts文本内容 | [required] |
|
|
**voice_id** | **String** | Voice ID | [required] |
|
|
**speed** | Option<**f64**> | 语速, [0.5, 2] | |[default to 1.0]
|
|
**vol** | Option<**f64**> | 音量(0,10]默认1.0 | |[default to 1.0]
|
|
**emotion** | Option<**String**> | 情感, [\\\"happy\\\", \\\"sad\\\", \\\"angry\\\", \\\"fearful\\\", \\\"disgusted\\\", \\\"surprised\\\", \\\"calm\\\"] | |
|
|
|
|
### Return type
|
|
|
|
[**serde_json::Value**](serde_json::Value.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/x-www-form-urlencoded
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## upload_material_file_api302_hl_router_sync_file_upload_post
|
|
|
|
> serde_json::Value upload_material_file_api302_hl_router_sync_file_upload_post(audio_file, purpose)
|
|
上传素材到302ai,用于复刻
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Required | Notes
|
|
------------- | ------------- | ------------- | ------------- | -------------
|
|
**audio_file** | **std::path::PathBuf** | 音频文件 | [required] |
|
|
**purpose** | Option<**String**> | 意图,默认voice_clone | |[default to voice_clone]
|
|
|
|
### Return type
|
|
|
|
[**serde_json::Value**](serde_json::Value.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: multipart/form-data
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
|
|
## voice_clone_api302_hl_router_sync_voice_clone_post
|
|
|
|
> serde_json::Value voice_clone_api302_hl_router_sync_voice_clone_post(text, model, need_noise_reduction, voice_id, prefix, audio_file)
|
|
声音克隆
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Required | Notes
|
|
------------- | ------------- | ------------- | ------------- | -------------
|
|
**text** | **String** | 复刻的文本 | [required] |
|
|
**model** | Option<**String**> | 支持的模型有:speech-02-hd,speech-02-turbo,speech-01-hd,speech-01-turbo | |[default to speech-02-hd]
|
|
**need_noise_reduction** | Option<**bool**> | 是否开启降噪 | |[default to true]
|
|
**voice_id** | Option<**String**> | 音色克隆voice_id | |
|
|
**prefix** | Option<**String**> | 音色voice_id前缀 | |[default to BoWong-]
|
|
**audio_file** | Option<**std::path::PathBuf**> | 参考音频文件 | |
|
|
|
|
### Return type
|
|
|
|
[**serde_json::Value**](serde_json::Value.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: multipart/form-data
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|