4

Do I need to delete a few transcribe jobs that I created using Amazon Transcribe service?

I'm using amazon transcribe for the first time to get a text from the video, it works fine but I didn't find anything there how to delete the particular transcribe job.

quiver
  • 4,230
  • 1
  • 22
  • 20
satya
  • 152
  • 2
  • 8
  • Actually This option is required. Reason to UP vote, consider we have some completed jobs. We get the list of completed jobs by using `ListTranscriptionJobsRequest`, and consume their transcription data. Once we consumed the data we dont want AWS api to return same jobs again in the result. We want these job to be deleted or marked to be deleted/consumed. – Sheikh Abdul Wahid Jun 19 '18 at 09:55

5 Answers5

7

As of 2018/10/18, you can delete Transcribe jobs.

Amazon Transcribe Supports Deletion of Completed Transcription Jobs

From AWS CLI

$ aws transcribe delete-transcription-job \
  --transcription-job-name YOUR_JOB_NAME

From Python SDK

>>> import boto3
>>> client = boto3.client('transcribe')
>>> client.delete_transcription_job(TranscriptionJobName='YOUR_JOB_NAME')

Of course, you can delete it from console :-)

quiver
  • 4,230
  • 1
  • 22
  • 20
  • I tried it from From Python SDK, but it doesn't work. – Trilok Nagvenkar Nov 24 '18 at 03:55
  • 1
    @TrilokNagvenkar SDK version needs to be 1.9.28+. You can check the version with `$ python -c 'import boto3;print(boto3.__version__)'`For upgrading, run `$ pip install -U boto3` – quiver Nov 24 '18 at 17:56
  • I put a complete AWS Transcribe example on [GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/6ff2068156ee2224c620bdef8941aadefad713fb/python/example_code/transcribe/transcribe_basics.py#L143) that shows how to use Python and Boto3 to delete a job (among other things). – Laren Crawford Sep 14 '20 at 18:40
1

From Step 3: Getting Started Using the Console - Amazon Transcribe:

Jobs are kept for 90 days and then deleted from the system.

In fact, there is no "Delete Job" command!

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • Actually This option is required. Reason to UP vote, consider we have some completed jobs. We get the list of completed jobs by using `ListTranscriptionJobsRequest`, and consume their transcription data. Once we consumed the data we dont want AWS api to return same jobs again in the result. We want these job to be deleted or marked to be deleted/consumed. – Sheikh Abdul Wahid Jun 19 '18 at 09:55
0

quiver's reply is correct. If you are on a Mac, Homebrew as of today (2018-10-22) only installs and upgrades to awscli version 1.16.30; I had to upgrade to version 1.16.38 today to access the delete-transcription-job argument. If you rely upon Homebrew, uninstall all versions of awscli managed by Homebrew with:

$ brew uninstall --force awscli

Then install with pip using:

$ pip3 install awscli

Verify using:

$ aws --version
aws-cli/1.16.38 Python/3.7.0 Darwin/17.6.0 botocore/1.12.28

Your specific version string may vary, only the "aws-cli/1.16.38" part matters of course.

0

Looks like they do offer a delete option now: https://docs.aws.amazon.com/transcribe/latest/dg/API_DeleteTranscriptionJob.html . Unfortunately, the code below is giving me a "Operation not found: DeleteTranscriptionJob" error, and I just can't figure out why.

$result = $transcribe->deleteTranscriptionJob([
   'TranscriptionJobName' => $transcriptionJobName
]);
Ravi Jayagopal
  • 916
  • 7
  • 10
0

Simple code snippet worked for me is :

Dependency : Python 3

transcribe = boto3.client('transcribe', region_name='us-west-2')

response = transcribe.delete_transcription_job(
    TranscriptionJobName='test-transcribe_unit'
)

Official API reference

Asraful
  • 1,241
  • 18
  • 31