diff --git a/.idea/php.xml b/.idea/php.xml
index a1827cd..29059d0 100644
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml
new file mode 100644
index 0000000..422c581
--- /dev/null
+++ b/.idea/phpunit.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 2879688..0daedaa 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,4 +5,10 @@
"settings.editor.selected.configurable": "configurable.group.appearance"
}
}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index bbb2540..4e87560 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -12,18 +12,26 @@ docs/Model/ChatParam.md
docs/Model/ChatParam.md
docs/Model/ChatResult.md
docs/Model/ChatResult.md
-docs/Model/ExtractTextParam.md
-docs/Model/ExtractTextParam.md
-docs/Model/ExtractTextResult.md
-docs/Model/ExtractTextResult.md
+docs/Model/ExtraContentParam.md
+docs/Model/ExtraContentParam.md
+docs/Model/ExtractContentResult.md
+docs/Model/ExtractContentResult.md
docs/Model/PictureInfo.md
docs/Model/PictureInfo.md
docs/Model/ResponseOpenAPIChatResult.md
docs/Model/ResponseOpenAPIChatResult.md
-docs/Model/ResponseOpenAPIExtractTextResult.md
-docs/Model/ResponseOpenAPIExtractTextResult.md
+docs/Model/ResponseOpenAPIExtractContentResult.md
+docs/Model/ResponseOpenAPIExtractContentResult.md
+docs/Model/ResponseOpenAPISpeakerListResult.md
+docs/Model/ResponseOpenAPISpeakerListResult.md
docs/Model/ResponseOpenAPITokensCountResult.md
docs/Model/ResponseOpenAPITokensCountResult.md
+docs/Model/ResponseOpenAPIVoiceCloneResult.md
+docs/Model/ResponseOpenAPIVoiceCloneResult.md
+docs/Model/Speaker.md
+docs/Model/Speaker.md
+docs/Model/SpeakerListResult.md
+docs/Model/SpeakerListResult.md
docs/Model/SpeechResult.md
docs/Model/SpeechResult.md
docs/Model/StreamModule.md
@@ -34,6 +42,10 @@ docs/Model/TokenCountParam.md
docs/Model/TokenCountParam.md
docs/Model/TokensCountResult.md
docs/Model/TokensCountResult.md
+docs/Model/VoiceCloneParam.md
+docs/Model/VoiceCloneParam.md
+docs/Model/VoiceCloneResult.md
+docs/Model/VoiceCloneResult.md
git_push.sh
lib/ApiClient.php
lib/ApiException.php
@@ -44,18 +56,24 @@ lib/Configuration.php
lib/HeaderSelector.php
lib/Model/ChatParam.php
lib/Model/ChatResult.php
-lib/Model/ExtractTextParam.php
-lib/Model/ExtractTextResult.php
+lib/Model/ExtraContentParam.php
+lib/Model/ExtractContentResult.php
lib/Model/ModelInterface.php
lib/Model/PictureInfo.php
lib/Model/ResponseOpenAPIChatResult.php
-lib/Model/ResponseOpenAPIExtractTextResult.php
+lib/Model/ResponseOpenAPIExtractContentResult.php
+lib/Model/ResponseOpenAPISpeakerListResult.php
lib/Model/ResponseOpenAPITokensCountResult.php
+lib/Model/ResponseOpenAPIVoiceCloneResult.php
+lib/Model/Speaker.php
+lib/Model/SpeakerListResult.php
lib/Model/SpeechResult.php
lib/Model/StreamModule.php
lib/Model/SynthesizerParam.php
lib/Model/TokenCountParam.php
lib/Model/TokensCountResult.php
+lib/Model/VoiceCloneParam.php
+lib/Model/VoiceCloneResult.php
lib/NotifyHandler.php
lib/ObjectSerializer.php
lib/StreamApiClient.php
@@ -64,14 +82,20 @@ phpunit.xml.dist
test/Api/AiApiTest.php
test/Model/ChatParamTest.php
test/Model/ChatResultTest.php
-test/Model/ExtractTextParamTest.php
-test/Model/ExtractTextResultTest.php
+test/Model/ExtraContentParamTest.php
+test/Model/ExtractContentResultTest.php
test/Model/PictureInfoTest.php
test/Model/ResponseOpenAPIChatResultTest.php
-test/Model/ResponseOpenAPIExtractTextResultTest.php
+test/Model/ResponseOpenAPIExtractContentResultTest.php
+test/Model/ResponseOpenAPISpeakerListResultTest.php
test/Model/ResponseOpenAPITokensCountResultTest.php
+test/Model/ResponseOpenAPIVoiceCloneResultTest.php
+test/Model/SpeakerListResultTest.php
+test/Model/SpeakerTest.php
test/Model/SpeechResultTest.php
test/Model/StreamModuleTest.php
test/Model/SynthesizerParamTest.php
test/Model/TokenCountParamTest.php
test/Model/TokensCountResultTest.php
+test/Model/VoiceCloneParamTest.php
+test/Model/VoiceCloneResultTest.php
diff --git a/.openapi-generator/api-doc-php-sdk.sha256 b/.openapi-generator/api-doc-php-sdk.sha256
index 1bc2e35..46c1084 100644
--- a/.openapi-generator/api-doc-php-sdk.sha256
+++ b/.openapi-generator/api-doc-php-sdk.sha256
@@ -1 +1 @@
-9507dfc0a37d26527ff8a017baf676b0978328b84732d3d8c3414000823f6541
\ No newline at end of file
+5126def6e9de093e395a81cb6734960c1beb6da52ca97e5c8f3ee4bc426bbb27
\ No newline at end of file
diff --git a/README.md b/README.md
index 15ec5fa..0c80ce6 100644
--- a/README.md
+++ b/README.md
@@ -154,24 +154,32 @@ function example()
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AiApi* | [**chat**](docs/Api/AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话
-*AiApi* | [**extractText**](docs/Api/AiApi.md#extracttext) | **POST** /v1/ai/extractText | 元梦ai-提取上传文件的内容
+*AiApi* | [**extractContent**](docs/Api/AiApi.md#extractcontent) | **POST** /v1/ai/extractContent | 元梦ai-提取上传文件的内容
+*AiApi* | [**speakerList**](docs/Api/AiApi.md#speakerlist) | **POST** /v1/ai/speakerList | 元梦ai-获取发音人列表
*AiApi* | [**tokenCount**](docs/Api/AiApi.md#tokencount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计
+*AiApi* | [**voiceClone**](docs/Api/AiApi.md#voiceclone) | **POST** /v1/ai/voiceClone | 元梦ai-语音克隆
## 模型文档
- [ChatParam](docs/Model/ChatParam.md)
- [ChatResult](docs/Model/ChatResult.md)
-- [ExtractTextParam](docs/Model/ExtractTextParam.md)
-- [ExtractTextResult](docs/Model/ExtractTextResult.md)
+- [ExtraContentParam](docs/Model/ExtraContentParam.md)
+- [ExtractContentResult](docs/Model/ExtractContentResult.md)
- [PictureInfo](docs/Model/PictureInfo.md)
- [ResponseOpenAPIChatResult](docs/Model/ResponseOpenAPIChatResult.md)
-- [ResponseOpenAPIExtractTextResult](docs/Model/ResponseOpenAPIExtractTextResult.md)
+- [ResponseOpenAPIExtractContentResult](docs/Model/ResponseOpenAPIExtractContentResult.md)
+- [ResponseOpenAPISpeakerListResult](docs/Model/ResponseOpenAPISpeakerListResult.md)
- [ResponseOpenAPITokensCountResult](docs/Model/ResponseOpenAPITokensCountResult.md)
+- [ResponseOpenAPIVoiceCloneResult](docs/Model/ResponseOpenAPIVoiceCloneResult.md)
+- [Speaker](docs/Model/Speaker.md)
+- [SpeakerListResult](docs/Model/SpeakerListResult.md)
- [SpeechResult](docs/Model/SpeechResult.md)
- [StreamModule](docs/Model/StreamModule.md)
- [SynthesizerParam](docs/Model/SynthesizerParam.md)
- [TokenCountParam](docs/Model/TokenCountParam.md)
- [TokensCountResult](docs/Model/TokensCountResult.md)
+- [VoiceCloneParam](docs/Model/VoiceCloneParam.md)
+- [VoiceCloneResult](docs/Model/VoiceCloneResult.md)
## 测试
diff --git a/composer.json b/composer.json
index b2acb1d..ba11381 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "tsl3060/low-carbon-platform",
- "version": "1.1.3",
+ "version": "1.1.4",
"description": "碳丝路数据开放平台",
"keywords": [
"openapitools",
diff --git a/docs/Api/AiApi.md b/docs/Api/AiApi.md
index 2a0754e..9e5df4c 100644
--- a/docs/Api/AiApi.md
+++ b/docs/Api/AiApi.md
@@ -3,8 +3,10 @@
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**chat()**](AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话 |
-| [**extractText()**](AiApi.md#extractText) | **POST** /v1/ai/extractText | 元梦ai-提取上传文件的内容 |
+| [**extractContent()**](AiApi.md#extractContent) | **POST** /v1/ai/extractContent | 元梦ai-提取上传文件的内容 |
+| [**speakerList()**](AiApi.md#speakerList) | **POST** /v1/ai/speakerList | 元梦ai-获取发音人列表 |
| [**tokenCount()**](AiApi.md#tokenCount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计 |
+| [**voiceClone()**](AiApi.md#voiceClone) | **POST** /v1/ai/voiceClone | 元梦ai-语音克隆 |
## `chat()`
@@ -59,10 +61,10 @@ try {
[[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md)
-## `extractText()`
+## `extractContent()`
```php
-extractText($file, $param): \OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult
+extractContent($file, $param): \OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult
```
元梦ai-提取上传文件的内容
@@ -83,13 +85,13 @@ $apiInstance = new OpenAPI\Client\Api\AiApi(
new GuzzleHttp\Client()
);
$file = "/path/to/file.txt"; // \SplFileObject
-$param = new \OpenAPI\Client\Model\ExtractTextParam(); // \OpenAPI\Client\Model\ExtractTextParam
+$param = new \OpenAPI\Client\Model\ExtraContentParam(); // \OpenAPI\Client\Model\ExtraContentParam
try {
- $result = $apiInstance->extractText($file, $param);
+ $result = $apiInstance->extractContent($file, $param);
print_r($result);
} catch (Exception $e) {
- echo 'Exception when calling AiApi->extractText: ', $e->getMessage(), PHP_EOL;
+ echo 'Exception when calling AiApi->extractContent: ', $e->getMessage(), PHP_EOL;
}
```
@@ -98,11 +100,11 @@ try {
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **file** | **\SplFileObject****\SplFileObject**| | [optional] |
-| **param** | [**\OpenAPI\Client\Model\ExtractTextParam**](../Model/ExtractTextParam.md)| | [optional] |
+| **param** | [**\OpenAPI\Client\Model\ExtraContentParam**](../Model/ExtraContentParam.md)| | [optional] |
### 返回类型
-[**\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult**](../Model/ResponseOpenAPIExtractTextResult.md)
+[**\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult**](../Model/ResponseOpenAPIExtractContentResult.md)
### HTTP请求头
@@ -113,6 +115,55 @@ try {
[[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md)
+## `speakerList()`
+
+```php
+speakerList(): \OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult
+```
+
+元梦ai-获取发音人列表
+
+获取发音人列表
+
+### 示例
+
+```php
+speakerList();
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling AiApi->speakerList: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### 参数
+
+该端点不需要任何参数.
+
+### 返回类型
+
+[**\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult**](../Model/ResponseOpenAPISpeakerListResult.md)
+
+### HTTP请求头
+
+- **Content-Type**: Not defined
+- **Accept**: `*/*`
+
+[[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档)
+[[返回模型列表]](../../README.md#模型文档)
+[[返回README]](../../README.md)
+
## `tokenCount()`
```php
@@ -164,3 +215,55 @@ try {
[[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档)
[[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md)
+
+## `voiceClone()`
+
+```php
+voiceClone($voice_clone_param): \OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult
+```
+
+元梦ai-语音克隆
+
+语音克隆
+
+### 示例
+
+```php
+voiceClone($voice_clone_param);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling AiApi->voiceClone: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### 参数
+
+| Name | Type | Description | Notes |
+| ------------- | ------------- | ------------- | ------------- |
+| **voice_clone_param** | [**\OpenAPI\Client\Model\VoiceCloneParam**](../Model/VoiceCloneParam.md)| | [optional] |
+
+### 返回类型
+
+[**\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult**](../Model/ResponseOpenAPIVoiceCloneResult.md)
+
+### HTTP请求头
+
+- **Content-Type**: `application/json`
+- **Accept**: `*/*`
+
+[[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档)
+[[返回模型列表]](../../README.md#模型文档)
+[[返回README]](../../README.md)
diff --git a/docs/Model/ExtractTextParam.md b/docs/Model/ExtraContentParam.md
similarity index 95%
rename from docs/Model/ExtractTextParam.md
rename to docs/Model/ExtraContentParam.md
index fda4320..7e83120 100644
--- a/docs/Model/ExtractTextParam.md
+++ b/docs/Model/ExtraContentParam.md
@@ -1,4 +1,4 @@
-# # ExtractTextParam
+# # ExtraContentParam
## 属性
diff --git a/docs/Model/ExtractTextResult.md b/docs/Model/ExtractContentResult.md
similarity index 81%
rename from docs/Model/ExtractTextResult.md
rename to docs/Model/ExtractContentResult.md
index f4eb4cb..c252fda 100644
--- a/docs/Model/ExtractTextResult.md
+++ b/docs/Model/ExtractContentResult.md
@@ -1,10 +1,10 @@
-# # ExtractTextResult
+# # ExtractContentResult
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**text** | **string** | 文本内容 | [optional]
+**text** | **string[]** | 文本内容 | [optional]
**pictures** | [**\OpenAPI\Client\Model\PictureInfo[]**](PictureInfo.md) | 图片信息 | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/docs/Model/ResponseOpenAPIExtractContentResult.md b/docs/Model/ResponseOpenAPIExtractContentResult.md
new file mode 100644
index 0000000..5b0d0c6
--- /dev/null
+++ b/docs/Model/ResponseOpenAPIExtractContentResult.md
@@ -0,0 +1,20 @@
+# # ResponseOpenAPIExtractContentResult
+
+## 属性
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**time** | **string** | 该消息发生的时间 | [optional]
+**openid** | **string** | | [optional]
+**payload** | [**\OpenAPI\Client\Model\ExtractContentResult**](ExtractContentResult.md) | | [optional]
+**sign** | **string** | | [optional]
+**charset** | **string** | | [optional]
+**description** | **string** | | [optional]
+**response_id** | **string** | 消息的唯一ID | [optional]
+**err_code** | **int** | 该消息的错误码 | [optional]
+**err_msg** | **string** | 错误消息描述 | [optional]
+**sub_err** | **int** | 子错误的具体的代号 | [optional]
+**sub_msg** | **string** | 子错误对应的提示消息 | [optional]
+**sign_type** | **string** | | [optional]
+
+[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/docs/Model/ResponseOpenAPIExtractTextResult.md b/docs/Model/ResponseOpenAPISpeakerListResult.md
similarity index 86%
rename from docs/Model/ResponseOpenAPIExtractTextResult.md
rename to docs/Model/ResponseOpenAPISpeakerListResult.md
index 9982513..ebebe2e 100644
--- a/docs/Model/ResponseOpenAPIExtractTextResult.md
+++ b/docs/Model/ResponseOpenAPISpeakerListResult.md
@@ -1,4 +1,4 @@
-# # ResponseOpenAPIExtractTextResult
+# # ResponseOpenAPISpeakerListResult
## 属性
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **string** | 该消息发生的时间 | [optional]
**openid** | **string** | | [optional]
-**payload** | [**\OpenAPI\Client\Model\ExtractTextResult**](ExtractTextResult.md) | | [optional]
+**payload** | [**\OpenAPI\Client\Model\SpeakerListResult**](SpeakerListResult.md) | | [optional]
**sign** | **string** | | [optional]
**charset** | **string** | | [optional]
**description** | **string** | | [optional]
diff --git a/docs/Model/ResponseOpenAPIVoiceCloneResult.md b/docs/Model/ResponseOpenAPIVoiceCloneResult.md
new file mode 100644
index 0000000..10261f0
--- /dev/null
+++ b/docs/Model/ResponseOpenAPIVoiceCloneResult.md
@@ -0,0 +1,20 @@
+# # ResponseOpenAPIVoiceCloneResult
+
+## 属性
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**time** | **string** | 该消息发生的时间 | [optional]
+**openid** | **string** | | [optional]
+**payload** | [**\OpenAPI\Client\Model\VoiceCloneResult**](VoiceCloneResult.md) | | [optional]
+**sign** | **string** | | [optional]
+**charset** | **string** | | [optional]
+**description** | **string** | | [optional]
+**response_id** | **string** | 消息的唯一ID | [optional]
+**err_code** | **int** | 该消息的错误码 | [optional]
+**err_msg** | **string** | 错误消息描述 | [optional]
+**sub_err** | **int** | 子错误的具体的代号 | [optional]
+**sub_msg** | **string** | 子错误对应的提示消息 | [optional]
+**sign_type** | **string** | | [optional]
+
+[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/docs/Model/Speaker.md b/docs/Model/Speaker.md
new file mode 100644
index 0000000..cbda592
--- /dev/null
+++ b/docs/Model/Speaker.md
@@ -0,0 +1,12 @@
+# # Speaker
+
+## 属性
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **string** | 发音人ID | [optional]
+**sex** | **string** | 性别[male(男性),female(女性)] | [optional]
+**year** | **string** | 年龄等级[A(小于14岁),B(14~25岁),C(26~40岁),D(大于41岁)] | [optional]
+**accent** | **string** | 口音[north(北方),south(南方)] | [optional]
+
+[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/docs/Model/SpeakerListResult.md b/docs/Model/SpeakerListResult.md
new file mode 100644
index 0000000..7717d98
--- /dev/null
+++ b/docs/Model/SpeakerListResult.md
@@ -0,0 +1,9 @@
+# # SpeakerListResult
+
+## 属性
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**speaker_list** | [**\OpenAPI\Client\Model\Speaker[]**](Speaker.md) | 发音人列表 | [optional]
+
+[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/docs/Model/VoiceCloneParam.md b/docs/Model/VoiceCloneParam.md
new file mode 100644
index 0000000..2a9ce2f
--- /dev/null
+++ b/docs/Model/VoiceCloneParam.md
@@ -0,0 +1,15 @@
+# # VoiceCloneParam
+
+## 属性
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**text** | **string** | 需要合成音频的文本 |
+**wav** | **string** | 要克隆的音频文件URL地址,当type为custom该字段有效 | [optional]
+**type** | **string** | 克隆类型,可选值[sys(系统预设), custom(用户自定义)] |
+**speaker** | **string** | 发音人,当type为sys该字段有效 | [optional]
+**volume** | **int** | 音量,可选值[0 ~ 100] 默认50 | [optional]
+**speed** | **float** | 语速,倍速,可选值[0.5, 1, 1.5, 2, 2.5] 默认1 | [optional]
+**tone** | **float** | 音调,可选值[-1 ~ 1] 默认0 | [optional]
+
+[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/docs/Model/VoiceCloneResult.md b/docs/Model/VoiceCloneResult.md
new file mode 100644
index 0000000..955b03c
--- /dev/null
+++ b/docs/Model/VoiceCloneResult.md
@@ -0,0 +1,10 @@
+# # VoiceCloneResult
+
+## 属性
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**wav** | **string** | 生成的音频文件地址 | [optional]
+**speaker** | **string** | 是否成功 success/fail | [optional]
+
+[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)
diff --git a/lib/Api/AiApi.php b/lib/Api/AiApi.php
index de45d58..24183e6 100644
--- a/lib/Api/AiApi.php
+++ b/lib/Api/AiApi.php
@@ -81,12 +81,18 @@ class AiApi
'chat' => [
'application/json',
],
- 'extractText' => [
+ 'extractContent' => [
'multipart/form-data',
],
+ 'speakerList' => [
+ 'application/json',
+ ],
'tokenCount' => [
'application/json',
],
+ 'voiceClone' => [
+ 'application/json',
+ ],
];
/**
@@ -462,40 +468,40 @@ class AiApi
}
/**
- * Operation extractText
+ * Operation extractContent
*
* 元梦ai-提取上传文件的内容
*
* @param \SplFileObject $file file (optional)
- * @param \OpenAPI\Client\Model\ExtractTextParam $param param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractText'] to see the possible values for this operation
+ * @param \OpenAPI\Client\Model\ExtraContentParam $param param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractContent'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult
+ * @return \OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult
*/
- public function extractText($file = null, $param = null, string $contentType = self::contentTypes['extractText'][0])
+ public function extractContent($file = null, $param = null, string $contentType = self::contentTypes['extractContent'][0])
{
- list($response) = $this->extractTextWithHttpInfo($file, $param, $contentType);
+ list($response) = $this->extractContentWithHttpInfo($file, $param, $contentType);
return $response;
}
/**
- * Operation extractTextWithHttpInfo
+ * Operation extractContentWithHttpInfo
*
* 元梦ai-提取上传文件的内容
*
* @param \SplFileObject $file (optional)
- * @param \OpenAPI\Client\Model\ExtractTextParam $param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractText'] to see the possible values for this operation
+ * @param \OpenAPI\Client\Model\ExtraContentParam $param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractContent'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult, HTTP status code, HTTP response headers (array of strings)
*/
- public function extractTextWithHttpInfo($file = null, $param = null, string $contentType = self::contentTypes['extractText'][0])
+ public function extractContentWithHttpInfo($file = null, $param = null, string $contentType = self::contentTypes['extractContent'][0])
{
- $request = $this->extractTextRequest($file, $param, $contentType);
+ $request = $this->extractContentRequest($file, $param, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -550,23 +556,23 @@ class AiApi
switch($statusCode) {
case 200:
- if ('\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult' === '\SplFileObject') {
+ if ('\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
- if ('\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult' !== 'string') {
+ if ('\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult' !== 'string') {
$content = json_decode($content);
}
}
return [
- ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult', []),
+ ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult';
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -587,7 +593,7 @@ class AiApi
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult',
+ '\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -598,20 +604,20 @@ class AiApi
}
/**
- * Operation extractTextAsync
+ * Operation extractContentAsync
*
* 元梦ai-提取上传文件的内容
*
* @param \SplFileObject $file (optional)
- * @param \OpenAPI\Client\Model\ExtractTextParam $param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractText'] to see the possible values for this operation
+ * @param \OpenAPI\Client\Model\ExtraContentParam $param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractContent'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function extractTextAsync($file = null, $param = null, string $contentType = self::contentTypes['extractText'][0])
+ public function extractContentAsync($file = null, $param = null, string $contentType = self::contentTypes['extractContent'][0])
{
- return $this->extractTextAsyncWithHttpInfo($file, $param, $contentType)
+ return $this->extractContentAsyncWithHttpInfo($file, $param, $contentType)
->then(
function ($response) {
return $response[0];
@@ -620,21 +626,21 @@ class AiApi
}
/**
- * Operation extractTextAsyncWithHttpInfo
+ * Operation extractContentAsyncWithHttpInfo
*
* 元梦ai-提取上传文件的内容
*
* @param \SplFileObject $file (optional)
- * @param \OpenAPI\Client\Model\ExtractTextParam $param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractText'] to see the possible values for this operation
+ * @param \OpenAPI\Client\Model\ExtraContentParam $param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractContent'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function extractTextAsyncWithHttpInfo($file = null, $param = null, string $contentType = self::contentTypes['extractText'][0])
+ public function extractContentAsyncWithHttpInfo($file = null, $param = null, string $contentType = self::contentTypes['extractContent'][0])
{
- $returnType = '\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult';
- $request = $this->extractTextRequest($file, $param, $contentType);
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult';
+ $request = $this->extractContentRequest($file, $param, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -673,22 +679,22 @@ class AiApi
}
/**
- * Create request for operation 'extractText'
+ * Create request for operation 'extractContent'
*
* @param \SplFileObject $file (optional)
- * @param \OpenAPI\Client\Model\ExtractTextParam $param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractText'] to see the possible values for this operation
+ * @param \OpenAPI\Client\Model\ExtraContentParam $param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['extractContent'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function extractTextRequest($file = null, $param = null, string $contentType = self::contentTypes['extractText'][0])
+ public function extractContentRequest($file = null, $param = null, string $contentType = self::contentTypes['extractContent'][0])
{
- $resourcePath = '/v1/ai/extractText';
+ $resourcePath = '/v1/ai/extractContent';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -762,10 +768,20 @@ class AiApi
// for HTTP post (form)
$httpBody = ObjectSerializer::buildQuery($formParams);
}
+ } else if (array_key_exists("Content-Type", $headers) &&
+ stripos($headers['Content-Type'], 'application/json') !== false) {
+ // 如果是application/json,将额外的参数合并到现有的JSON对象中
+ $existingParams = json_decode($httpBody, true);
+ if ($existingParams === null) {
+ $existingParams = [];
+ }
+ $mergedParams = array_merge($existingParams, $additionalParams);
+ $httpBody = json_encode($mergedParams, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
}
+
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
@@ -788,38 +804,36 @@ class AiApi
}
/**
- * Operation tokenCount
+ * Operation speakerList
*
- * 元梦ai-token统计
+ * 元梦ai-获取发音人列表
*
- * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param token_count_param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['speakerList'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return \OpenAPI\Client\Model\ResponseOpenAPITokensCountResult
+ * @return \OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult
*/
- public function tokenCount($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ public function speakerList(string $contentType = self::contentTypes['speakerList'][0])
{
- list($response) = $this->tokenCountWithHttpInfo($token_count_param, $contentType);
+ list($response) = $this->speakerListWithHttpInfo($contentType);
return $response;
}
/**
- * Operation tokenCountWithHttpInfo
+ * Operation speakerListWithHttpInfo
*
- * 元梦ai-token统计
+ * 元梦ai-获取发音人列表
*
- * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['speakerList'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
- * @return array of \OpenAPI\Client\Model\ResponseOpenAPITokensCountResult, HTTP status code, HTTP response headers (array of strings)
+ * @return array of \OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult, HTTP status code, HTTP response headers (array of strings)
*/
- public function tokenCountWithHttpInfo($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ public function speakerListWithHttpInfo(string $contentType = self::contentTypes['speakerList'][0])
{
- $request = $this->tokenCountRequest($token_count_param, $contentType);
+ $request = $this->speakerListRequest($contentType);
try {
$options = $this->createHttpClientOption();
@@ -874,23 +888,23 @@ class AiApi
switch($statusCode) {
case 200:
- if ('\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult' === '\SplFileObject') {
+ if ('\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
- if ('\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult' !== 'string') {
+ if ('\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult' !== 'string') {
$content = json_decode($content);
}
}
return [
- ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult', []),
+ ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
- $returnType = '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult';
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
@@ -911,7 +925,7 @@ class AiApi
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
- '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult',
+ '\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
@@ -922,19 +936,18 @@ class AiApi
}
/**
- * Operation tokenCountAsync
+ * Operation speakerListAsync
*
- * 元梦ai-token统计
+ * 元梦ai-获取发音人列表
*
- * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['speakerList'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function tokenCountAsync($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ public function speakerListAsync(string $contentType = self::contentTypes['speakerList'][0])
{
- return $this->tokenCountAsyncWithHttpInfo($token_count_param, $contentType)
+ return $this->speakerListAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
@@ -943,20 +956,19 @@ class AiApi
}
/**
- * Operation tokenCountAsyncWithHttpInfo
+ * Operation speakerListAsyncWithHttpInfo
*
- * 元梦ai-token统计
+ * 元梦ai-获取发音人列表
*
- * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['speakerList'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
- public function tokenCountAsyncWithHttpInfo($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ public function speakerListAsyncWithHttpInfo(string $contentType = self::contentTypes['speakerList'][0])
{
- $returnType = '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult';
- $request = $this->tokenCountRequest($token_count_param, $contentType);
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult';
+ $request = $this->speakerListRequest($contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -995,20 +1007,18 @@ class AiApi
}
/**
- * Create request for operation 'tokenCount'
+ * Create request for operation 'speakerList'
*
- * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
- * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['speakerList'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
- public function tokenCountRequest($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ public function speakerListRequest(string $contentType = self::contentTypes['speakerList'][0])
{
-
- $resourcePath = '/v1/ai/tokenCount';
+ $resourcePath = '/v1/ai/speakerList';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -1026,12 +1036,651 @@ class AiApi
);
// for model (json/xml)
- if (isset($token_count_param)) {
- if (stripos($headers['Content-Type'], 'application/json') !== false) {
- # if Content-Type contains "application/json", json_encode the body
- $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($token_count_param));
+ // 初始化额外的参数
+ $additionalParams = [
+ 'payload' => json_decode($httpBody, true),
+ 'path' => $resourcePath,
+ 'charset' => $this->config->getCharset(),
+ 'time' => date($this->config->getDataFormat(), time()),
+ 'sign_type' => $this->config->getSignType(),
+ 'access_token' => '',
+ 'app_id' => $this->config->getAppid(),
+ 'sign' => ''
+ ];
+
+ $additionalParams['sign'] = $this->apiClient->requestSign($additionalParams);
+
+ if (count($formParams) > 0) {
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ $multipartContents[] = [
+ 'name' => 'sign_param',
+ 'contents' => json_encode($additionalParams)
+ ];
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
+ # if Content-Type contains "application/json", json_encode the form parameters
+ $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
} else {
- $httpBody = $token_count_param;
+ // for HTTP post (form)
+ $httpBody = ObjectSerializer::buildQuery($formParams);
+ }
+ } else if (array_key_exists("Content-Type", $headers) &&
+ stripos($headers['Content-Type'], 'application/json') !== false) {
+ // 如果是application/json,将额外的参数合并到现有的JSON对象中
+ $existingParams = json_decode($httpBody, true);
+ if ($existingParams === null) {
+ $existingParams = [];
+ }
+ $mergedParams = array_merge($existingParams, $additionalParams);
+ $httpBody = json_encode($mergedParams, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
+ }
+
+
+
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $operationHost = $this->config->getHost();
+ $query = ObjectSerializer::buildQuery($queryParams);
+ return new Request(
+ 'POST',
+ $operationHost . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation tokenCount
+ *
+ * 元梦ai-token统计
+ *
+ * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param token_count_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ *
+ * @throws \OpenAPI\Client\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return \OpenAPI\Client\Model\ResponseOpenAPITokensCountResult
+ */
+ public function tokenCount($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ {
+ list($response) = $this->tokenCountWithHttpInfo($token_count_param, $contentType);
+ return $response;
+ }
+
+ /**
+ * Operation tokenCountWithHttpInfo
+ *
+ * 元梦ai-token统计
+ *
+ * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ *
+ * @throws \OpenAPI\Client\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return array of \OpenAPI\Client\Model\ResponseOpenAPITokensCountResult, HTTP status code, HTTP response headers (array of strings)
+ */
+ public function tokenCountWithHttpInfo($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ {
+ $request = $this->tokenCountRequest($token_count_param, $contentType);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ // 响应预处理
+ $data = json_decode($response->getBody(), true);
+ if (json_last_error() !== JSON_ERROR_NONE) {
+ throw new ApiException("JSON解码错误: " . json_last_error_msg());
+ }
+
+ // 验证签名
+ if (!$this->apiClient->verifySign($data)) {
+ throw new ApiException(
+ 'Verification failed',
+ $response->getStatusCode(),
+ $response->getHeaders(),
+ $response->getBody()
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+ if ($statusCode < 200 || $statusCode > 299) {
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ (string) $request->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+
+ switch($statusCode) {
+ case 200:
+ if ('\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ if ('\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult' !== 'string') {
+ $content = json_decode($content);
+ }
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult';
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ if ($returnType !== 'string') {
+ $content = json_decode($content);
+ }
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation tokenCountAsync
+ *
+ * 元梦ai-token统计
+ *
+ * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function tokenCountAsync($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ {
+ return $this->tokenCountAsyncWithHttpInfo($token_count_param, $contentType)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation tokenCountAsyncWithHttpInfo
+ *
+ * 元梦ai-token统计
+ *
+ * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function tokenCountAsyncWithHttpInfo($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ {
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPITokensCountResult';
+ $request = $this->tokenCountRequest($token_count_param, $contentType);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ if ($returnType !== 'string') {
+ $content = json_decode($content);
+ }
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'tokenCount'
+ *
+ * @param \OpenAPI\Client\Model\TokenCountParam $token_count_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['tokenCount'] to see the possible values for this operation
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Psr7\Request
+ */
+ public function tokenCountRequest($token_count_param = null, string $contentType = self::contentTypes['tokenCount'][0])
+ {
+
+
+
+ $resourcePath = '/v1/ai/tokenCount';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+
+
+
+
+ $headers = $this->headerSelector->selectHeaders(
+ ['*/*', ],
+ $contentType,
+ $multipart
+ );
+
+ // for model (json/xml)
+ if (isset($token_count_param)) {
+ if (stripos($headers['Content-Type'], 'application/json') !== false) {
+ # if Content-Type contains "application/json", json_encode the body
+ $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($token_count_param));
+ } else {
+ $httpBody = $token_count_param;
+ }
+ } elseif (count($formParams) > 0) {
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
+ # if Content-Type contains "application/json", json_encode the form parameters
+ $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
+ } else {
+ // for HTTP post (form)
+ $httpBody = ObjectSerializer::buildQuery($formParams);
+ }
+ }
+
+
+ // 初始化额外的参数
+ $additionalParams = [
+ 'payload' => json_decode($httpBody, true),
+ 'path' => $resourcePath,
+ 'charset' => $this->config->getCharset(),
+ 'time' => date($this->config->getDataFormat(), time()),
+ 'sign_type' => $this->config->getSignType(),
+ 'access_token' => '',
+ 'app_id' => $this->config->getAppid(),
+ 'sign' => ''
+ ];
+
+ $additionalParams['sign'] = $this->apiClient->requestSign($additionalParams);
+
+ // 根据Content-Type决定如何合并额外的参数
+ if (array_key_exists("Content-Type", $headers) && stripos($headers['Content-Type'], 'application/json') !== false) {
+ // 如果是application/json,将额外的参数合并到现有的JSON对象中
+ $existingParams = json_decode($httpBody, true);
+ if ($existingParams === null) {
+ $existingParams = [];
+ }
+ $mergedParams = array_merge($existingParams, $additionalParams);
+ $httpBody = json_encode($mergedParams, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
+ } else if(array_key_exists("Content-Type", $headers)){
+ // 如果不是application/json,将额外的参数合并到现有的查询字符串中
+ $existingParams = [];
+ if ($httpBody != null) {
+ parse_str($httpBody, $existingParams);
+ }
+ $mergedParams = array_merge($existingParams, $additionalParams);
+ $httpBody = ObjectSerializer::buildQuery($mergedParams);
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $operationHost = $this->config->getHost();
+ $query = ObjectSerializer::buildQuery($queryParams);
+ return new Request(
+ 'POST',
+ $operationHost . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation voiceClone
+ *
+ * 元梦ai-语音克隆
+ *
+ * @param \OpenAPI\Client\Model\VoiceCloneParam $voice_clone_param voice_clone_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['voiceClone'] to see the possible values for this operation
+ *
+ * @throws \OpenAPI\Client\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return \OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult
+ */
+ public function voiceClone($voice_clone_param = null, string $contentType = self::contentTypes['voiceClone'][0])
+ {
+ list($response) = $this->voiceCloneWithHttpInfo($voice_clone_param, $contentType);
+ return $response;
+ }
+
+ /**
+ * Operation voiceCloneWithHttpInfo
+ *
+ * 元梦ai-语音克隆
+ *
+ * @param \OpenAPI\Client\Model\VoiceCloneParam $voice_clone_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['voiceClone'] to see the possible values for this operation
+ *
+ * @throws \OpenAPI\Client\ApiException on non-2xx response
+ * @throws \InvalidArgumentException
+ * @return array of \OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult, HTTP status code, HTTP response headers (array of strings)
+ */
+ public function voiceCloneWithHttpInfo($voice_clone_param = null, string $contentType = self::contentTypes['voiceClone'][0])
+ {
+ $request = $this->voiceCloneRequest($voice_clone_param, $contentType);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ // 响应预处理
+ $data = json_decode($response->getBody(), true);
+ if (json_last_error() !== JSON_ERROR_NONE) {
+ throw new ApiException("JSON解码错误: " . json_last_error_msg());
+ }
+
+ // 验证签名
+ if (!$this->apiClient->verifySign($data)) {
+ throw new ApiException(
+ 'Verification failed',
+ $response->getStatusCode(),
+ $response->getHeaders(),
+ $response->getBody()
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+ if ($statusCode < 200 || $statusCode > 299) {
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ (string) $request->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+
+ switch($statusCode) {
+ case 200:
+ if ('\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ if ('\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult' !== 'string') {
+ $content = json_decode($content);
+ }
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult';
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ if ($returnType !== 'string') {
+ $content = json_decode($content);
+ }
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation voiceCloneAsync
+ *
+ * 元梦ai-语音克隆
+ *
+ * @param \OpenAPI\Client\Model\VoiceCloneParam $voice_clone_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['voiceClone'] to see the possible values for this operation
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function voiceCloneAsync($voice_clone_param = null, string $contentType = self::contentTypes['voiceClone'][0])
+ {
+ return $this->voiceCloneAsyncWithHttpInfo($voice_clone_param, $contentType)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation voiceCloneAsyncWithHttpInfo
+ *
+ * 元梦ai-语音克隆
+ *
+ * @param \OpenAPI\Client\Model\VoiceCloneParam $voice_clone_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['voiceClone'] to see the possible values for this operation
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ */
+ public function voiceCloneAsyncWithHttpInfo($voice_clone_param = null, string $contentType = self::contentTypes['voiceClone'][0])
+ {
+ $returnType = '\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult';
+ $request = $this->voiceCloneRequest($voice_clone_param, $contentType);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ if ($returnType !== 'string') {
+ $content = json_decode($content);
+ }
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'voiceClone'
+ *
+ * @param \OpenAPI\Client\Model\VoiceCloneParam $voice_clone_param (optional)
+ * @param string $contentType The value for the Content-Type header. Check self::contentTypes['voiceClone'] to see the possible values for this operation
+ *
+ * @throws \InvalidArgumentException
+ * @return \GuzzleHttp\Psr7\Request
+ */
+ public function voiceCloneRequest($voice_clone_param = null, string $contentType = self::contentTypes['voiceClone'][0])
+ {
+
+
+
+ $resourcePath = '/v1/ai/voiceClone';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+
+
+
+
+ $headers = $this->headerSelector->selectHeaders(
+ ['*/*', ],
+ $contentType,
+ $multipart
+ );
+
+ // for model (json/xml)
+ if (isset($voice_clone_param)) {
+ if (stripos($headers['Content-Type'], 'application/json') !== false) {
+ # if Content-Type contains "application/json", json_encode the body
+ $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($voice_clone_param));
+ } else {
+ $httpBody = $voice_clone_param;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
diff --git a/lib/Model/ExtractTextParam.php b/lib/Model/ExtraContentParam.php
similarity index 98%
rename from lib/Model/ExtractTextParam.php
rename to lib/Model/ExtraContentParam.php
index 4516d5c..b087fb6 100644
--- a/lib/Model/ExtractTextParam.php
+++ b/lib/Model/ExtraContentParam.php
@@ -1,6 +1,6 @@
*/
-class ExtractTextParam implements ModelInterface, ArrayAccess, \JsonSerializable
+class ExtraContentParam implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -50,7 +50,7 @@ class ExtractTextParam implements ModelInterface, ArrayAccess, \JsonSerializable
*
* @var string
*/
- protected static $openAPIModelName = 'ExtractTextParam';
+ protected static $openAPIModelName = 'ExtraContentParam';
/**
* Array of property to type mappings. Used for (de)serialization
diff --git a/lib/Model/ExtractTextResult.php b/lib/Model/ExtractContentResult.php
similarity index 96%
rename from lib/Model/ExtractTextResult.php
rename to lib/Model/ExtractContentResult.php
index 7b67aa8..85aa300 100644
--- a/lib/Model/ExtractTextResult.php
+++ b/lib/Model/ExtractContentResult.php
@@ -1,6 +1,6 @@
*/
-class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializable
+class ExtractContentResult implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -50,7 +50,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
*
* @var string
*/
- protected static $openAPIModelName = 'ExtractTextResult';
+ protected static $openAPIModelName = 'ExtractContentResult';
/**
* Array of property to type mappings. Used for (de)serialization
@@ -58,7 +58,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
* @var string[]
*/
protected static $openAPITypes = [
- 'text' => 'string',
+ 'text' => 'string[]',
'pictures' => '\OpenAPI\Client\Model\PictureInfo[]'
];
@@ -300,7 +300,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
/**
* Gets text
*
- * @return string|null
+ * @return string[]|null
*/
public function getText()
{
@@ -310,7 +310,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
/**
* Sets text
*
- * @param string|null $text 文本内容
+ * @param string[]|null $text 文本内容
*
* @return self
*/
diff --git a/lib/Model/ResponseOpenAPIExtractContentResult.php b/lib/Model/ResponseOpenAPIExtractContentResult.php
new file mode 100644
index 0000000..8c58965
--- /dev/null
+++ b/lib/Model/ResponseOpenAPIExtractContentResult.php
@@ -0,0 +1,784 @@
+
+ */
+class ResponseOpenAPIExtractContentResult implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'ResponseOpenAPIExtractContentResult';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'time' => 'string',
+ 'openid' => 'string',
+ 'payload' => '\OpenAPI\Client\Model\ExtractContentResult',
+ 'sign' => 'string',
+ 'charset' => 'string',
+ 'description' => 'string',
+ 'response_id' => 'string',
+ 'err_code' => 'int',
+ 'err_msg' => 'string',
+ 'sub_err' => 'int',
+ 'sub_msg' => 'string',
+ 'sign_type' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'time' => null,
+ 'openid' => null,
+ 'payload' => null,
+ 'sign' => null,
+ 'charset' => null,
+ 'description' => null,
+ 'response_id' => null,
+ 'err_code' => 'int32',
+ 'err_msg' => null,
+ 'sub_err' => 'int32',
+ 'sub_msg' => null,
+ 'sign_type' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'time' => false,
+ 'openid' => false,
+ 'payload' => false,
+ 'sign' => false,
+ 'charset' => false,
+ 'description' => false,
+ 'response_id' => false,
+ 'err_code' => false,
+ 'err_msg' => false,
+ 'sub_err' => false,
+ 'sub_msg' => false,
+ 'sign_type' => false
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'time' => 'time',
+ 'openid' => 'openid',
+ 'payload' => 'payload',
+ 'sign' => 'sign',
+ 'charset' => 'charset',
+ 'description' => 'description',
+ 'response_id' => 'response_id',
+ 'err_code' => 'err_code',
+ 'err_msg' => 'err_msg',
+ 'sub_err' => 'sub_err',
+ 'sub_msg' => 'sub_msg',
+ 'sign_type' => 'sign_type'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'time' => 'setTime',
+ 'openid' => 'setOpenid',
+ 'payload' => 'setPayload',
+ 'sign' => 'setSign',
+ 'charset' => 'setCharset',
+ 'description' => 'setDescription',
+ 'response_id' => 'setResponseId',
+ 'err_code' => 'setErrCode',
+ 'err_msg' => 'setErrMsg',
+ 'sub_err' => 'setSubErr',
+ 'sub_msg' => 'setSubMsg',
+ 'sign_type' => 'setSignType'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'time' => 'getTime',
+ 'openid' => 'getOpenid',
+ 'payload' => 'getPayload',
+ 'sign' => 'getSign',
+ 'charset' => 'getCharset',
+ 'description' => 'getDescription',
+ 'response_id' => 'getResponseId',
+ 'err_code' => 'getErrCode',
+ 'err_msg' => 'getErrMsg',
+ 'sub_err' => 'getSubErr',
+ 'sub_msg' => 'getSubMsg',
+ 'sign_type' => 'getSignType'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->setIfExists('time', $data ?? [], null);
+ $this->setIfExists('openid', $data ?? [], null);
+ $this->setIfExists('payload', $data ?? [], null);
+ $this->setIfExists('sign', $data ?? [], null);
+ $this->setIfExists('charset', $data ?? [], null);
+ $this->setIfExists('description', $data ?? [], null);
+ $this->setIfExists('response_id', $data ?? [], null);
+ $this->setIfExists('err_code', $data ?? [], null);
+ $this->setIfExists('err_msg', $data ?? [], null);
+ $this->setIfExists('sub_err', $data ?? [], null);
+ $this->setIfExists('sub_msg', $data ?? [], null);
+ $this->setIfExists('sign_type', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets time
+ *
+ * @return string|null
+ */
+ public function getTime()
+ {
+ return $this->container['time'];
+ }
+
+ /**
+ * Sets time
+ *
+ * @param string|null $time 该消息发生的时间
+ *
+ * @return self
+ */
+ public function setTime($time)
+ {
+ if (is_null($time)) {
+ throw new \InvalidArgumentException('non-nullable time cannot be null');
+ }
+ $this->container['time'] = $time;
+
+ return $this;
+ }
+
+ /**
+ * Gets openid
+ *
+ * @return string|null
+ */
+ public function getOpenid()
+ {
+ return $this->container['openid'];
+ }
+
+ /**
+ * Sets openid
+ *
+ * @param string|null $openid openid
+ *
+ * @return self
+ */
+ public function setOpenid($openid)
+ {
+ if (is_null($openid)) {
+ throw new \InvalidArgumentException('non-nullable openid cannot be null');
+ }
+ $this->container['openid'] = $openid;
+
+ return $this;
+ }
+
+ /**
+ * Gets payload
+ *
+ * @return \OpenAPI\Client\Model\ExtractContentResult|null
+ */
+ public function getPayload()
+ {
+ return $this->container['payload'];
+ }
+
+ /**
+ * Sets payload
+ *
+ * @param \OpenAPI\Client\Model\ExtractContentResult|null $payload payload
+ *
+ * @return self
+ */
+ public function setPayload($payload)
+ {
+ if (is_null($payload)) {
+ throw new \InvalidArgumentException('non-nullable payload cannot be null');
+ }
+ $this->container['payload'] = $payload;
+
+ return $this;
+ }
+
+ /**
+ * Gets sign
+ *
+ * @return string|null
+ */
+ public function getSign()
+ {
+ return $this->container['sign'];
+ }
+
+ /**
+ * Sets sign
+ *
+ * @param string|null $sign sign
+ *
+ * @return self
+ */
+ public function setSign($sign)
+ {
+ if (is_null($sign)) {
+ throw new \InvalidArgumentException('non-nullable sign cannot be null');
+ }
+ $this->container['sign'] = $sign;
+
+ return $this;
+ }
+
+ /**
+ * Gets charset
+ *
+ * @return string|null
+ */
+ public function getCharset()
+ {
+ return $this->container['charset'];
+ }
+
+ /**
+ * Sets charset
+ *
+ * @param string|null $charset charset
+ *
+ * @return self
+ */
+ public function setCharset($charset)
+ {
+ if (is_null($charset)) {
+ throw new \InvalidArgumentException('non-nullable charset cannot be null');
+ }
+ $this->container['charset'] = $charset;
+
+ return $this;
+ }
+
+ /**
+ * Gets description
+ *
+ * @return string|null
+ */
+ public function getDescription()
+ {
+ return $this->container['description'];
+ }
+
+ /**
+ * Sets description
+ *
+ * @param string|null $description description
+ *
+ * @return self
+ */
+ public function setDescription($description)
+ {
+ if (is_null($description)) {
+ throw new \InvalidArgumentException('non-nullable description cannot be null');
+ }
+ $this->container['description'] = $description;
+
+ return $this;
+ }
+
+ /**
+ * Gets response_id
+ *
+ * @return string|null
+ */
+ public function getResponseId()
+ {
+ return $this->container['response_id'];
+ }
+
+ /**
+ * Sets response_id
+ *
+ * @param string|null $response_id 消息的唯一ID
+ *
+ * @return self
+ */
+ public function setResponseId($response_id)
+ {
+ if (is_null($response_id)) {
+ throw new \InvalidArgumentException('non-nullable response_id cannot be null');
+ }
+ $this->container['response_id'] = $response_id;
+
+ return $this;
+ }
+
+ /**
+ * Gets err_code
+ *
+ * @return int|null
+ */
+ public function getErrCode()
+ {
+ return $this->container['err_code'];
+ }
+
+ /**
+ * Sets err_code
+ *
+ * @param int|null $err_code 该消息的错误码
+ *
+ * @return self
+ */
+ public function setErrCode($err_code)
+ {
+ if (is_null($err_code)) {
+ throw new \InvalidArgumentException('non-nullable err_code cannot be null');
+ }
+ $this->container['err_code'] = $err_code;
+
+ return $this;
+ }
+
+ /**
+ * Gets err_msg
+ *
+ * @return string|null
+ */
+ public function getErrMsg()
+ {
+ return $this->container['err_msg'];
+ }
+
+ /**
+ * Sets err_msg
+ *
+ * @param string|null $err_msg 错误消息描述
+ *
+ * @return self
+ */
+ public function setErrMsg($err_msg)
+ {
+ if (is_null($err_msg)) {
+ throw new \InvalidArgumentException('non-nullable err_msg cannot be null');
+ }
+ $this->container['err_msg'] = $err_msg;
+
+ return $this;
+ }
+
+ /**
+ * Gets sub_err
+ *
+ * @return int|null
+ */
+ public function getSubErr()
+ {
+ return $this->container['sub_err'];
+ }
+
+ /**
+ * Sets sub_err
+ *
+ * @param int|null $sub_err 子错误的具体的代号
+ *
+ * @return self
+ */
+ public function setSubErr($sub_err)
+ {
+ if (is_null($sub_err)) {
+ throw new \InvalidArgumentException('non-nullable sub_err cannot be null');
+ }
+ $this->container['sub_err'] = $sub_err;
+
+ return $this;
+ }
+
+ /**
+ * Gets sub_msg
+ *
+ * @return string|null
+ */
+ public function getSubMsg()
+ {
+ return $this->container['sub_msg'];
+ }
+
+ /**
+ * Sets sub_msg
+ *
+ * @param string|null $sub_msg 子错误对应的提示消息
+ *
+ * @return self
+ */
+ public function setSubMsg($sub_msg)
+ {
+ if (is_null($sub_msg)) {
+ throw new \InvalidArgumentException('non-nullable sub_msg cannot be null');
+ }
+ $this->container['sub_msg'] = $sub_msg;
+
+ return $this;
+ }
+
+ /**
+ * Gets sign_type
+ *
+ * @return string|null
+ */
+ public function getSignType()
+ {
+ return $this->container['sign_type'];
+ }
+
+ /**
+ * Sets sign_type
+ *
+ * @param string|null $sign_type sign_type
+ *
+ * @return self
+ */
+ public function setSignType($sign_type)
+ {
+ if (is_null($sign_type)) {
+ throw new \InvalidArgumentException('non-nullable sign_type cannot be null');
+ }
+ $this->container['sign_type'] = $sign_type;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/ResponseOpenAPIExtractTextResult.php b/lib/Model/ResponseOpenAPISpeakerListResult.php
similarity index 97%
rename from lib/Model/ResponseOpenAPIExtractTextResult.php
rename to lib/Model/ResponseOpenAPISpeakerListResult.php
index a86f705..c907a25 100644
--- a/lib/Model/ResponseOpenAPIExtractTextResult.php
+++ b/lib/Model/ResponseOpenAPISpeakerListResult.php
@@ -1,6 +1,6 @@
*/
-class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializable
+class ResponseOpenAPISpeakerListResult implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -50,7 +50,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
*
* @var string
*/
- protected static $openAPIModelName = 'ResponseOpenAPIExtractTextResult';
+ protected static $openAPIModelName = 'ResponseOpenAPISpeakerListResult';
/**
* Array of property to type mappings. Used for (de)serialization
@@ -60,7 +60,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
protected static $openAPITypes = [
'time' => 'string',
'openid' => 'string',
- 'payload' => '\OpenAPI\Client\Model\ExtractTextResult',
+ 'payload' => '\OpenAPI\Client\Model\SpeakerListResult',
'sign' => 'string',
'charset' => 'string',
'description' => 'string',
@@ -424,7 +424,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
/**
* Gets payload
*
- * @return \OpenAPI\Client\Model\ExtractTextResult|null
+ * @return \OpenAPI\Client\Model\SpeakerListResult|null
*/
public function getPayload()
{
@@ -434,7 +434,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
/**
* Sets payload
*
- * @param \OpenAPI\Client\Model\ExtractTextResult|null $payload payload
+ * @param \OpenAPI\Client\Model\SpeakerListResult|null $payload payload
*
* @return self
*/
diff --git a/lib/Model/ResponseOpenAPIVoiceCloneResult.php b/lib/Model/ResponseOpenAPIVoiceCloneResult.php
new file mode 100644
index 0000000..0ffc7d2
--- /dev/null
+++ b/lib/Model/ResponseOpenAPIVoiceCloneResult.php
@@ -0,0 +1,784 @@
+
+ */
+class ResponseOpenAPIVoiceCloneResult implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'ResponseOpenAPIVoiceCloneResult';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'time' => 'string',
+ 'openid' => 'string',
+ 'payload' => '\OpenAPI\Client\Model\VoiceCloneResult',
+ 'sign' => 'string',
+ 'charset' => 'string',
+ 'description' => 'string',
+ 'response_id' => 'string',
+ 'err_code' => 'int',
+ 'err_msg' => 'string',
+ 'sub_err' => 'int',
+ 'sub_msg' => 'string',
+ 'sign_type' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'time' => null,
+ 'openid' => null,
+ 'payload' => null,
+ 'sign' => null,
+ 'charset' => null,
+ 'description' => null,
+ 'response_id' => null,
+ 'err_code' => 'int32',
+ 'err_msg' => null,
+ 'sub_err' => 'int32',
+ 'sub_msg' => null,
+ 'sign_type' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'time' => false,
+ 'openid' => false,
+ 'payload' => false,
+ 'sign' => false,
+ 'charset' => false,
+ 'description' => false,
+ 'response_id' => false,
+ 'err_code' => false,
+ 'err_msg' => false,
+ 'sub_err' => false,
+ 'sub_msg' => false,
+ 'sign_type' => false
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'time' => 'time',
+ 'openid' => 'openid',
+ 'payload' => 'payload',
+ 'sign' => 'sign',
+ 'charset' => 'charset',
+ 'description' => 'description',
+ 'response_id' => 'response_id',
+ 'err_code' => 'err_code',
+ 'err_msg' => 'err_msg',
+ 'sub_err' => 'sub_err',
+ 'sub_msg' => 'sub_msg',
+ 'sign_type' => 'sign_type'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'time' => 'setTime',
+ 'openid' => 'setOpenid',
+ 'payload' => 'setPayload',
+ 'sign' => 'setSign',
+ 'charset' => 'setCharset',
+ 'description' => 'setDescription',
+ 'response_id' => 'setResponseId',
+ 'err_code' => 'setErrCode',
+ 'err_msg' => 'setErrMsg',
+ 'sub_err' => 'setSubErr',
+ 'sub_msg' => 'setSubMsg',
+ 'sign_type' => 'setSignType'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'time' => 'getTime',
+ 'openid' => 'getOpenid',
+ 'payload' => 'getPayload',
+ 'sign' => 'getSign',
+ 'charset' => 'getCharset',
+ 'description' => 'getDescription',
+ 'response_id' => 'getResponseId',
+ 'err_code' => 'getErrCode',
+ 'err_msg' => 'getErrMsg',
+ 'sub_err' => 'getSubErr',
+ 'sub_msg' => 'getSubMsg',
+ 'sign_type' => 'getSignType'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->setIfExists('time', $data ?? [], null);
+ $this->setIfExists('openid', $data ?? [], null);
+ $this->setIfExists('payload', $data ?? [], null);
+ $this->setIfExists('sign', $data ?? [], null);
+ $this->setIfExists('charset', $data ?? [], null);
+ $this->setIfExists('description', $data ?? [], null);
+ $this->setIfExists('response_id', $data ?? [], null);
+ $this->setIfExists('err_code', $data ?? [], null);
+ $this->setIfExists('err_msg', $data ?? [], null);
+ $this->setIfExists('sub_err', $data ?? [], null);
+ $this->setIfExists('sub_msg', $data ?? [], null);
+ $this->setIfExists('sign_type', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets time
+ *
+ * @return string|null
+ */
+ public function getTime()
+ {
+ return $this->container['time'];
+ }
+
+ /**
+ * Sets time
+ *
+ * @param string|null $time 该消息发生的时间
+ *
+ * @return self
+ */
+ public function setTime($time)
+ {
+ if (is_null($time)) {
+ throw new \InvalidArgumentException('non-nullable time cannot be null');
+ }
+ $this->container['time'] = $time;
+
+ return $this;
+ }
+
+ /**
+ * Gets openid
+ *
+ * @return string|null
+ */
+ public function getOpenid()
+ {
+ return $this->container['openid'];
+ }
+
+ /**
+ * Sets openid
+ *
+ * @param string|null $openid openid
+ *
+ * @return self
+ */
+ public function setOpenid($openid)
+ {
+ if (is_null($openid)) {
+ throw new \InvalidArgumentException('non-nullable openid cannot be null');
+ }
+ $this->container['openid'] = $openid;
+
+ return $this;
+ }
+
+ /**
+ * Gets payload
+ *
+ * @return \OpenAPI\Client\Model\VoiceCloneResult|null
+ */
+ public function getPayload()
+ {
+ return $this->container['payload'];
+ }
+
+ /**
+ * Sets payload
+ *
+ * @param \OpenAPI\Client\Model\VoiceCloneResult|null $payload payload
+ *
+ * @return self
+ */
+ public function setPayload($payload)
+ {
+ if (is_null($payload)) {
+ throw new \InvalidArgumentException('non-nullable payload cannot be null');
+ }
+ $this->container['payload'] = $payload;
+
+ return $this;
+ }
+
+ /**
+ * Gets sign
+ *
+ * @return string|null
+ */
+ public function getSign()
+ {
+ return $this->container['sign'];
+ }
+
+ /**
+ * Sets sign
+ *
+ * @param string|null $sign sign
+ *
+ * @return self
+ */
+ public function setSign($sign)
+ {
+ if (is_null($sign)) {
+ throw new \InvalidArgumentException('non-nullable sign cannot be null');
+ }
+ $this->container['sign'] = $sign;
+
+ return $this;
+ }
+
+ /**
+ * Gets charset
+ *
+ * @return string|null
+ */
+ public function getCharset()
+ {
+ return $this->container['charset'];
+ }
+
+ /**
+ * Sets charset
+ *
+ * @param string|null $charset charset
+ *
+ * @return self
+ */
+ public function setCharset($charset)
+ {
+ if (is_null($charset)) {
+ throw new \InvalidArgumentException('non-nullable charset cannot be null');
+ }
+ $this->container['charset'] = $charset;
+
+ return $this;
+ }
+
+ /**
+ * Gets description
+ *
+ * @return string|null
+ */
+ public function getDescription()
+ {
+ return $this->container['description'];
+ }
+
+ /**
+ * Sets description
+ *
+ * @param string|null $description description
+ *
+ * @return self
+ */
+ public function setDescription($description)
+ {
+ if (is_null($description)) {
+ throw new \InvalidArgumentException('non-nullable description cannot be null');
+ }
+ $this->container['description'] = $description;
+
+ return $this;
+ }
+
+ /**
+ * Gets response_id
+ *
+ * @return string|null
+ */
+ public function getResponseId()
+ {
+ return $this->container['response_id'];
+ }
+
+ /**
+ * Sets response_id
+ *
+ * @param string|null $response_id 消息的唯一ID
+ *
+ * @return self
+ */
+ public function setResponseId($response_id)
+ {
+ if (is_null($response_id)) {
+ throw new \InvalidArgumentException('non-nullable response_id cannot be null');
+ }
+ $this->container['response_id'] = $response_id;
+
+ return $this;
+ }
+
+ /**
+ * Gets err_code
+ *
+ * @return int|null
+ */
+ public function getErrCode()
+ {
+ return $this->container['err_code'];
+ }
+
+ /**
+ * Sets err_code
+ *
+ * @param int|null $err_code 该消息的错误码
+ *
+ * @return self
+ */
+ public function setErrCode($err_code)
+ {
+ if (is_null($err_code)) {
+ throw new \InvalidArgumentException('non-nullable err_code cannot be null');
+ }
+ $this->container['err_code'] = $err_code;
+
+ return $this;
+ }
+
+ /**
+ * Gets err_msg
+ *
+ * @return string|null
+ */
+ public function getErrMsg()
+ {
+ return $this->container['err_msg'];
+ }
+
+ /**
+ * Sets err_msg
+ *
+ * @param string|null $err_msg 错误消息描述
+ *
+ * @return self
+ */
+ public function setErrMsg($err_msg)
+ {
+ if (is_null($err_msg)) {
+ throw new \InvalidArgumentException('non-nullable err_msg cannot be null');
+ }
+ $this->container['err_msg'] = $err_msg;
+
+ return $this;
+ }
+
+ /**
+ * Gets sub_err
+ *
+ * @return int|null
+ */
+ public function getSubErr()
+ {
+ return $this->container['sub_err'];
+ }
+
+ /**
+ * Sets sub_err
+ *
+ * @param int|null $sub_err 子错误的具体的代号
+ *
+ * @return self
+ */
+ public function setSubErr($sub_err)
+ {
+ if (is_null($sub_err)) {
+ throw new \InvalidArgumentException('non-nullable sub_err cannot be null');
+ }
+ $this->container['sub_err'] = $sub_err;
+
+ return $this;
+ }
+
+ /**
+ * Gets sub_msg
+ *
+ * @return string|null
+ */
+ public function getSubMsg()
+ {
+ return $this->container['sub_msg'];
+ }
+
+ /**
+ * Sets sub_msg
+ *
+ * @param string|null $sub_msg 子错误对应的提示消息
+ *
+ * @return self
+ */
+ public function setSubMsg($sub_msg)
+ {
+ if (is_null($sub_msg)) {
+ throw new \InvalidArgumentException('non-nullable sub_msg cannot be null');
+ }
+ $this->container['sub_msg'] = $sub_msg;
+
+ return $this;
+ }
+
+ /**
+ * Gets sign_type
+ *
+ * @return string|null
+ */
+ public function getSignType()
+ {
+ return $this->container['sign_type'];
+ }
+
+ /**
+ * Sets sign_type
+ *
+ * @param string|null $sign_type sign_type
+ *
+ * @return self
+ */
+ public function setSignType($sign_type)
+ {
+ if (is_null($sign_type)) {
+ throw new \InvalidArgumentException('non-nullable sign_type cannot be null');
+ }
+ $this->container['sign_type'] = $sign_type;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/Speaker.php b/lib/Model/Speaker.php
new file mode 100644
index 0000000..7728fbd
--- /dev/null
+++ b/lib/Model/Speaker.php
@@ -0,0 +1,512 @@
+
+ */
+class Speaker implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'Speaker';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'name' => 'string',
+ 'sex' => 'string',
+ 'year' => 'string',
+ 'accent' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'name' => null,
+ 'sex' => null,
+ 'year' => null,
+ 'accent' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'name' => false,
+ 'sex' => false,
+ 'year' => false,
+ 'accent' => false
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'name' => 'name',
+ 'sex' => 'sex',
+ 'year' => 'year',
+ 'accent' => 'accent'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'name' => 'setName',
+ 'sex' => 'setSex',
+ 'year' => 'setYear',
+ 'accent' => 'setAccent'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'name' => 'getName',
+ 'sex' => 'getSex',
+ 'year' => 'getYear',
+ 'accent' => 'getAccent'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->setIfExists('name', $data ?? [], null);
+ $this->setIfExists('sex', $data ?? [], null);
+ $this->setIfExists('year', $data ?? [], null);
+ $this->setIfExists('accent', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets name
+ *
+ * @return string|null
+ */
+ public function getName()
+ {
+ return $this->container['name'];
+ }
+
+ /**
+ * Sets name
+ *
+ * @param string|null $name 发音人ID
+ *
+ * @return self
+ */
+ public function setName($name)
+ {
+ if (is_null($name)) {
+ throw new \InvalidArgumentException('non-nullable name cannot be null');
+ }
+ $this->container['name'] = $name;
+
+ return $this;
+ }
+
+ /**
+ * Gets sex
+ *
+ * @return string|null
+ */
+ public function getSex()
+ {
+ return $this->container['sex'];
+ }
+
+ /**
+ * Sets sex
+ *
+ * @param string|null $sex 性别[male(男性),female(女性)]
+ *
+ * @return self
+ */
+ public function setSex($sex)
+ {
+ if (is_null($sex)) {
+ throw new \InvalidArgumentException('non-nullable sex cannot be null');
+ }
+ $this->container['sex'] = $sex;
+
+ return $this;
+ }
+
+ /**
+ * Gets year
+ *
+ * @return string|null
+ */
+ public function getYear()
+ {
+ return $this->container['year'];
+ }
+
+ /**
+ * Sets year
+ *
+ * @param string|null $year 年龄等级[A(小于14岁),B(14~25岁),C(26~40岁),D(大于41岁)]
+ *
+ * @return self
+ */
+ public function setYear($year)
+ {
+ if (is_null($year)) {
+ throw new \InvalidArgumentException('non-nullable year cannot be null');
+ }
+ $this->container['year'] = $year;
+
+ return $this;
+ }
+
+ /**
+ * Gets accent
+ *
+ * @return string|null
+ */
+ public function getAccent()
+ {
+ return $this->container['accent'];
+ }
+
+ /**
+ * Sets accent
+ *
+ * @param string|null $accent 口音[north(北方),south(南方)]
+ *
+ * @return self
+ */
+ public function setAccent($accent)
+ {
+ if (is_null($accent)) {
+ throw new \InvalidArgumentException('non-nullable accent cannot be null');
+ }
+ $this->container['accent'] = $accent;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/SpeakerListResult.php b/lib/Model/SpeakerListResult.php
new file mode 100644
index 0000000..938b660
--- /dev/null
+++ b/lib/Model/SpeakerListResult.php
@@ -0,0 +1,410 @@
+
+ */
+class SpeakerListResult implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'SpeakerListResult';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'speaker_list' => '\OpenAPI\Client\Model\Speaker[]'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'speaker_list' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'speaker_list' => false
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'speaker_list' => 'speakerList'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'speaker_list' => 'setSpeakerList'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'speaker_list' => 'getSpeakerList'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->setIfExists('speaker_list', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets speaker_list
+ *
+ * @return \OpenAPI\Client\Model\Speaker[]|null
+ */
+ public function getSpeakerList()
+ {
+ return $this->container['speaker_list'];
+ }
+
+ /**
+ * Sets speaker_list
+ *
+ * @param \OpenAPI\Client\Model\Speaker[]|null $speaker_list 发音人列表
+ *
+ * @return self
+ */
+ public function setSpeakerList($speaker_list)
+ {
+ if (is_null($speaker_list)) {
+ throw new \InvalidArgumentException('non-nullable speaker_list cannot be null');
+ }
+ $this->container['speaker_list'] = $speaker_list;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/VoiceCloneParam.php b/lib/Model/VoiceCloneParam.php
new file mode 100644
index 0000000..42e0895
--- /dev/null
+++ b/lib/Model/VoiceCloneParam.php
@@ -0,0 +1,620 @@
+
+ */
+class VoiceCloneParam implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'VoiceCloneParam';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'text' => 'string',
+ 'wav' => 'string',
+ 'type' => 'string',
+ 'speaker' => 'string',
+ 'volume' => 'int',
+ 'speed' => 'float',
+ 'tone' => 'float'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'text' => null,
+ 'wav' => null,
+ 'type' => null,
+ 'speaker' => null,
+ 'volume' => 'int32',
+ 'speed' => 'float',
+ 'tone' => 'float'
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'text' => false,
+ 'wav' => false,
+ 'type' => false,
+ 'speaker' => false,
+ 'volume' => false,
+ 'speed' => false,
+ 'tone' => false
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'text' => 'text',
+ 'wav' => 'wav',
+ 'type' => 'type',
+ 'speaker' => 'speaker',
+ 'volume' => 'volume',
+ 'speed' => 'speed',
+ 'tone' => 'tone'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'text' => 'setText',
+ 'wav' => 'setWav',
+ 'type' => 'setType',
+ 'speaker' => 'setSpeaker',
+ 'volume' => 'setVolume',
+ 'speed' => 'setSpeed',
+ 'tone' => 'setTone'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'text' => 'getText',
+ 'wav' => 'getWav',
+ 'type' => 'getType',
+ 'speaker' => 'getSpeaker',
+ 'volume' => 'getVolume',
+ 'speed' => 'getSpeed',
+ 'tone' => 'getTone'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->setIfExists('text', $data ?? [], null);
+ $this->setIfExists('wav', $data ?? [], null);
+ $this->setIfExists('type', $data ?? [], null);
+ $this->setIfExists('speaker', $data ?? [], null);
+ $this->setIfExists('volume', $data ?? [], null);
+ $this->setIfExists('speed', $data ?? [], null);
+ $this->setIfExists('tone', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ if ($this->container['text'] === null) {
+ $invalidProperties[] = "'text' can't be null";
+ }
+ if ($this->container['type'] === null) {
+ $invalidProperties[] = "'type' can't be null";
+ }
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets text
+ *
+ * @return string
+ */
+ public function getText()
+ {
+ return $this->container['text'];
+ }
+
+ /**
+ * Sets text
+ *
+ * @param string $text 需要合成音频的文本
+ *
+ * @return self
+ */
+ public function setText($text)
+ {
+ if (is_null($text)) {
+ throw new \InvalidArgumentException('non-nullable text cannot be null');
+ }
+ $this->container['text'] = $text;
+
+ return $this;
+ }
+
+ /**
+ * Gets wav
+ *
+ * @return string|null
+ */
+ public function getWav()
+ {
+ return $this->container['wav'];
+ }
+
+ /**
+ * Sets wav
+ *
+ * @param string|null $wav 要克隆的音频文件URL地址,当type为custom该字段有效
+ *
+ * @return self
+ */
+ public function setWav($wav)
+ {
+ if (is_null($wav)) {
+ throw new \InvalidArgumentException('non-nullable wav cannot be null');
+ }
+ $this->container['wav'] = $wav;
+
+ return $this;
+ }
+
+ /**
+ * Gets type
+ *
+ * @return string
+ */
+ public function getType()
+ {
+ return $this->container['type'];
+ }
+
+ /**
+ * Sets type
+ *
+ * @param string $type 克隆类型,可选值[sys(系统预设), custom(用户自定义)]
+ *
+ * @return self
+ */
+ public function setType($type)
+ {
+ if (is_null($type)) {
+ throw new \InvalidArgumentException('non-nullable type cannot be null');
+ }
+ $this->container['type'] = $type;
+
+ return $this;
+ }
+
+ /**
+ * Gets speaker
+ *
+ * @return string|null
+ */
+ public function getSpeaker()
+ {
+ return $this->container['speaker'];
+ }
+
+ /**
+ * Sets speaker
+ *
+ * @param string|null $speaker 发音人,当type为sys该字段有效
+ *
+ * @return self
+ */
+ public function setSpeaker($speaker)
+ {
+ if (is_null($speaker)) {
+ throw new \InvalidArgumentException('non-nullable speaker cannot be null');
+ }
+ $this->container['speaker'] = $speaker;
+
+ return $this;
+ }
+
+ /**
+ * Gets volume
+ *
+ * @return int|null
+ */
+ public function getVolume()
+ {
+ return $this->container['volume'];
+ }
+
+ /**
+ * Sets volume
+ *
+ * @param int|null $volume 音量,可选值[0 ~ 100] 默认50
+ *
+ * @return self
+ */
+ public function setVolume($volume)
+ {
+ if (is_null($volume)) {
+ throw new \InvalidArgumentException('non-nullable volume cannot be null');
+ }
+ $this->container['volume'] = $volume;
+
+ return $this;
+ }
+
+ /**
+ * Gets speed
+ *
+ * @return float|null
+ */
+ public function getSpeed()
+ {
+ return $this->container['speed'];
+ }
+
+ /**
+ * Sets speed
+ *
+ * @param float|null $speed 语速,倍速,可选值[0.5, 1, 1.5, 2, 2.5] 默认1
+ *
+ * @return self
+ */
+ public function setSpeed($speed)
+ {
+ if (is_null($speed)) {
+ throw new \InvalidArgumentException('non-nullable speed cannot be null');
+ }
+ $this->container['speed'] = $speed;
+
+ return $this;
+ }
+
+ /**
+ * Gets tone
+ *
+ * @return float|null
+ */
+ public function getTone()
+ {
+ return $this->container['tone'];
+ }
+
+ /**
+ * Sets tone
+ *
+ * @param float|null $tone 音调,可选值[-1 ~ 1] 默认0
+ *
+ * @return self
+ */
+ public function setTone($tone)
+ {
+ if (is_null($tone)) {
+ throw new \InvalidArgumentException('non-nullable tone cannot be null');
+ }
+ $this->container['tone'] = $tone;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/lib/Model/VoiceCloneResult.php b/lib/Model/VoiceCloneResult.php
new file mode 100644
index 0000000..d04369b
--- /dev/null
+++ b/lib/Model/VoiceCloneResult.php
@@ -0,0 +1,444 @@
+
+ */
+class VoiceCloneResult implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'VoiceCloneResult';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'wav' => 'string',
+ 'speaker' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'wav' => null,
+ 'speaker' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'wav' => false,
+ 'speaker' => false
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPITypes()
+ {
+ return self::$openAPITypes;
+ }
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @return array
+ */
+ public static function openAPIFormats()
+ {
+ return self::$openAPIFormats;
+ }
+
+ /**
+ * Array of nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'wav' => 'wav',
+ 'speaker' => 'speaker'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'wav' => 'setWav',
+ 'speaker' => 'setSpeaker'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'wav' => 'getWav',
+ 'speaker' => 'getSpeaker'
+ ];
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @return array
+ */
+ public static function attributeMap()
+ {
+ return self::$attributeMap;
+ }
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @return array
+ */
+ public static function setters()
+ {
+ return self::$setters;
+ }
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @return array
+ */
+ public static function getters()
+ {
+ return self::$getters;
+ }
+
+ /**
+ * The original name of the model.
+ *
+ * @return string
+ */
+ public function getModelName()
+ {
+ return self::$openAPIModelName;
+ }
+
+
+ /**
+ * Associative array for storing property values
+ *
+ * @var mixed[]
+ */
+ protected $container = [];
+
+ /**
+ * Constructor
+ *
+ * @param mixed[] $data Associated array of property values
+ * initializing the model
+ */
+ public function __construct(array $data = null)
+ {
+ $this->setIfExists('wav', $data ?? [], null);
+ $this->setIfExists('speaker', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ return $invalidProperties;
+ }
+
+ /**
+ * Validate all the properties in the model
+ * return true if all passed
+ *
+ * @return bool True if all properties are valid
+ */
+ public function valid()
+ {
+ return count($this->listInvalidProperties()) === 0;
+ }
+
+
+ /**
+ * Gets wav
+ *
+ * @return string|null
+ */
+ public function getWav()
+ {
+ return $this->container['wav'];
+ }
+
+ /**
+ * Sets wav
+ *
+ * @param string|null $wav 生成的音频文件地址
+ *
+ * @return self
+ */
+ public function setWav($wav)
+ {
+ if (is_null($wav)) {
+ throw new \InvalidArgumentException('non-nullable wav cannot be null');
+ }
+ $this->container['wav'] = $wav;
+
+ return $this;
+ }
+
+ /**
+ * Gets speaker
+ *
+ * @return string|null
+ */
+ public function getSpeaker()
+ {
+ return $this->container['speaker'];
+ }
+
+ /**
+ * Sets speaker
+ *
+ * @param string|null $speaker 是否成功 success/fail
+ *
+ * @return self
+ */
+ public function setSpeaker($speaker)
+ {
+ if (is_null($speaker)) {
+ throw new \InvalidArgumentException('non-nullable speaker cannot be null');
+ }
+ $this->container['speaker'] = $speaker;
+
+ return $this;
+ }
+ /**
+ * Returns true if offset exists. False otherwise.
+ *
+ * @param integer $offset Offset
+ *
+ * @return boolean
+ */
+ public function offsetExists($offset): bool
+ {
+ return isset($this->container[$offset]);
+ }
+
+ /**
+ * Gets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return mixed|null
+ */
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset)
+ {
+ return $this->container[$offset] ?? null;
+ }
+
+ /**
+ * Sets value based on offset.
+ *
+ * @param int|null $offset Offset
+ * @param mixed $value Value to be set
+ *
+ * @return void
+ */
+ public function offsetSet($offset, $value): void
+ {
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
+ }
+
+ /**
+ * Unsets offset.
+ *
+ * @param integer $offset Offset
+ *
+ * @return void
+ */
+ public function offsetUnset($offset): void
+ {
+ unset($this->container[$offset]);
+ }
+
+ /**
+ * Serializes the object to a value that can be serialized natively by json_encode().
+ * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
+ *
+ * @return mixed Returns data which can be serialized by json_encode(), which is a value
+ * of any type other than a resource.
+ */
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize()
+ {
+ return ObjectSerializer::sanitizeForSerialization($this);
+ }
+
+ /**
+ * Gets the string presentation of the object
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return json_encode(
+ ObjectSerializer::sanitizeForSerialization($this),
+ JSON_PRETTY_PRINT
+ );
+ }
+
+ /**
+ * Gets a header-safe presentation of the object
+ *
+ * @return string
+ */
+ public function toHeaderValue()
+ {
+ return json_encode(ObjectSerializer::sanitizeForSerialization($this));
+ }
+}
+
+
diff --git a/test/Api/AiApiTest.php b/test/Api/AiApiTest.php
index 3569808..5787d5c 100644
--- a/test/Api/AiApiTest.php
+++ b/test/Api/AiApiTest.php
@@ -84,12 +84,24 @@ class AiApiTest extends TestCase
}
/**
- * Test case for extractText
+ * Test case for extractContent
*
* 元梦ai-提取上传文件的内容.
*
*/
- public function testExtractText()
+ public function testExtractContent()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test case for speakerList
+ *
+ * 元梦ai-获取发音人列表.
+ *
+ */
+ public function testSpeakerList()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
@@ -106,4 +118,16 @@ class AiApiTest extends TestCase
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
+
+ /**
+ * Test case for voiceClone
+ *
+ * 元梦ai-语音克隆.
+ *
+ */
+ public function testVoiceClone()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
}
diff --git a/test/Model/ExtractTextParamTest.php b/test/Model/ExtraContentParamTest.php
similarity index 90%
rename from test/Model/ExtractTextParamTest.php
rename to test/Model/ExtraContentParamTest.php
index c9b6fcf..30121b2 100644
--- a/test/Model/ExtractTextParamTest.php
+++ b/test/Model/ExtraContentParamTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
diff --git a/test/Model/ExtractTextResultTest.php b/test/Model/ExtractContentResultTest.php
similarity index 89%
rename from test/Model/ExtractTextResultTest.php
rename to test/Model/ExtractContentResultTest.php
index 37ca3b4..7d65202 100644
--- a/test/Model/ExtractTextResultTest.php
+++ b/test/Model/ExtractContentResultTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
diff --git a/test/Model/ResponseOpenAPIExtractContentResultTest.php b/test/Model/ResponseOpenAPIExtractContentResultTest.php
new file mode 100644
index 0000000..ba65bb4
--- /dev/null
+++ b/test/Model/ResponseOpenAPIExtractContentResultTest.php
@@ -0,0 +1,189 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "time"
+ */
+ public function testPropertyTime()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "openid"
+ */
+ public function testPropertyOpenid()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "payload"
+ */
+ public function testPropertyPayload()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sign"
+ */
+ public function testPropertySign()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "charset"
+ */
+ public function testPropertyCharset()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "description"
+ */
+ public function testPropertyDescription()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "response_id"
+ */
+ public function testPropertyResponseId()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "err_code"
+ */
+ public function testPropertyErrCode()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "err_msg"
+ */
+ public function testPropertyErrMsg()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sub_err"
+ */
+ public function testPropertySubErr()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sub_msg"
+ */
+ public function testPropertySubMsg()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sign_type"
+ */
+ public function testPropertySignType()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/ResponseOpenAPIExtractTextResultTest.php b/test/Model/ResponseOpenAPISpeakerListResultTest.php
similarity index 93%
rename from test/Model/ResponseOpenAPIExtractTextResultTest.php
rename to test/Model/ResponseOpenAPISpeakerListResultTest.php
index f27a83a..9411800 100644
--- a/test/Model/ResponseOpenAPIExtractTextResultTest.php
+++ b/test/Model/ResponseOpenAPISpeakerListResultTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
diff --git a/test/Model/ResponseOpenAPIVoiceCloneResultTest.php b/test/Model/ResponseOpenAPIVoiceCloneResultTest.php
new file mode 100644
index 0000000..2f55dbc
--- /dev/null
+++ b/test/Model/ResponseOpenAPIVoiceCloneResultTest.php
@@ -0,0 +1,189 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "time"
+ */
+ public function testPropertyTime()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "openid"
+ */
+ public function testPropertyOpenid()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "payload"
+ */
+ public function testPropertyPayload()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sign"
+ */
+ public function testPropertySign()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "charset"
+ */
+ public function testPropertyCharset()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "description"
+ */
+ public function testPropertyDescription()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "response_id"
+ */
+ public function testPropertyResponseId()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "err_code"
+ */
+ public function testPropertyErrCode()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "err_msg"
+ */
+ public function testPropertyErrMsg()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sub_err"
+ */
+ public function testPropertySubErr()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sub_msg"
+ */
+ public function testPropertySubMsg()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sign_type"
+ */
+ public function testPropertySignType()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/SpeakerListResultTest.php b/test/Model/SpeakerListResultTest.php
new file mode 100644
index 0000000..2ea7b0a
--- /dev/null
+++ b/test/Model/SpeakerListResultTest.php
@@ -0,0 +1,90 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "speaker_list"
+ */
+ public function testPropertySpeakerList()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/SpeakerTest.php b/test/Model/SpeakerTest.php
new file mode 100644
index 0000000..416e394
--- /dev/null
+++ b/test/Model/SpeakerTest.php
@@ -0,0 +1,117 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "name"
+ */
+ public function testPropertyName()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "sex"
+ */
+ public function testPropertySex()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "year"
+ */
+ public function testPropertyYear()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "accent"
+ */
+ public function testPropertyAccent()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/VoiceCloneParamTest.php b/test/Model/VoiceCloneParamTest.php
new file mode 100644
index 0000000..eab55a4
--- /dev/null
+++ b/test/Model/VoiceCloneParamTest.php
@@ -0,0 +1,144 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "text"
+ */
+ public function testPropertyText()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "wav"
+ */
+ public function testPropertyWav()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "type"
+ */
+ public function testPropertyType()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "speaker"
+ */
+ public function testPropertySpeaker()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "volume"
+ */
+ public function testPropertyVolume()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "speed"
+ */
+ public function testPropertySpeed()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "tone"
+ */
+ public function testPropertyTone()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}
diff --git a/test/Model/VoiceCloneResultTest.php b/test/Model/VoiceCloneResultTest.php
new file mode 100644
index 0000000..adde99b
--- /dev/null
+++ b/test/Model/VoiceCloneResultTest.php
@@ -0,0 +1,99 @@
+markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "wav"
+ */
+ public function testPropertyWav()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
+ /**
+ * Test attribute "speaker"
+ */
+ public function testPropertySpeaker()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+}