AWSTranscribe Class Reference

Inherits from AWSService : NSObject
Declared in AWSTranscribeService.h
AWSTranscribeService.m

Overview

Operations and objects for transcribing speech to text.

Other Methods

+ defaultTranscribe

Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with defaultServiceConfiguration from [AWSServiceManager defaultServiceManager]. The reference to this object is maintained by the SDK, and you do not need to retain it manually.

+ (instancetype)defaultTranscribe

Return Value

The default service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
    AWSServiceManager.default().defaultServiceConfiguration = configuration

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                      identityPoolId:@"YourIdentityPoolId"];
      AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                           credentialsProvider:credentialsProvider];
      [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;

      return YES;
  }

Then call the following to get the default service client:

Swift

 let Transcribe = AWSTranscribe.default()

Objective-C

 AWSTranscribe *Transcribe = [AWSTranscribe defaultTranscribe];

Declared In

AWSTranscribeService.h

+ registerTranscribeWithConfiguration:forKey:

Creates a service client with the given service configuration and registers it for the key.

+ (void)registerTranscribeWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key

Parameters

configuration

A service configuration object.

key

A string to identify the service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
    AWSTranscribe.register(with: configuration!, forKey: "USWest2Transcribe")

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                     identityPoolId:@"YourIdentityPoolId"];
     AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                          credentialsProvider:credentialsProvider];

     [AWSTranscribe registerTranscribeWithConfiguration:configuration forKey:@"USWest2Transcribe"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let Transcribe = AWSTranscribe(forKey: "USWest2Transcribe")

Objective-C

 AWSTranscribe *Transcribe = [AWSTranscribe TranscribeForKey:@"USWest2Transcribe"];

Warning: After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

Declared In

AWSTranscribeService.h

+ TranscribeForKey:

Retrieves the service client associated with the key. You need to call + registerTranscribeWithConfiguration:forKey: before invoking this method.

+ (instancetype)TranscribeForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Return Value

An instance of the service client.

Discussion

For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

Swift

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
    let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
    AWSTranscribe.register(with: configuration!, forKey: "USWest2Transcribe")

    return true
}

Objective-C

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                     identityPoolId:@"YourIdentityPoolId"];
     AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                          credentialsProvider:credentialsProvider];

     [AWSTranscribe registerTranscribeWithConfiguration:configuration forKey:@"USWest2Transcribe"];

     return YES;
 }

Then call the following to get the service client:

Swift

 let Transcribe = AWSTranscribe(forKey: "USWest2Transcribe")

Objective-C

 AWSTranscribe *Transcribe = [AWSTranscribe TranscribeForKey:@"USWest2Transcribe"];

Declared In

AWSTranscribeService.h

+ removeTranscribeForKey:

Removes the service client associated with the key and release it.

+ (void)removeTranscribeForKey:(NSString *)key

Parameters

key

A string to identify the service client.

Discussion

Warning: Before calling this method, make sure no method is running on this client.

Declared In

AWSTranscribeService.h

– createVocabulary:

Creates a new custom vocabulary that you can use to change the way Amazon Transcribe handles transcription of an audio file.

- (AWSTask<AWSTranscribeCreateVocabularyResponse*> *)createVocabulary:(AWSTranscribeCreateVocabularyRequest *)request

Parameters

request

A container for the necessary parameters to execute the CreateVocabulary service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeCreateVocabularyResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorConflict.

Declared In

AWSTranscribeService.h

– createVocabulary:completionHandler:

Creates a new custom vocabulary that you can use to change the way Amazon Transcribe handles transcription of an audio file.

