代码修改后的版本,全部提交

This commit is contained in:
ss001
2026-02-07 15:48:27 +08:00
parent cccbaa37c9
commit c2cda58c65
15604 changed files with 2455502 additions and 0 deletions

View File

@@ -0,0 +1,492 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614
{
using Newtonsoft.Json;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Asr.V20190614.Models;
public class AsrClient : AbstractClient{
private const string endpoint = "asr.tencentcloudapi.com";
private const string version = "2019-06-14";
/// <summary>
/// Client constructor.
/// </summary>
/// <param name="credential">Credentials.</param>
/// <param name="region">Region name, such as "ap-guangzhou".</param>
public AsrClient(Credential credential, string region)
: this(credential, region, new ClientProfile())
{
}
/// <summary>
/// Client Constructor.
/// </summary>
/// <param name="credential">Credentials.</param>
/// <param name="region">Region name, such as "ap-guangzhou".</param>
/// <param name="profile">Client profiles.</param>
public AsrClient(Credential credential, string region, ClientProfile profile)
: base(endpoint, version, credential, region, profile)
{
}
/// <summary>
/// 用户通过本接口进行热词表的创建。
/// <br>• 默认最多可创建30个热词表。
/// <br>• 每个热词表最多可添加128个词每个词最长10个字不能超出限制。
/// <br>• 热词表可以通过数组或者本地文件形式上传。
/// <br>• 本地文件必须为UTF-8编码格式每行仅添加一个热词且不能包含标点和特殊字符。
/// <br>• 热词权重取值范围为[1,10]之间的整数,权重越大代表该词被识别出来的概率越大。
/// </summary>
/// <param name="req"><see cref="CreateAsrVocabRequest"/></param>
/// <returns><see cref="CreateAsrVocabResponse"/></returns>
public async Task<CreateAsrVocabResponse> CreateAsrVocab(CreateAsrVocabRequest req)
{
JsonResponseModel<CreateAsrVocabResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "CreateAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<CreateAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行热词表的创建。
/// <br>• 默认最多可创建30个热词表。
/// <br>• 每个热词表最多可添加128个词每个词最长10个字不能超出限制。
/// <br>• 热词表可以通过数组或者本地文件形式上传。
/// <br>• 本地文件必须为UTF-8编码格式每行仅添加一个热词且不能包含标点和特殊字符。
/// <br>• 热词权重取值范围为[1,10]之间的整数,权重越大代表该词被识别出来的概率越大。
/// </summary>
/// <param name="req"><see cref="CreateAsrVocabRequest"/></param>
/// <returns><see cref="CreateAsrVocabResponse"/></returns>
public CreateAsrVocabResponse CreateAsrVocabSync(CreateAsrVocabRequest req)
{
JsonResponseModel<CreateAsrVocabResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "CreateAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<CreateAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 本接口服务对录音时长1小时以内的录音文件进行识别异步返回识别全部结果。
/// <br>• 接口是 HTTP RESTful 形式
/// <br>• 接口支持wav、mp3、silk、amr、m4a等主流音频格式
/// <br>• 支持语音 URL 和本地语音文件两种请求方式
/// <br>• 本地语音文件上传的文件不能大于5MB语音 URL的音频时长不能长于1小时
/// <br>• 支持中文普通话、英语和粤语。
/// <br>• 支持回调或轮询的方式获取结果,结果获取请参考[ 录音文件识别结果查询](https://cloud.tencent.com/document/product/1093/37822)。
/// </summary>
/// <param name="req"><see cref="CreateRecTaskRequest"/></param>
/// <returns><see cref="CreateRecTaskResponse"/></returns>
public async Task<CreateRecTaskResponse> CreateRecTask(CreateRecTaskRequest req)
{
JsonResponseModel<CreateRecTaskResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "CreateRecTask");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<CreateRecTaskResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 本接口服务对录音时长1小时以内的录音文件进行识别异步返回识别全部结果。
/// <br>• 接口是 HTTP RESTful 形式
/// <br>• 接口支持wav、mp3、silk、amr、m4a等主流音频格式
/// <br>• 支持语音 URL 和本地语音文件两种请求方式
/// <br>• 本地语音文件上传的文件不能大于5MB语音 URL的音频时长不能长于1小时
/// <br>• 支持中文普通话、英语和粤语。
/// <br>• 支持回调或轮询的方式获取结果,结果获取请参考[ 录音文件识别结果查询](https://cloud.tencent.com/document/product/1093/37822)。
/// </summary>
/// <param name="req"><see cref="CreateRecTaskRequest"/></param>
/// <returns><see cref="CreateRecTaskResponse"/></returns>
public CreateRecTaskResponse CreateRecTaskSync(CreateRecTaskRequest req)
{
JsonResponseModel<CreateRecTaskResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "CreateRecTask");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<CreateRecTaskResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行热词表的删除。
/// </summary>
/// <param name="req"><see cref="DeleteAsrVocabRequest"/></param>
/// <returns><see cref="DeleteAsrVocabResponse"/></returns>
public async Task<DeleteAsrVocabResponse> DeleteAsrVocab(DeleteAsrVocabRequest req)
{
JsonResponseModel<DeleteAsrVocabResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DeleteAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DeleteAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行热词表的删除。
/// </summary>
/// <param name="req"><see cref="DeleteAsrVocabRequest"/></param>
/// <returns><see cref="DeleteAsrVocabResponse"/></returns>
public DeleteAsrVocabResponse DeleteAsrVocabSync(DeleteAsrVocabRequest req)
{
JsonResponseModel<DeleteAsrVocabResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DeleteAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DeleteAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 在调用录音文件识别请求接口后,有回调和轮询两种方式获取识别结果。
/// <br>• 当采用回调方式时,识别完成后会将结果通过 POST 请求的形式通知到用户在请求时填写的回调 URL具体请参见[ 录音识别结果回调 ](https://cloud.tencent.com/document/product/1093/37139#callback)。
/// <br>• 当采用轮询方式时需要主动提交任务ID来轮询识别结果共有任务成功、等待、执行中和失败四种结果具体信息请参见下文说明。
/// </summary>
/// <param name="req"><see cref="DescribeTaskStatusRequest"/></param>
/// <returns><see cref="DescribeTaskStatusResponse"/></returns>
public async Task<DescribeTaskStatusResponse> DescribeTaskStatus(DescribeTaskStatusRequest req)
{
JsonResponseModel<DescribeTaskStatusResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeTaskStatus");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeTaskStatusResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 在调用录音文件识别请求接口后,有回调和轮询两种方式获取识别结果。
/// <br>• 当采用回调方式时,识别完成后会将结果通过 POST 请求的形式通知到用户在请求时填写的回调 URL具体请参见[ 录音识别结果回调 ](https://cloud.tencent.com/document/product/1093/37139#callback)。
/// <br>• 当采用轮询方式时需要主动提交任务ID来轮询识别结果共有任务成功、等待、执行中和失败四种结果具体信息请参见下文说明。
/// </summary>
/// <param name="req"><see cref="DescribeTaskStatusRequest"/></param>
/// <returns><see cref="DescribeTaskStatusResponse"/></returns>
public DescribeTaskStatusResponse DescribeTaskStatusSync(DescribeTaskStatusRequest req)
{
JsonResponseModel<DescribeTaskStatusResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeTaskStatus");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeTaskStatusResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行热词表的下载,获得词表权重文件形式的 base64 值,文件形式为通过 “|” 分割的词和权重,即 word|weight 的形式。
/// </summary>
/// <param name="req"><see cref="DownloadAsrVocabRequest"/></param>
/// <returns><see cref="DownloadAsrVocabResponse"/></returns>
public async Task<DownloadAsrVocabResponse> DownloadAsrVocab(DownloadAsrVocabRequest req)
{
JsonResponseModel<DownloadAsrVocabResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DownloadAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DownloadAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行热词表的下载,获得词表权重文件形式的 base64 值,文件形式为通过 “|” 分割的词和权重,即 word|weight 的形式。
/// </summary>
/// <param name="req"><see cref="DownloadAsrVocabRequest"/></param>
/// <returns><see cref="DownloadAsrVocabResponse"/></returns>
public DownloadAsrVocabResponse DownloadAsrVocabSync(DownloadAsrVocabRequest req)
{
JsonResponseModel<DownloadAsrVocabResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DownloadAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DownloadAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户根据词表的ID可以获取对应的热词表信息
/// </summary>
/// <param name="req"><see cref="GetAsrVocabRequest"/></param>
/// <returns><see cref="GetAsrVocabResponse"/></returns>
public async Task<GetAsrVocabResponse> GetAsrVocab(GetAsrVocabRequest req)
{
JsonResponseModel<GetAsrVocabResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "GetAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户根据词表的ID可以获取对应的热词表信息
/// </summary>
/// <param name="req"><see cref="GetAsrVocabRequest"/></param>
/// <returns><see cref="GetAsrVocabResponse"/></returns>
public GetAsrVocabResponse GetAsrVocabSync(GetAsrVocabRequest req)
{
JsonResponseModel<GetAsrVocabResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "GetAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过该接口,可获得所有的热词表及其信息。
/// </summary>
/// <param name="req"><see cref="GetAsrVocabListRequest"/></param>
/// <returns><see cref="GetAsrVocabListResponse"/></returns>
public async Task<GetAsrVocabListResponse> GetAsrVocabList(GetAsrVocabListRequest req)
{
JsonResponseModel<GetAsrVocabListResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "GetAsrVocabList");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetAsrVocabListResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过该接口,可获得所有的热词表及其信息。
/// </summary>
/// <param name="req"><see cref="GetAsrVocabListRequest"/></param>
/// <returns><see cref="GetAsrVocabListResponse"/></returns>
public GetAsrVocabListResponse GetAsrVocabListSync(GetAsrVocabListRequest req)
{
JsonResponseModel<GetAsrVocabListResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "GetAsrVocabList");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetAsrVocabListResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 本接口用于对60秒之内的短音频文件进行识别。
/// <br>• 支持中文普通话、英语、粤语。
/// <br>• 支持本地语音文件上传和语音URL上传两种请求方式。
/// <br>• 音频格式支持wav、mp3采样率支持8000Hz或者16000Hz采样精度支持16bits声道支持单声道。
/// <br>• 当音频文件通过请求中body内容上传时请求大小不能超过600KB当音频以URL方式传输时音频时长不可超过60s。
/// <br>• 所有请求参数放在POST请求的body中编码类型采用x-www-form-urlencoded参数进行urlencode编码后传输。
/// </summary>
/// <param name="req"><see cref="SentenceRecognitionRequest"/></param>
/// <returns><see cref="SentenceRecognitionResponse"/></returns>
public async Task<SentenceRecognitionResponse> SentenceRecognition(SentenceRecognitionRequest req)
{
JsonResponseModel<SentenceRecognitionResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "SentenceRecognition");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceRecognitionResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 本接口用于对60秒之内的短音频文件进行识别。
/// <br>• 支持中文普通话、英语、粤语。
/// <br>• 支持本地语音文件上传和语音URL上传两种请求方式。
/// <br>• 音频格式支持wav、mp3采样率支持8000Hz或者16000Hz采样精度支持16bits声道支持单声道。
/// <br>• 当音频文件通过请求中body内容上传时请求大小不能超过600KB当音频以URL方式传输时音频时长不可超过60s。
/// <br>• 所有请求参数放在POST请求的body中编码类型采用x-www-form-urlencoded参数进行urlencode编码后传输。
/// </summary>
/// <param name="req"><see cref="SentenceRecognitionRequest"/></param>
/// <returns><see cref="SentenceRecognitionResponse"/></returns>
public SentenceRecognitionResponse SentenceRecognitionSync(SentenceRecognitionRequest req)
{
JsonResponseModel<SentenceRecognitionResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "SentenceRecognition");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceRecognitionResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过该接口可以设置热词表的默认状态。初始状态为0用户可设置状态为1即为默认状态。默认状态表示用户在请求识别时如不设置热词表ID则默认使用状态为1的热词表。
/// </summary>
/// <param name="req"><see cref="SetVocabStateRequest"/></param>
/// <returns><see cref="SetVocabStateResponse"/></returns>
public async Task<SetVocabStateResponse> SetVocabState(SetVocabStateRequest req)
{
JsonResponseModel<SetVocabStateResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "SetVocabState");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SetVocabStateResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过该接口可以设置热词表的默认状态。初始状态为0用户可设置状态为1即为默认状态。默认状态表示用户在请求识别时如不设置热词表ID则默认使用状态为1的热词表。
/// </summary>
/// <param name="req"><see cref="SetVocabStateRequest"/></param>
/// <returns><see cref="SetVocabStateResponse"/></returns>
public SetVocabStateResponse SetVocabStateSync(SetVocabStateRequest req)
{
JsonResponseModel<SetVocabStateResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "SetVocabState");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SetVocabStateResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行对应的词表信息更新。
/// </summary>
/// <param name="req"><see cref="UpdateAsrVocabRequest"/></param>
/// <returns><see cref="UpdateAsrVocabResponse"/></returns>
public async Task<UpdateAsrVocabResponse> UpdateAsrVocab(UpdateAsrVocabRequest req)
{
JsonResponseModel<UpdateAsrVocabResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "UpdateAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<UpdateAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
/// <summary>
/// 用户通过本接口进行对应的词表信息更新。
/// </summary>
/// <param name="req"><see cref="UpdateAsrVocabRequest"/></param>
/// <returns><see cref="UpdateAsrVocabResponse"/></returns>
public UpdateAsrVocabResponse UpdateAsrVocabSync(UpdateAsrVocabRequest req)
{
JsonResponseModel<UpdateAsrVocabResponse> rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "UpdateAsrVocab");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<UpdateAsrVocabResponse>>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
}
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class CreateAsrVocabRequest : AbstractModel
{
/// <summary>
/// 热词表名称长度在1-255之间
/// </summary>
[JsonProperty("Name")]
public string Name{ get; set; }
/// <summary>
/// 热词表描述长度在0-1000之间
/// </summary>
[JsonProperty("Description")]
public string Description{ get; set; }
/// <summary>
/// 词权重数组包含全部的热词和对应的权重。每个热词的长度不大于10权重为[1,10]之间整数数组长度不大于128
/// </summary>
[JsonProperty("WordWeights")]
public HotWord[] WordWeights{ get; set; }
/// <summary>
/// 词权重文件纯文本文件的二进制base64编码以行分隔每行的格式为word|weight即以英文符号|为分割,左边为词,右边为权重,如:你好|5。
/// 当用户传此参数参数长度大于0即以此参数解析词权重WordWeights会被忽略
/// </summary>
[JsonProperty("WordWeightStr")]
public string WordWeightStr{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Name", this.Name);
this.SetParamSimple(map, prefix + "Description", this.Description);
this.SetParamArrayObj(map, prefix + "WordWeights.", this.WordWeights);
this.SetParamSimple(map, prefix + "WordWeightStr", this.WordWeightStr);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class CreateAsrVocabResponse : AbstractModel
{
/// <summary>
/// 词表ID可用于获取词表信息
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,119 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class CreateRecTaskRequest : AbstractModel
{
/// <summary>
/// 引擎模型类型。
/// 8k_zh电话 8k 中文普通话通用,可用于双声道音频的识别;
/// 8k_zh_s电话 8k 中文普通话话者分离,仅用于单声道;
/// 16k_zh16k 中文普通话通用;
/// 16k_en16k 英语;
/// 16k_ca16k 粤语;
/// 16k_zh_video16k 音视频领域模型。
/// </summary>
[JsonProperty("EngineModelType")]
public string EngineModelType{ get; set; }
/// <summary>
/// 语音声道数。1单声道2双声道仅支持 8k_zh 引擎模型)。
/// </summary>
[JsonProperty("ChannelNum")]
public ulong? ChannelNum{ get; set; }
/// <summary>
/// 识别结果返回形式。0 识别结果文本(含分段时间戳) 1仅支持16k中文引擎含识别结果详情(词时间戳列表,一般用于生成字幕场景)。
/// </summary>
[JsonProperty("ResTextFormat")]
public ulong? ResTextFormat{ get; set; }
/// <summary>
/// 语音数据来源。0语音 URL1语音数据post body
/// </summary>
[JsonProperty("SourceType")]
public ulong? SourceType{ get; set; }
/// <summary>
/// 回调 URL用户自行搭建的用于接收识别结果的服务器地址 长度小于2048字节。如果用户使用回调方式获取识别结果需提交该参数如果用户使用轮询方式获取识别结果则无需提交该参数。
/// </summary>
[JsonProperty("CallbackUrl")]
public string CallbackUrl{ get; set; }
/// <summary>
/// 语音的URL地址需要公网可下载。长度小于2048字节当 SourceType 值为 0 时须填写该字段,为 1 时不需要填写。注意:请确保录音文件时长在一个小时之内,否则可能识别失败。请保证文件的下载速度,否则可能下载失败。
/// </summary>
[JsonProperty("Url")]
public string Url{ get; set; }
/// <summary>
/// 语音数据当SourceType 值为1时必须填写为0可不写。要base64编码(采用python语言时注意读取文件应该为string而不是byte以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。音频数据要小于5MB。
/// </summary>
[JsonProperty("Data")]
public string Data{ get; set; }
/// <summary>
/// 数据长度,当 SourceType 值为1时必须填写为0可不写此数据长度为数据未进行base64编码时的数据长度
/// </summary>
[JsonProperty("DataLen")]
public ulong? DataLen{ get; set; }
/// <summary>
/// 热词id。用于调用对应的热词表如果在调用语音识别服务时不进行单独的热词id设置自动生效默认热词如果进行了单独的热词id设置那么将生效单独设置的热词id。
/// </summary>
[JsonProperty("HotwordId")]
public string HotwordId{ get; set; }
/// <summary>
/// 是否过滤脏词目前支持中文普通话引擎。0不过滤脏词1过滤脏词2将脏词替换为 * 。
/// </summary>
[JsonProperty("FilterDirty")]
public long? FilterDirty{ get; set; }
/// <summary>
/// 是否过语气词目前支持中文普通话引擎。0不过滤语气词1部分过滤2严格过滤 。
/// </summary>
[JsonProperty("FilterModal")]
public long? FilterModal{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "EngineModelType", this.EngineModelType);
this.SetParamSimple(map, prefix + "ChannelNum", this.ChannelNum);
this.SetParamSimple(map, prefix + "ResTextFormat", this.ResTextFormat);
this.SetParamSimple(map, prefix + "SourceType", this.SourceType);
this.SetParamSimple(map, prefix + "CallbackUrl", this.CallbackUrl);
this.SetParamSimple(map, prefix + "Url", this.Url);
this.SetParamSimple(map, prefix + "Data", this.Data);
this.SetParamSimple(map, prefix + "DataLen", this.DataLen);
this.SetParamSimple(map, prefix + "HotwordId", this.HotwordId);
this.SetParamSimple(map, prefix + "FilterDirty", this.FilterDirty);
this.SetParamSimple(map, prefix + "FilterModal", this.FilterModal);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class CreateRecTaskResponse : AbstractModel
{
/// <summary>
/// 录音文件识别的请求返回结果包含结果查询需要的TaskId
/// </summary>
[JsonProperty("Data")]
public Task Data{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamObj(map, prefix + "Data.", this.Data);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DeleteAsrVocabRequest : AbstractModel
{
/// <summary>
/// 热词表Id
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DeleteAsrVocabResponse : AbstractModel
{
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DescribeTaskStatusRequest : AbstractModel
{
/// <summary>
/// 从CreateRecTask接口获取的TaskId用于获取任务状态与结果。
/// </summary>
[JsonProperty("TaskId")]
public ulong? TaskId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "TaskId", this.TaskId);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DescribeTaskStatusResponse : AbstractModel
{
/// <summary>
/// 录音文件识别的请求返回结果。
/// </summary>
[JsonProperty("Data")]
public TaskStatus Data{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamObj(map, prefix + "Data.", this.Data);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DownloadAsrVocabRequest : AbstractModel
{
/// <summary>
/// 词表ID。
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
}
}
}

View File

@@ -0,0 +1,57 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class DownloadAsrVocabResponse : AbstractModel
{
/// <summary>
/// 词表ID。
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 词表权重文件形式的base64值。
/// </summary>
[JsonProperty("WordWeightStr")]
public string WordWeightStr{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamSimple(map, prefix + "WordWeightStr", this.WordWeightStr);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class GetAsrVocabListRequest : AbstractModel
{
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class GetAsrVocabListResponse : AbstractModel
{
/// <summary>
/// 热词表列表
/// </summary>
[JsonProperty("VocabList")]
public Vocab[] VocabList{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamArrayObj(map, prefix + "VocabList.", this.VocabList);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class GetAsrVocabRequest : AbstractModel
{
/// <summary>
/// 热词表ID
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
}
}
}

View File

@@ -0,0 +1,92 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class GetAsrVocabResponse : AbstractModel
{
/// <summary>
/// 热词表名称
/// </summary>
[JsonProperty("Name")]
public string Name{ get; set; }
/// <summary>
/// 热词表描述
/// </summary>
[JsonProperty("Description")]
public string Description{ get; set; }
/// <summary>
/// 热词表ID
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 词权重列表
/// </summary>
[JsonProperty("WordWeights")]
public HotWord[] WordWeights{ get; set; }
/// <summary>
/// 词表创建时间
/// </summary>
[JsonProperty("CreateTime")]
public string CreateTime{ get; set; }
/// <summary>
/// 词表更新时间
/// </summary>
[JsonProperty("UpdateTime")]
public string UpdateTime{ get; set; }
/// <summary>
/// 热词表状态1为默认状态即在识别时默认加载该热词表进行识别0为初始状态
/// </summary>
[JsonProperty("State")]
public long? State{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Name", this.Name);
this.SetParamSimple(map, prefix + "Description", this.Description);
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamArrayObj(map, prefix + "WordWeights.", this.WordWeights);
this.SetParamSimple(map, prefix + "CreateTime", this.CreateTime);
this.SetParamSimple(map, prefix + "UpdateTime", this.UpdateTime);
this.SetParamSimple(map, prefix + "State", this.State);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class HotWord : AbstractModel
{
/// <summary>
/// 热词
/// </summary>
[JsonProperty("Word")]
public string Word{ get; set; }
/// <summary>
/// 权重
/// </summary>
[JsonProperty("Weight")]
public long? Weight{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Word", this.Word);
this.SetParamSimple(map, prefix + "Weight", this.Weight);
}
}
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SentenceDetail : AbstractModel
{
/// <summary>
/// 单句最终识别结果
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("FinalSentence")]
public string FinalSentence{ get; set; }
/// <summary>
/// 单句中间识别结果,使用空格拆分为多个词
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("SliceSentence")]
public string SliceSentence{ get; set; }
/// <summary>
/// 单句开始时间(毫秒)
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("StartMs")]
public long? StartMs{ get; set; }
/// <summary>
/// 单句结束时间(毫秒)
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("EndMs")]
public long? EndMs{ get; set; }
/// <summary>
/// 单句中词个数
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("WordsNum")]
public long? WordsNum{ get; set; }
/// <summary>
/// 单句中词详情
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("Words")]
public SentenceWords[] Words{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "FinalSentence", this.FinalSentence);
this.SetParamSimple(map, prefix + "SliceSentence", this.SliceSentence);
this.SetParamSimple(map, prefix + "StartMs", this.StartMs);
this.SetParamSimple(map, prefix + "EndMs", this.EndMs);
this.SetParamSimple(map, prefix + "WordsNum", this.WordsNum);
this.SetParamArrayObj(map, prefix + "Words.", this.Words);
}
}
}

View File

@@ -0,0 +1,131 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SentenceRecognitionRequest : AbstractModel
{
/// <summary>
/// 腾讯云项目 ID可填 0总长度不超过 1024 字节。
/// </summary>
[JsonProperty("ProjectId")]
public ulong? ProjectId{ get; set; }
/// <summary>
/// 子服务类型。2 一句话识别。
/// </summary>
[JsonProperty("SubServiceType")]
public ulong? SubServiceType{ get; set; }
/// <summary>
/// 引擎模型类型。
/// 8k_zh电话 8k 中文普通话通用;
/// 16k_zh16k 中文普通话通用;
/// 16k_en16k 英语;
/// 16k_ca16k 粤语。
/// </summary>
[JsonProperty("EngSerViceType")]
public string EngSerViceType{ get; set; }
/// <summary>
/// 语音数据来源。0语音 URL1语音数据post body
/// </summary>
[JsonProperty("SourceType")]
public ulong? SourceType{ get; set; }
/// <summary>
/// 识别音频的音频格式。mp3、wav。
/// </summary>
[JsonProperty("VoiceFormat")]
public string VoiceFormat{ get; set; }
/// <summary>
/// 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
/// </summary>
[JsonProperty("UsrAudioKey")]
public string UsrAudioKey{ get; set; }
/// <summary>
/// 语音 URL公网可下载。当 SourceType 值为 0语音 URL上传 时须填写该字段,为 1 时不填URL 的长度大于 0小于 2048需进行urlencode编码。音频时间长度要小于60s。
/// </summary>
[JsonProperty("Url")]
public string Url{ get; set; }
/// <summary>
/// 语音数据当SourceType 值为1本地语音数据上传时必须填写当SourceType 值为0语音 URL上传可不写。要使用base64编码(采用python语言时注意读取文件应该为string而不是byte以byte格式读取后要decode()。编码后的数据不可带有回车换行符)。音频数据要小于600KB。
/// </summary>
[JsonProperty("Data")]
public string Data{ get; set; }
/// <summary>
/// 数据长度,单位为字节。当 SourceType 值为1本地语音数据上传时必须填写当 SourceType 值为0语音 URL上传可不写此数据长度为数据未进行base64编码时的数据长度
/// </summary>
[JsonProperty("DataLen")]
public long? DataLen{ get; set; }
/// <summary>
/// 热词id。用于调用对应的热词表如果在调用语音识别服务时不进行单独的热词id设置自动生效默认热词如果进行了单独的热词id设置那么将生效单独设置的热词id。
/// </summary>
[JsonProperty("HotwordId")]
public string HotwordId{ get; set; }
/// <summary>
/// 是否过滤脏词目前支持中文普通话引擎。0不过滤脏词1过滤脏词2将脏词替换为 * 。
/// </summary>
[JsonProperty("FilterDirty")]
public long? FilterDirty{ get; set; }
/// <summary>
/// 是否过语气词目前支持中文普通话引擎。0不过滤语气词1部分过滤2严格过滤 。
/// </summary>
[JsonProperty("FilterModal")]
public long? FilterModal{ get; set; }
/// <summary>
/// 是否过滤句末的句号目前支持中文普通话引擎。0不过滤句末的句号1过滤句末的句号。
/// </summary>
[JsonProperty("FilterPunc")]
public long? FilterPunc{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.SetParamSimple(map, prefix + "SubServiceType", this.SubServiceType);
this.SetParamSimple(map, prefix + "EngSerViceType", this.EngSerViceType);
this.SetParamSimple(map, prefix + "SourceType", this.SourceType);
this.SetParamSimple(map, prefix + "VoiceFormat", this.VoiceFormat);
this.SetParamSimple(map, prefix + "UsrAudioKey", this.UsrAudioKey);
this.SetParamSimple(map, prefix + "Url", this.Url);
this.SetParamSimple(map, prefix + "Data", this.Data);
this.SetParamSimple(map, prefix + "DataLen", this.DataLen);
this.SetParamSimple(map, prefix + "HotwordId", this.HotwordId);
this.SetParamSimple(map, prefix + "FilterDirty", this.FilterDirty);
this.SetParamSimple(map, prefix + "FilterModal", this.FilterModal);
this.SetParamSimple(map, prefix + "FilterPunc", this.FilterPunc);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SentenceRecognitionResponse : AbstractModel
{
/// <summary>
/// 识别结果。
/// </summary>
[JsonProperty("Result")]
public string Result{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Result", this.Result);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SentenceWords : AbstractModel
{
/// <summary>
/// 词文本
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("Word")]
public string Word{ get; set; }
/// <summary>
/// 在句子中的开始时间偏移量
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("OffsetStartMs")]
public long? OffsetStartMs{ get; set; }
/// <summary>
/// 在句子中的结束时间偏移量
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("OffsetEndMs")]
public long? OffsetEndMs{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Word", this.Word);
this.SetParamSimple(map, prefix + "OffsetStartMs", this.OffsetStartMs);
this.SetParamSimple(map, prefix + "OffsetEndMs", this.OffsetEndMs);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SetVocabStateRequest : AbstractModel
{
/// <summary>
/// 热词表ID。
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 热词表状态1设为默认状态0设为非默认状态。
/// </summary>
[JsonProperty("State")]
public long? State{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamSimple(map, prefix + "State", this.State);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class SetVocabStateResponse : AbstractModel
{
/// <summary>
/// 热词表ID
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class Task : AbstractModel
{
/// <summary>
/// 任务ID可通过此ID在轮询接口获取识别状态与结果
/// </summary>
[JsonProperty("TaskId")]
public ulong? TaskId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "TaskId", this.TaskId);
}
}
}

View File

@@ -0,0 +1,79 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class TaskStatus : AbstractModel
{
/// <summary>
/// 任务标识。
/// </summary>
[JsonProperty("TaskId")]
public ulong? TaskId{ get; set; }
/// <summary>
/// 任务状态码0任务等待1任务执行中2任务成功3任务失败。
/// </summary>
[JsonProperty("Status")]
public long? Status{ get; set; }
/// <summary>
/// 任务状态waiting任务等待doing任务执行中success任务成功failed任务失败。
/// </summary>
[JsonProperty("StatusStr")]
public string StatusStr{ get; set; }
/// <summary>
/// 识别结果。
/// </summary>
[JsonProperty("Result")]
public string Result{ get; set; }
/// <summary>
/// 失败原因说明。
/// </summary>
[JsonProperty("ErrorMsg")]
public string ErrorMsg{ get; set; }
/// <summary>
/// 识别结果详情,包含每个句子中的词时间偏移,一般用于生成字幕的场景。(录音识别请求中ResTextFormat=1时该字段不为空)
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("ResultDetail")]
public SentenceDetail[] ResultDetail{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "TaskId", this.TaskId);
this.SetParamSimple(map, prefix + "Status", this.Status);
this.SetParamSimple(map, prefix + "StatusStr", this.StatusStr);
this.SetParamSimple(map, prefix + "Result", this.Result);
this.SetParamSimple(map, prefix + "ErrorMsg", this.ErrorMsg);
this.SetParamArrayObj(map, prefix + "ResultDetail.", this.ResultDetail);
}
}
}

View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class UpdateAsrVocabRequest : AbstractModel
{
/// <summary>
/// 热词表ID
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 热词表名称
/// </summary>
[JsonProperty("Name")]
public string Name{ get; set; }
/// <summary>
/// 词权重数组包含全部的热词和对应的权重。每个热词的长度不大于10权重为[1,10]之间整数数组长度不大于128
/// </summary>
[JsonProperty("WordWeights")]
public HotWord[] WordWeights{ get; set; }
/// <summary>
/// 词权重文件纯文本文件的二进制base64编码以行分隔每行的格式为word|weight即以英文符号|为分割,左边为词,右边为权重,如:你好|5。
/// 当用户传此参数参数长度大于0即以此参数解析词权重WordWeights会被忽略
/// </summary>
[JsonProperty("WordWeightStr")]
public string WordWeightStr{ get; set; }
/// <summary>
/// 热词表描述
/// </summary>
[JsonProperty("Description")]
public string Description{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamSimple(map, prefix + "Name", this.Name);
this.SetParamArrayObj(map, prefix + "WordWeights.", this.WordWeights);
this.SetParamSimple(map, prefix + "WordWeightStr", this.WordWeightStr);
this.SetParamSimple(map, prefix + "Description", this.Description);
}
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class UpdateAsrVocabResponse : AbstractModel
{
/// <summary>
/// 热词表ID
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 唯一请求 ID每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
/// </summary>
[JsonProperty("RequestId")]
public string RequestId{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Asr.V20190614.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class Vocab : AbstractModel
{
/// <summary>
/// 热词表名称
/// </summary>
[JsonProperty("Name")]
public string Name{ get; set; }
/// <summary>
/// 热词表描述
/// </summary>
[JsonProperty("Description")]
public string Description{ get; set; }
/// <summary>
/// 热词表ID
/// </summary>
[JsonProperty("VocabId")]
public string VocabId{ get; set; }
/// <summary>
/// 词权重列表
/// </summary>
[JsonProperty("WordWeights")]
public HotWord[] WordWeights{ get; set; }
/// <summary>
/// 词表创建时间
/// </summary>
[JsonProperty("CreateTime")]
public string CreateTime{ get; set; }
/// <summary>
/// 词表更新时间
/// </summary>
[JsonProperty("UpdateTime")]
public string UpdateTime{ get; set; }
/// <summary>
/// 热词表状态1为默认状态即在识别时默认加载该热词表进行识别0为初始状态
/// </summary>
[JsonProperty("State")]
public long? State{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "Name", this.Name);
this.SetParamSimple(map, prefix + "Description", this.Description);
this.SetParamSimple(map, prefix + "VocabId", this.VocabId);
this.SetParamArrayObj(map, prefix + "WordWeights.", this.WordWeights);
this.SetParamSimple(map, prefix + "CreateTime", this.CreateTime);
this.SetParamSimple(map, prefix + "UpdateTime", this.UpdateTime);
this.SetParamSimple(map, prefix + "State", this.State);
}
}
}