API | Description |
Querying a speech recognition queue | Queries a speech recognition queue. |
Updating a speech recognition queue | Updates a speech recognition queue. |
QCloudGetAudioDiscernTaskQueueRequest * request = [[QCloudGetAudioDiscernTaskQueueRequest alloc]init];// Bucket name in the format of `BucketName-APPID`request.bucket = @"examplebucket-1250000000";request.regionName = @"regionName";// Queue ID. If you enter multiple IDs, separate them by comma.request.queueIds = @"1,2,3";// 1. Active: Jobs in the queue will be scheduled and executed by the speech recognition service.// 2. Paused: The queue is paused, and jobs in it will no longer be scheduled and executed. All jobs in the queue will remain in the `Paused` status, while jobs being executed will continue without being affected.request.state = 1;request.finishBlock = ^(QCloudAudioAsrqueueResult * outputObject, NSError *error) {// The moderation result `outputObject` contains the job ID used for query. For detailed fields, see the API documentation or SDK source code.// `QCloudAudioAsrqueueResult` class};[[QCloudCOSXMLService defaultCOSXML] GetAudioDiscernTaskQueue:request];
let request = QCloudGetAudioDiscernTaskQueueRequest.init();// Bucket name in the format of `BucketName-APPID`request.bucket = "examplebucket-1250000000";request.regionName = "regionName";// Queue ID. If you enter multiple IDs, separate them by comma.request.queueIds = "1,2,3";// 1. Active: Jobs in the queue will be scheduled and executed by the speech recognition service.// 2. Paused: The queue is paused, and jobs in it will no longer be scheduled and executed. All jobs in the queue will remain in the `Paused` status, while jobs being executed will continue without being affected.request.state = 1;request.setFinish { outputObject, error in// The moderation result `outputObject` contains the job ID used for query. For detailed fields, see the API documentation or SDK source code.// `QCloudAudioAsrqueueResult` class};QCloudCOSXMLService.defaultCOSXML().getAudioDiscernTaskQueue(request);
QCloudUpdateAudioDiscernTaskQueueRequest * request = [[QCloudUpdateAudioDiscernTaskQueueRequest alloc]init];// Bucket name in the format of `BucketName-APPID`request.bucket = @"examplebucket-1250000000";request.regionName = @"regionName";// Template namerequest.name = @"name";// 1. Active: Jobs in the queue will be scheduled and executed by the speech recognition service.// 2. Paused: The queue is paused, and jobs in it will no longer be scheduled and executed. All jobs in the queue will remain in the `Paused` status, while jobs being executed will continue without being affected.request.state = 1;// Queue IDrequest.queueID = @"queueID";// For other parameters, see the SDK documentation or source code comments.request.finishBlock = ^(QCloudAudioAsrqueueUpdateResult * outputObject, NSError *error) {// `outputObject`. For detailed fields, see the API documentation or SDK source code.// `QCloudAudioAsrqueueUpdateResult` class};[[QCloudCOSXMLService defaultCOSXML] UpdateAudioDiscernTaskQueue:request];
let request = QCloudUpdateAudioDiscernTaskQueueRequest.init();// Bucket name in the format of `BucketName-APPID`request.bucket = "examplebucket-1250000000";request.regionName = "regionName";// Template namerequest.name = "name";// 1. Active: Jobs in the queue will be scheduled and executed by the speech recognition service.// 2. Paused: The queue is paused, and jobs in it will no longer be scheduled and executed. All jobs in the queue will remain in the `Paused` status, while jobs being executed will continue without being affected.request.state = 1;// Queue IDrequest.queueID = "queueID";// For other parameters, see the SDK documentation or source code comments.request.setFinish { outputObject, error in// `outputObject`. For detailed fields, see the API documentation or SDK source code.// `QCloudAudioAsrqueueUpdateResult` class};QCloudCOSXMLService.defaultCOSXML().updateAudioDiscernTaskQueue(request);
Was this page helpful?