- (void)createVocabulary:(AWSTranscribeCreateVocabularyRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeCreateVocabularyResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the CreateVocabulary service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorConflict.

Declared In

AWSTranscribeService.h

– deleteTranscriptionJob:

Deletes a previously submitted transcription job along with any other generated results such as the transcription, models, and so on.

- (AWSTask *)deleteTranscriptionJob:(AWSTranscribeDeleteTranscriptionJobRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteTranscriptionJob service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorBadRequest, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– deleteTranscriptionJob:completionHandler:

Deletes a previously submitted transcription job along with any other generated results such as the transcription, models, and so on.

- (void)deleteTranscriptionJob:(AWSTranscribeDeleteTranscriptionJobRequest *)request completionHandler:(void ( ^ ) ( NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteTranscriptionJob service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorBadRequest, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– deleteVocabulary:

Deletes a vocabulary from Amazon Transcribe.

- (AWSTask *)deleteVocabulary:(AWSTranscribeDeleteVocabularyRequest *)request

Parameters

request

A container for the necessary parameters to execute the DeleteVocabulary service method.

Return Value

An instance of AWSTask. On successful execution, task.result will be nil. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorNotFound, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorBadRequest, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– deleteVocabulary:completionHandler:

Deletes a vocabulary from Amazon Transcribe.

- (void)deleteVocabulary:(AWSTranscribeDeleteVocabularyRequest *)request completionHandler:(void ( ^ ) ( NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the DeleteVocabulary service method.

completionHandler

The completion handler to call when the load request is complete. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorNotFound, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorBadRequest, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– getTranscriptionJob:

Returns information about a transcription job. To see the status of the job, check the TranscriptionJobStatus field. If the status is COMPLETED, the job is finished and you can find the results at the location specified in the TranscriptionFileUri field.

- (AWSTask<AWSTranscribeGetTranscriptionJobResponse*> *)getTranscriptionJob:(AWSTranscribeGetTranscriptionJobRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetTranscriptionJob service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeGetTranscriptionJobResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorNotFound.

Declared In

AWSTranscribeService.h

– getTranscriptionJob:completionHandler:

Returns information about a transcription job. To see the status of the job, check the TranscriptionJobStatus field. If the status is COMPLETED, the job is finished and you can find the results at the location specified in the TranscriptionFileUri field.

- (void)getTranscriptionJob:(AWSTranscribeGetTranscriptionJobRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeGetTranscriptionJobResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetTranscriptionJob service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorNotFound.

Declared In

AWSTranscribeService.h

– getVocabulary:

Gets information about a vocabulary.

- (AWSTask<AWSTranscribeGetVocabularyResponse*> *)getVocabulary:(AWSTranscribeGetVocabularyRequest *)request

Parameters

request

A container for the necessary parameters to execute the GetVocabulary service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeGetVocabularyResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorNotFound, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorBadRequest.

Declared In

AWSTranscribeService.h

– getVocabulary:completionHandler:

Gets information about a vocabulary.

- (void)getVocabulary:(AWSTranscribeGetVocabularyRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeGetVocabularyResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the GetVocabulary service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorNotFound, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorBadRequest.

Declared In

AWSTranscribeService.h

– listTranscriptionJobs:

Lists transcription jobs with the specified status.

- (AWSTask<AWSTranscribeListTranscriptionJobsResponse*> *)listTranscriptionJobs:(AWSTranscribeListTranscriptionJobsRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListTranscriptionJobs service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeListTranscriptionJobsResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– listTranscriptionJobs:completionHandler:

Lists transcription jobs with the specified status.

- (void)listTranscriptionJobs:(AWSTranscribeListTranscriptionJobsRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeListTranscriptionJobsResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListTranscriptionJobs service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– listVocabularies:

Returns a list of vocabularies that match the specified criteria. If no criteria are specified, returns the entire list of vocabularies.

- (AWSTask<AWSTranscribeListVocabulariesResponse*> *)listVocabularies:(AWSTranscribeListVocabulariesRequest *)request

Parameters

request

A container for the necessary parameters to execute the ListVocabularies service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeListVocabulariesResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– listVocabularies:completionHandler:

Returns a list of vocabularies that match the specified criteria. If no criteria are specified, returns the entire list of vocabularies.

- (void)listVocabularies:(AWSTranscribeListVocabulariesRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeListVocabulariesResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the ListVocabularies service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure.

Declared In

AWSTranscribeService.h

– startTranscriptionJob:

Starts an asynchronous job to transcribe speech to text.

- (AWSTask<AWSTranscribeStartTranscriptionJobResponse*> *)startTranscriptionJob:(AWSTranscribeStartTranscriptionJobRequest *)request

Parameters

request

A container for the necessary parameters to execute the StartTranscriptionJob service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeStartTranscriptionJobResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorConflict.

Declared In

AWSTranscribeService.h

– startTranscriptionJob:completionHandler:

Starts an asynchronous job to transcribe speech to text.

- (void)startTranscriptionJob:(AWSTranscribeStartTranscriptionJobRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeStartTranscriptionJobResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the StartTranscriptionJob service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorConflict.

Declared In

AWSTranscribeService.h

– updateVocabulary:

Updates an existing vocabulary with new values. The UpdateVocabulary operation overwrites all of the existing information with the values that you provide in the request.

- (AWSTask<AWSTranscribeUpdateVocabularyResponse*> *)updateVocabulary:(AWSTranscribeUpdateVocabularyRequest *)request

Parameters

request

A container for the necessary parameters to execute the UpdateVocabulary service method.

Return Value

An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTranscribeUpdateVocabularyResponse. On failed execution, task.error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorNotFound, AWSTranscribeErrorConflict.

Declared In

AWSTranscribeService.h

– updateVocabulary:completionHandler:

Updates an existing vocabulary with new values. The UpdateVocabulary operation overwrites all of the existing information with the values that you provide in the request.

- (void)updateVocabulary:(AWSTranscribeUpdateVocabularyRequest *)request completionHandler:(void ( ^ ) ( AWSTranscribeUpdateVocabularyResponse *response , NSError *error ))completionHandler

Parameters

request

A container for the necessary parameters to execute the UpdateVocabulary service method.

completionHandler

The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTranscribeErrorDomain domain and the following error code: AWSTranscribeErrorBadRequest, AWSTranscribeErrorLimitExceeded, AWSTranscribeErrorInternalFailure, AWSTranscribeErrorNotFound, AWSTranscribeErrorConflict.

Declared In

AWSTranscribeService.h

Other Methods

  configuration

The service configuration used to instantiate this service client.

@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration

Discussion

Warning: Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

Declared In

AWSTranscribeService.h