awstranscribe

Welcome to the documentation for the AWSTranscribe CocoaPod! In this guide, we will walk you through the steps needed to integrate AWSTranscribe into your iOS project.

Table of Contents

Installation

To use AWSTranscribe, you need to have the AWS SDK for iOS installed in your project. If you have not installed it yet, follow the steps outlined in the AWS Transcribe Getting Started guide.

After installing the AWS SDK for iOS, you can add the AWSTranscribe CocoaPod to your project by adding the following line to your Podfile:

pod 'AWSTranscribe'

Then, run the command pod install to update your project with the new dependency.

Setup

Before using AWSTranscribe in your iOS app, you need to perform some setup steps:

  • Create an AWS account and set up authentication credentials. You can find detailed instructions in the AWS SDK Setup guide.
  • Ensure that you have granted the necessary AWS IAM permissions for accessing the Transcribe service.

With the prerequisites completed, you can proceed to integrate AWSTranscribe into your project.

Transcribe Audio

To transcribe audio, you need to follow these steps:

  • Import the AWSTranscribe module in your Swift file:
import AWSTranscribe
  • Create an instance of AWSTranscribe and set the necessary configurations:
let serviceConfiguration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialsProvider)
AWSTranscribe.register(with: serviceConfiguration, forKey: "default")
  • Prepare your audio file to be transcribed and convert it to an Data object.
  • Create a AWSTranscribeStartTranscriptionJobRequest object and set the required parameters such as the language code, media format, and media file.
  • Call the startTranscriptionJob method of the AWSTranscribe client to initiate the transcription job.

Monitor Job Status

After starting a transcription job, you can monitor its status by following these steps:

  • Create an instance of AWSTranscribeGetTranscriptionJobRequest and set the transcriptionJobName property.
  • Call the getTranscriptionJob method of the AWSTranscribe client to retrieve information about the job.
  • Check the transcriptionJobStatus property of the returned AWSTranscribeTranscriptionJob object to determine the current status of the job.

Cleanup

Once you have finished transcribing your audio and obtaining the desired results, make sure to clean up your resources:

  • Call the deleteTranscriptionJob method of the AWSTranscribe client, passing in the transcriptionJobName of the job you want to delete.
  • Ensure that you properly handle any errors that may occur during the cleanup process.

That’s it! You have successfully integrated AWSTranscribe into your iOS app.