|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 4 | + * or more contributor license agreements. See the NOTICE file |
| 5 | + * distributed with this work for additional information |
| 6 | + * regarding copyright ownership. The ASF licenses this file |
| 7 | + * to you under the Apache License, Version 2.0 (the |
| 8 | + * "License"); you may not use this file except in compliance |
| 9 | + * with the License. You may obtain a copy of the License at |
| 10 | + * |
| 11 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | + * |
| 13 | + * Unless required by applicable law or agreed to in writing, |
| 14 | + * software distributed under the License is distributed on an |
| 15 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | + * KIND, either express or implied. See the License for the |
| 17 | + * specific language governing permissions and limitations |
| 18 | + * under the License. |
| 19 | + */ |
| 20 | +namespace TencentCloud\Aai\V20180522\Models; |
| 21 | +use TencentCloud\Common\AbstractModel; |
| 22 | + |
| 23 | +/** |
| 24 | + * @method integer getProjectId() 获取腾讯云项目 ID,可填 0,总长度不超过 1024 字节。 |
| 25 | + * @method void setProjectId(integer $ProjectId) 设置腾讯云项目 ID,可填 0,总长度不超过 1024 字节。 |
| 26 | + * @method integer getSubServiceType() 获取子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。 |
| 27 | + * @method void setSubServiceType(integer $SubServiceType) 设置子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。 |
| 28 | + * @method string getEngSerViceType() 获取引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。 |
| 29 | + * @method void setEngSerViceType(string $EngSerViceType) 设置引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。 |
| 30 | + * @method integer getSourceType() 获取语音数据来源。0:语音 URL;1:语音数据(post body)。 |
| 31 | + * @method void setSourceType(integer $SourceType) 设置语音数据来源。0:语音 URL;1:语音数据(post body)。 |
| 32 | + * @method string getUrl() 获取语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。 |
| 33 | + * @method void setUrl(string $Url) 设置语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。 |
| 34 | + * @method string getVoiceFormat() 获取识别音频的音频格式(支持mp3,wav)。 |
| 35 | + * @method void setVoiceFormat(string $VoiceFormat) 设置识别音频的音频格式(支持mp3,wav)。 |
| 36 | + * @method string getUsrAudioKey() 获取用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。 |
| 37 | + * @method void setUsrAudioKey(string $UsrAudioKey) 设置用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。 |
| 38 | + * @method string getData() 获取语音数据,当SourceType 值为1时必须填写,为0可不写。 |
| 39 | + * @method void setData(string $Data) 设置语音数据,当SourceType 值为1时必须填写,为0可不写。 |
| 40 | + * @method integer getDataLen() 获取数据长度,当 SourceType 值为1时必须填写,为0可不写。 |
| 41 | + * @method void setDataLen(integer $DataLen) 设置数据长度,当 SourceType 值为1时必须填写,为0可不写。 |
| 42 | + */ |
| 43 | + |
| 44 | +/** |
| 45 | + *SentenceRecognition请求参数结构体 |
| 46 | + */ |
| 47 | +class SentenceRecognitionRequest extends AbstractModel |
| 48 | +{ |
| 49 | + /** |
| 50 | + * @var integer 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。 |
| 51 | + */ |
| 52 | + public $ProjectId; |
| 53 | + |
| 54 | + /** |
| 55 | + * @var integer 子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。 |
| 56 | + */ |
| 57 | + public $SubServiceType; |
| 58 | + |
| 59 | + /** |
| 60 | + * @var string 引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。 |
| 61 | + */ |
| 62 | + public $EngSerViceType; |
| 63 | + |
| 64 | + /** |
| 65 | + * @var integer 语音数据来源。0:语音 URL;1:语音数据(post body)。 |
| 66 | + */ |
| 67 | + public $SourceType; |
| 68 | + |
| 69 | + /** |
| 70 | + * @var string 语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。 |
| 71 | + */ |
| 72 | + public $Url; |
| 73 | + |
| 74 | + /** |
| 75 | + * @var string 识别音频的音频格式(支持mp3,wav)。 |
| 76 | + */ |
| 77 | + public $VoiceFormat; |
| 78 | + |
| 79 | + /** |
| 80 | + * @var string 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。 |
| 81 | + */ |
| 82 | + public $UsrAudioKey; |
| 83 | + |
| 84 | + /** |
| 85 | + * @var string 语音数据,当SourceType 值为1时必须填写,为0可不写。 |
| 86 | + */ |
| 87 | + public $Data; |
| 88 | + |
| 89 | + /** |
| 90 | + * @var integer 数据长度,当 SourceType 值为1时必须填写,为0可不写。 |
| 91 | + */ |
| 92 | + public $DataLen; |
| 93 | + /** |
| 94 | + * @param integer $ProjectId 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。 |
| 95 | + * @param integer $SubServiceType 子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。 |
| 96 | + * @param string $EngSerViceType 引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。 |
| 97 | + * @param integer $SourceType 语音数据来源。0:语音 URL;1:语音数据(post body)。 |
| 98 | + * @param string $Url 语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。 |
| 99 | + * @param string $VoiceFormat 识别音频的音频格式(支持mp3,wav)。 |
| 100 | + * @param string $UsrAudioKey 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。 |
| 101 | + * @param string $Data 语音数据,当SourceType 值为1时必须填写,为0可不写。 |
| 102 | + * @param integer $DataLen 数据长度,当 SourceType 值为1时必须填写,为0可不写。 |
| 103 | + */ |
| 104 | + function __construct() |
| 105 | + { |
| 106 | + |
| 107 | + } |
| 108 | + /** |
| 109 | + * 内部实现,用户禁止调用 |
| 110 | + */ |
| 111 | + public function deserialize($param) |
| 112 | + { |
| 113 | + if ($param === null) { |
| 114 | + return; |
| 115 | + } |
| 116 | + if (array_key_exists("ProjectId",$param) and $param["ProjectId"] !== null) { |
| 117 | + $this->ProjectId = $param["ProjectId"]; |
| 118 | + } |
| 119 | + |
| 120 | + if (array_key_exists("SubServiceType",$param) and $param["SubServiceType"] !== null) { |
| 121 | + $this->SubServiceType = $param["SubServiceType"]; |
| 122 | + } |
| 123 | + |
| 124 | + if (array_key_exists("EngSerViceType",$param) and $param["EngSerViceType"] !== null) { |
| 125 | + $this->EngSerViceType = $param["EngSerViceType"]; |
| 126 | + } |
| 127 | + |
| 128 | + if (array_key_exists("SourceType",$param) and $param["SourceType"] !== null) { |
| 129 | + $this->SourceType = $param["SourceType"]; |
| 130 | + } |
| 131 | + |
| 132 | + if (array_key_exists("Url",$param) and $param["Url"] !== null) { |
| 133 | + $this->Url = $param["Url"]; |
| 134 | + } |
| 135 | + |
| 136 | + if (array_key_exists("VoiceFormat",$param) and $param["VoiceFormat"] !== null) { |
| 137 | + $this->VoiceFormat = $param["VoiceFormat"]; |
| 138 | + } |
| 139 | + |
| 140 | + if (array_key_exists("UsrAudioKey",$param) and $param["UsrAudioKey"] !== null) { |
| 141 | + $this->UsrAudioKey = $param["UsrAudioKey"]; |
| 142 | + } |
| 143 | + |
| 144 | + if (array_key_exists("Data",$param) and $param["Data"] !== null) { |
| 145 | + $this->Data = $param["Data"]; |
| 146 | + } |
| 147 | + |
| 148 | + if (array_key_exists("DataLen",$param) and $param["DataLen"] !== null) { |
| 149 | + $this->DataLen = $param["DataLen"]; |
| 150 | + } |
| 151 | + } |
| 152 | +} |
0 commit comments