0

I am trying to transcribe speech using Custom Language Model using Python API. I followed the example script available on the AWS webpage. However, it throws the following error, saying it doesn't support the 'LanguageModelName' parameter under ModelSettings.

ParamValidationError: Parameter validation failed: Unknown parameter in input: "ModelSettings", must be one of: TranscriptionJobName, LanguageCode, MediaSampleRateHertz, MediaFormat, Media, OutputBucketName, Settings

transcribe.start_transcription_job(
    TranscriptionJobName = job_name,
    Media = {'MediaFileUri': job_uri},
    MediaFormat = 'media-format',
    LanguageCode = 'language-code',
ModelSettings = {
    'LanguageModelName': 'language-model-name'
    }
)

Could anyone please help regarding this?

eracube
  • 2,484
  • 2
  • 15
  • 18
  • I had posted the same question in the Amazon developers portal. After few days without any change in the code, it suddenly started working. – eracube May 04 '21 at 07:32

1 Answers1

0

I'm not sure what could be wrong on your request in particular, but I tried the following with no issue:

transcribe = boto3.client('transcribe', region_name='us-west-2')
transcribe.start_transcription_job(
    TranscriptionJobName = 'test-so-clm-1',
    Media = {'MediaFileUri': 's3://bucket/folder/audio.wav'},
    MediaFormat = 'wav',
    LanguageCode = 'en-US',
    ModelSettings = {
    'LanguageModelName': 'test1'
    }
)

In my case my Custom Language Model is named test1. Make sure your CLM name matches. Maybe the error is being raised like something is wrong with the "keys" under ModelSettings but in reality it's the actual value that's wrong. Let me know if this helps!

  • I had posted the same question in the Amazon developers portal. After few days without any change in the code, it suddenly started working. – eracube May 04 '21 at 07:32