@@ -220,7 +220,7 @@ type MediaProcessJobOperation struct {
220220 Tag string `xml:"Tag,omitempty"`
221221 Output * JobOutput `xml:"Output,omitempty"`
222222 Transcode * Transcode `xml:"Transcode,omitempty"`
223- Watermark * Watermark `xml:"Watermark,omitempty"`
223+ Watermark [] Watermark `xml:"Watermark,omitempty"`
224224 TemplateId string `xml:"TemplateId,omitempty"`
225225 WatermarkTemplateId []string `xml:"WatermarkTemplateId,omitempty"`
226226 ConcatTemplate * ConcatTemplate `xml:"ConcatTemplate,omitempty"`
@@ -977,3 +977,87 @@ func (s *CIService) DescribeWorkflowExecution(ctx context.Context, runId string)
977977 resp , err := s .client .send (ctx , & sendOpt )
978978 return & res , resp , err
979979}
980+
981+ type SpeechRecognition struct {
982+ ChannelNum string `xml:"ChannelNum,omitempty"`
983+ ConvertNumMode string `xml:"ConvertNumMode,omitempty"`
984+ EngineModelType string `xml:"EngineModelType,omitempty"`
985+ FilterDirty string `xml:"FilterDirty,omitempty"`
986+ FilterModal string `xml:"FilterModal,omitempty"`
987+ ResTextFormat string `xml:"ResTextFormat,omitempty"`
988+ }
989+
990+ type SpeechRecognitionResult struct {
991+ AudioTime float64 `xml:"AudioTime,omitempty"`
992+ Result []string `xml:"Result,omitempty"`
993+ }
994+ type ASRJobOperation struct {
995+ Tag string `xml:"Tag,omitempty"`
996+ Output * JobOutput `xml:"Output,omitempty"`
997+ SpeechRecognition * SpeechRecognition `xml:"SpeechRecognition,omitempty"`
998+ SpeechRecognitionResult * SpeechRecognitionResult `xml:"SpeechRecognitionResult,omitempty"`
999+ }
1000+
1001+ type CreateASRJobsOptions struct {
1002+ XMLName xml.Name `xml:"Request"`
1003+ Tag string `xml:"Tag,omitempty"`
1004+ Input * JobInput `xml:"Input,omitempty"`
1005+ Operation * ASRJobOperation `xml:"Operation,omitempty"`
1006+ QueueId string `xml:"QueueId,omitempty"`
1007+ CallBack string `xml:"CallBack,omitempty"`
1008+ }
1009+
1010+ type ASRJobDetail struct {
1011+ Code string `xml:"Code,omitempty"`
1012+ Message string `xml:"Message,omitempty"`
1013+ JobId string `xml:"JobId,omitempty"`
1014+ Tag string `xml:"Tag,omitempty"`
1015+ State string `xml:"State,omitempty"`
1016+ CreationTime string `xml:"CreationTime,omitempty"`
1017+ QueueId string `xml:"QueueId,omitempty"`
1018+ Input * JobInput `xml:"Input,omitempty"`
1019+ Operation * ASRJobOperation `xml:"Operation,omitempty"`
1020+ }
1021+
1022+ type CreateASRJobsResult struct {
1023+ XMLName xml.Name `xml:"Response"`
1024+ JobsDetail * ASRJobDetail `xml:"JobsDetail,omitempty"`
1025+ }
1026+
1027+ func (s * CIService ) CreateASRJobs (ctx context.Context , opt * CreateASRJobsOptions ) (* CreateASRJobsResult , * Response , error ) {
1028+ var res CreateASRJobsResult
1029+ sendOpt := sendOptions {
1030+ baseURL : s .client .BaseURL .CIURL ,
1031+ uri : "/asr_jobs" ,
1032+ method : http .MethodPost ,
1033+ body : opt ,
1034+ result : & res ,
1035+ }
1036+ resp , err := s .client .send (ctx , & sendOpt )
1037+ return & res , resp , err
1038+ }
1039+
1040+ type DescribeMutilASRJobResult struct {
1041+ XMLName xml.Name `xml:"Response"`
1042+ JobsDetail []ASRJobDetail `xml:"JobsDetail,omitempty"`
1043+ NonExistJobIds []string `xml:"NonExistJobIds,omitempty"`
1044+ }
1045+
1046+ func (s * CIService ) DescribeMultiASRJob (ctx context.Context , jobids []string ) (* DescribeMutilASRJobResult , * Response , error ) {
1047+ jobidsStr := ""
1048+ if len (jobids ) < 1 {
1049+ return nil , nil , errors .New ("empty param jobids" )
1050+ } else {
1051+ jobidsStr = strings .Join (jobids , "," )
1052+ }
1053+
1054+ var res DescribeMutilASRJobResult
1055+ sendOpt := sendOptions {
1056+ baseURL : s .client .BaseURL .CIURL ,
1057+ uri : "/asr_jobs/" + jobidsStr ,
1058+ method : http .MethodGet ,
1059+ result : & res ,
1060+ }
1061+ resp , err := s .client .send (ctx , & sendOpt )
1062+ return & res , resp , err
1063+ }
0 commit comments