Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aws Transribe unable to start_transcription_job without LanguageCode in boto3 #2649

Closed
kenchoong opened this issue Oct 28, 2020 · 4 comments
Closed
Assignees
Labels
closed-for-staleness guidance Question that needs advice or information.

Comments

@kenchoong
Copy link

kenchoong commented Oct 28, 2020

Please fill out the sections below to help us address your issue.

What issue did you see ?
Boto3 version 1.16.5
Service is Aws Transcribe

I unable to use start_transcription_job without LanguageCode parameter and using IdentifyLanguage=True

Read the docs of boto3 and Aws Transcribe multiple times stated that LanguageCode is optional and IdentifyLanguage is valid parameter. But still make it work, I not sure why.

Steps to reproduce
First install boto3 in local using pip install boto3

Inside my lambda function:

import boto3
import json

def TranscribeSoundToWordHandler(event, context):
    mediaFileUri = 's3://'+ bucket_name+'/'+prefixKey

    transcribe_client = boto3.client('transcribe')
    response = response = transcribe_client.start_transcription_job(
        TranscriptionJobName='Test-20201-27',
        IdentifyLanguage=True,
        Media={'MediaFileUri':mediaFileUri}
    )

Then I test it locally:

sam local invoke TranscribeSoundToWordHandler --event lambda\MyDirectory\event.json

I also write out a question here

Debug logs
Full stack trace by adding boto3.set_stream_logger('') to your code.

[ERROR] ParamValidationError: Parameter validation failed:
Missing required parameter in input: "LanguageCode"
Unknown parameter in input: "IdentifyLanguage", must be one of: TranscriptionJobName, LanguageCode, MediaSampleRateHertz, MediaFormat, Media, OutputBucketName, OutputEncryptionKMSKeyId, Settings, JobExecutionSettings, ContentRedaction
Traceback (most recent call last):
  File "/var/task/app.py", line 24, in TranscribeSoundToWordHandler
    response = response = transcribe_client.start_transcription_job(
  File "/var/runtime/botocore/client.py", line 316, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/var/runtime/botocore/client.py", line 607, in _make_api_call
    request_dict = self._convert_to_request_dict(
  File "/var/runtime/botocore/client.py", line 655, in _convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
  File "/var/runtime/botocore/validate.py", line 297, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())

@kenchoong kenchoong added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Oct 28, 2020
@swetashre swetashre self-assigned this Oct 28, 2020
@swetashre
Copy link
Contributor

@kenchoong - Thank you for your post. I am not able to reproduce the issue. Which version of boto3/botocore are you using ?
Can you try with latest version of boto3 ?

@swetashre swetashre added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 28, 2020
@kenchoong
Copy link
Author

kenchoong commented Oct 29, 2020

Hey miss, I using

boto version 1.16.5
botocore version: 1.19.5

@kenchoong
Copy link
Author

My current directory is look like this:

a12

But I create the Lambda using cdk, but I cant run the lambda locally using SAM

@github-actions github-actions bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 29, 2020
@swetashre
Copy link
Contributor

@kenchoong - Please make sure your lambda function is using botocore version >=1.17.62. This error occurs if you are using older version of SDK.

@swetashre swetashre added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Nov 5, 2020
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 9, 2020
@github-actions github-actions bot closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants