Camel Components

AWS Transcribe

Since Camel 4.15

Only producer is supported

The AWS2 Transcribe component supports Automatically convert speech to text AWS Transcribe

Prerequisites

You must have a valid Amazon Web Services developer account, and be signed up to use Amazon Transcribe. More information is available at Amazon Transcribe.

URI Format

aws2-transcribe://label[?options]

You can append query options to the URI in the following format:

?options=value&option2=value&…​

Configuring Options

Camel components are configured on two separate levels:

  • component level

  • endpoint level

Configuring Component Options

At the component level, you set general and shared configurations that are, then, inherited by the endpoints. It is the highest configuration level.

For example, a component may have security settings, credentials for authentication, urls for network connection and so forth.

Some components only have a few options, and others may have many. Because components typically have pre-configured defaults that are commonly used, then you may often only need to configure a few options on a component; or none at all.

You can configure components using:

  • the Component DSL.

  • in a configuration file (application.properties, *.yaml files, etc).

  • directly in the Java code.

Configuring Endpoint Options

You usually spend more time setting up endpoints because they have many options. These options help you customize what you want the endpoint to do. The options are also categorized into whether the endpoint is used as a consumer (from), as a producer (to), or both.

Configuring endpoints is most often done directly in the endpoint URI as path and query parameters. You can also use the Endpoint DSL and DataFormat DSL as a type safe way of configuring endpoints and data formats in Java.

A good practice when configuring options is to use Property Placeholders.

Property placeholders provide a few benefits:

  • They help prevent using hardcoded urls, port numbers, sensitive information, and other settings.

  • They allow externalizing the configuration from the code.

  • They help the code to become more flexible and reusable.

The following two sections list all the options, firstly for the component followed by the endpoint.

Component Options

The AWS Transcribe component supports the following options which are listed below.

Name Description Default Type

configuration (producer)

The configuration that the endpoints of the component start from. Each endpoint uses a copy of it, in which its own URI options replace the values.

Transcribe2Configuration

lazyStartProducer (producer)

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

boolean

operation (producer)

The operation that the producer performs. It is required, as no header replaces it: a producer without an operation fails the exchange.

Enum values:

  • startTranscriptionJob

  • getTranscriptionJob

  • listTranscriptionJobs

  • deleteTranscriptionJob

  • createVocabulary

  • getVocabulary

  • listVocabularies

  • updateVocabulary

  • deleteVocabulary

  • createVocabularyFilter

  • getVocabularyFilter

  • listVocabularyFilters

  • updateVocabularyFilter

  • deleteVocabularyFilter

  • createLanguageModel

  • describeLanguageModel

  • listLanguageModels

  • deleteLanguageModel

  • createMedicalVocabulary

  • getMedicalVocabulary

  • listMedicalVocabularies

  • updateMedicalVocabulary

  • deleteMedicalVocabulary

  • startMedicalTranscriptionJob

  • getMedicalTranscriptionJob

  • listMedicalTranscriptionJobs

  • deleteMedicalTranscriptionJob

  • tagResource

  • untagResource

  • listTagsForResource

Transcribe2Operations

overrideEndpoint (producer)

Whether to send the requests to the URI of the uriEndpointOverride option instead of the endpoint of the region. It has no effect when uriEndpointOverride is not set.

false

boolean

pojoRequest (producer)

Whether the body is the request object of the AWS SDK for the operation, such as a StartTranscriptionJobRequest, which the producer sends as it is. The headers that give the input of the operation are then not used, and a body of another type fails the exchange.

false

boolean

profileCredentialsName (producer)

The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change.

String

protocol (producer)

Deprecated This option has no effect: the Transcribe client uses HTTPS, or the scheme of uriEndpointOverride when overrideEndpoint is true. For the protocol of the proxy, use proxyProtocol. Deprecation note: Not used: nothing reads this option when the Transcribe client is built.

Enum values:

  • HTTP

  • HTTPS

HTTPS

Protocol

proxyHost (producer)

The host name of the proxy that the HTTP client of Amazon Transcribe connects through. The proxy is used only when the proxyPort option is set too.

String

proxyPort (producer)

The port of the proxy that the HTTP client of Amazon Transcribe connects through. The proxy is used only when the proxyHost option is set too.

Integer

proxyProtocol (producer)

The protocol that the HTTP client of Amazon Transcribe uses to connect to the proxy. It is used only when the proxyHost and proxyPort options are set.

Enum values:

  • HTTP

  • HTTPS

HTTPS

Protocol

region (producer)

The AWS region of Amazon Transcribe, as a region ID such as eu-west-1, which is the value of Region.EU_WEST_1.id(). If not set, the aws.region system property or the AWS_REGION environment variable is used, and else the default region provider chain of the AWS SDK.

String

transcribeClient (producer)

To use a custom software.amazon.awssdk.services.transcribe.TranscribeClient. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used. The endpoint does not close this client, but the component closes a client that is set on the component when the component stops.

TranscribeClient

trustAllCertificates (producer)

Whether the HTTP client of Amazon Transcribe trusts every TLS certificate without checking it. It applies to any endpoint, not only to an overridden one, so use it only for testing, for example against a local emulator.

false

boolean

uriEndpointOverride (producer)

The URI of the endpoint to use instead of the endpoint of the region, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true.

String

useDefaultCredentialsProvider (producer)

Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options.

false

boolean

useProfileCredentialsProvider (producer)

Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the session and static credentials.

false

boolean

useSessionCredentials (producer)

Whether to use temporary credentials made of the accessKey, secretKey and sessionToken options, for example those of an assumed IAM role. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true.

false

boolean

autowiredEnabled (advanced)

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

boolean

accessKey (security)

The access key ID of the AWS credentials, used together with the secretKey option. If not set, the aws.accessKeyId system property or the AWS_ACCESS_KEY_ID environment variable is used. It is required, unless transcribeClient is set or useDefaultCredentialsProvider, useProfileCredentialsProvider or useSessionCredentials is true.

String

proxyPassword (security)

The password for the proxy. It is not used: the Transcribe client that the component builds does not authenticate to the proxy.

String

proxyUsername (security)

The user name for the proxy. It is not used: the Transcribe client that the component builds does not authenticate to the proxy.

String

secretKey (security)

The secret access key of the AWS credentials, used together with the accessKey option. If not set, the aws.secretKey system property or the AWS_SECRET_ACCESS_KEY environment variable is used. It is required, unless transcribeClient is set or useDefaultCredentialsProvider, useProfileCredentialsProvider or useSessionCredentials is true.

String

sessionToken (security)

The session token of temporary AWS credentials, for example of an assumed IAM role. It is used only when useSessionCredentials is true, together with the accessKey and secretKey options. When it is not set, the accessKey and secretKey options are used without a session token.

String

Endpoint Options

The AWS Transcribe endpoint is configured using URI syntax:

aws2-transcribe:label

With the following path and query parameters:

Path Parameters

Name Description Default Type

label (producer)

Required A logical name of the endpoint, which you choose freely. The producer does not use it: the job, vocabulary, filter or model to act on is given in headers.

String

Query Parameters

Name Description Default Type

operation (producer)

The operation that the producer performs. It is required, as no header replaces it: a producer without an operation fails the exchange.

Enum values:

  • startTranscriptionJob

  • getTranscriptionJob

  • listTranscriptionJobs

  • deleteTranscriptionJob

  • createVocabulary

  • getVocabulary

  • listVocabularies

  • updateVocabulary

  • deleteVocabulary

  • createVocabularyFilter

  • getVocabularyFilter

  • listVocabularyFilters

  • updateVocabularyFilter

  • deleteVocabularyFilter

  • createLanguageModel

  • describeLanguageModel

  • listLanguageModels

  • deleteLanguageModel

  • createMedicalVocabulary

  • getMedicalVocabulary

  • listMedicalVocabularies

  • updateMedicalVocabulary

  • deleteMedicalVocabulary

  • startMedicalTranscriptionJob

  • getMedicalTranscriptionJob

  • listMedicalTranscriptionJobs

  • deleteMedicalTranscriptionJob

  • tagResource

  • untagResource

  • listTagsForResource

Transcribe2Operations

overrideEndpoint (producer)

Whether to send the requests to the URI of the uriEndpointOverride option instead of the endpoint of the region. It has no effect when uriEndpointOverride is not set.

false

boolean

pojoRequest (producer)

Whether the body is the request object of the AWS SDK for the operation, such as a StartTranscriptionJobRequest, which the producer sends as it is. The headers that give the input of the operation are then not used, and a body of another type fails the exchange.

false

boolean

profileCredentialsName (producer)

The name of the profile in the AWS shared credentials and config files, used when useProfileCredentialsProvider is true. If not set, the AWS SDK uses its default profile, which the AWS_PROFILE environment variable can change.

String

protocol (producer)

Deprecated This option has no effect: the Transcribe client uses HTTPS, or the scheme of uriEndpointOverride when overrideEndpoint is true. For the protocol of the proxy, use proxyProtocol. Deprecation note: Not used: nothing reads this option when the Transcribe client is built.

Enum values:

  • HTTP

  • HTTPS

HTTPS

Protocol

proxyHost (producer)

The host name of the proxy that the HTTP client of Amazon Transcribe connects through. The proxy is used only when the proxyPort option is set too.

String

proxyPort (producer)

The port of the proxy that the HTTP client of Amazon Transcribe connects through. The proxy is used only when the proxyHost option is set too.

Integer

proxyProtocol (producer)

The protocol that the HTTP client of Amazon Transcribe uses to connect to the proxy. It is used only when the proxyHost and proxyPort options are set.

Enum values:

  • HTTP

  • HTTPS

HTTPS

Protocol

region (producer)

The AWS region of Amazon Transcribe, as a region ID such as eu-west-1, which is the value of Region.EU_WEST_1.id(). If not set, the aws.region system property or the AWS_REGION environment variable is used, and else the default region provider chain of the AWS SDK.

String

transcribeClient (producer)

To use a custom software.amazon.awssdk.services.transcribe.TranscribeClient. When this option is set, the credentials, region, proxy, endpoint override and trustAllCertificates options are not used. The endpoint does not close this client, but the component closes a client that is set on the component when the component stops.

TranscribeClient

trustAllCertificates (producer)

Whether the HTTP client of Amazon Transcribe trusts every TLS certificate without checking it. It applies to any endpoint, not only to an overridden one, so use it only for testing, for example against a local emulator.

false

boolean

uriEndpointOverride (producer)

The URI of the endpoint to use instead of the endpoint of the region, for example http://localhost:4566 for a local emulator. It is used only when overrideEndpoint is true.

String

useDefaultCredentialsProvider (producer)

Whether to load the credentials with the default credentials provider chain of the AWS SDK, which looks in system properties, environment variables, the shared credentials and config files, and the container or instance role. It takes precedence over the other credentials options.

false

boolean

useProfileCredentialsProvider (producer)

Whether to load the credentials from a profile of the AWS shared credentials and config files, the one of the profileCredentialsName option. It is not used when useDefaultCredentialsProvider is true, and it takes precedence over the session and static credentials.

false

boolean

useSessionCredentials (producer)

Whether to use temporary credentials made of the accessKey, secretKey and sessionToken options, for example those of an assumed IAM role. It is not used when useDefaultCredentialsProvider or useProfileCredentialsProvider is true.

false

boolean

lazyStartProducer (producer (advanced))

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

boolean

accessKey (security)

The access key ID of the AWS credentials, used together with the secretKey option. If not set, the aws.accessKeyId system property or the AWS_ACCESS_KEY_ID environment variable is used. It is required, unless transcribeClient is set or useDefaultCredentialsProvider, useProfileCredentialsProvider or useSessionCredentials is true.

String

proxyPassword (security)

The password for the proxy. It is not used: the Transcribe client that the component builds does not authenticate to the proxy.

String

proxyUsername (security)

The user name for the proxy. It is not used: the Transcribe client that the component builds does not authenticate to the proxy.

String

secretKey (security)

The secret access key of the AWS credentials, used together with the accessKey option. If not set, the aws.secretKey system property or the AWS_SECRET_ACCESS_KEY environment variable is used. It is required, unless transcribeClient is set or useDefaultCredentialsProvider, useProfileCredentialsProvider or useSessionCredentials is true.

String

sessionToken (security)

The session token of temporary AWS credentials, for example of an assumed IAM role. It is used only when useSessionCredentials is true, together with the accessKey and secretKey options. When it is not set, the accessKey and secretKey options are used without a session token.

String

Message Headers

The AWS Transcribe component supports the following message header(s), which is/are listed below:

Name Description Default Type

CamelAwsTranscribeTranscriptionJobName (producer)

Constant: TRANSCRIPTION_JOB_NAME

The name of the transcription job, for startTranscriptionJob, getTranscriptionJob and deleteTranscriptionJob. It must be unique in the AWS account.

String

CamelAwsTranscribeLanguageCode (producer)

Constant: LANGUAGE_CODE

The language code of the audio, such as en-US, for startTranscriptionJob, startMedicalTranscriptionJob, createVocabulary, updateVocabulary, createMedicalVocabulary, updateMedicalVocabulary, createVocabularyFilter and createLanguageModel. Medical transcription supports only en-US.

String

CamelAwsTranscribeMediaFormat (producer)

Constant: MEDIA_FORMAT

The format of the media file, such as mp3, wav or flac, for startTranscriptionJob and startMedicalTranscriptionJob. If not set, Amazon Transcribe detects the format.

String

CamelAwsTranscribeMediaUri (producer)

Constant: MEDIA_URI

The S3 location of the media file to transcribe, such as s3://my-bucket/audio.mp3, for startTranscriptionJob and startMedicalTranscriptionJob. Amazon Transcribe reads the file from S3, so the message body is not used.

String

CamelAwsTranscribeJobNameContains (producer)

Constant: JOB_NAME_CONTAINS

A text that the names must contain, without regard to case, to filter the jobs of listTranscriptionJobs and listMedicalTranscriptionJobs, and the items of listVocabularyFilters, listLanguageModels and listMedicalVocabularies. listVocabularies does not read it.

String

CamelAwsTranscribeStatus (producer)

Constant: STATUS

The status to filter the list by: a job status such as QUEUED, IN_PROGRESS, FAILED or COMPLETED for listTranscriptionJobs and listMedicalTranscriptionJobs, a vocabulary state such as PENDING, READY or FAILED for listVocabularies and listMedicalVocabularies, or a model status such as IN_PROGRESS, FAILED or COMPLETED for listLanguageModels. If not set, every status is listed.

String

CamelAwsTranscribeVocabularyName (producer)

Constant: VOCABULARY_NAME

The name of the custom vocabulary, for createVocabulary, getVocabulary, updateVocabulary and deleteVocabulary, or of the custom medical vocabulary, for createMedicalVocabulary, getMedicalVocabulary, updateMedicalVocabulary and deleteMedicalVocabulary. The transcription jobs do not read it.

String

CamelAwsTranscribeVocabularyFilterName (producer)

Constant: VOCABULARY_FILTER_NAME

The name of the custom vocabulary filter, for createVocabularyFilter, getVocabularyFilter, updateVocabularyFilter and deleteVocabularyFilter. The transcription jobs do not read it.

String

CamelAwsTranscribeVocabularyPhrases (producer)

Constant: VOCABULARY_PHRASES

The phrases of the custom vocabulary, for createVocabulary and updateVocabulary, or the words of the vocabulary filter, for createVocabularyFilter and updateVocabularyFilter, as a List of String, or as a String for a single phrase. Use it or the CamelAwsTranscribeVocabularyFileUri header, not both.

List

CamelAwsTranscribeLanguageModelName (producer)

Constant: LANGUAGE_MODEL_NAME

The name of the custom language model, for createLanguageModel, describeLanguageModel and deleteLanguageModel. The transcription jobs do not read it.

String

CamelAwsTranscribeMedicalTranscriptionJobName (producer)

Constant: MEDICAL_TRANSCRIPTION_JOB_NAME

The name of the medical transcription job, for startMedicalTranscriptionJob, getMedicalTranscriptionJob and deleteMedicalTranscriptionJob. It must be unique in the AWS account.

String

CamelAwsTranscribeResourceArn (producer)

Constant: RESOURCE_ARN

The Amazon Resource Name (ARN) of the resource, such as a transcription job, a vocabulary or a language model, for tagResource, untagResource and listTagsForResource.

String

CamelAwsTranscribeTags (producer)

Constant: TAGS

The tags that tagResource adds to the resource, as a Map of tag key to tag value.

Map

CamelAwsTranscribeTagKeys (producer)

Constant: TAG_KEYS

The keys of the tags that untagResource removes from the resource, as a List of String.

List

CamelAwsTranscribeMaxResults (producer)

Constant: MAX_RESULTS

The maximum number of items in one page of the result, for listVocabularyFilters, listLanguageModels, listMedicalVocabularies and listMedicalTranscriptionJobs. If not set, Amazon Transcribe returns at most 5. listTranscriptionJobs and listVocabularies do not read it.

Integer

CamelAwsTranscribeNextToken (producer)

Constant: NEXT_TOKEN

The NextToken of the previous response of the same list operation, to get the next page, for listVocabularyFilters, listLanguageModels, listMedicalVocabularies and listMedicalTranscriptionJobs. listTranscriptionJobs and listVocabularies do not read it.

String

CamelAwsTranscribeVocabularyFileUri (producer)

Constant: VOCABULARY_FILE_URI

The S3 location of the text file with the terms of the vocabulary, for createVocabulary, updateVocabulary, createMedicalVocabulary and updateMedicalVocabulary, or with the words of the filter, for createVocabularyFilter and updateVocabularyFilter.

String

CamelAwsTranscribeBaseModelName (producer)

Constant: BASE_MODEL_NAME

The base model of the custom language model, for createLanguageModel: NarrowBand for audio with a sample rate below 16,000 Hz, or WideBand for 16,000 Hz and above.

String

CamelAwsTranscribeInputDataS3Uri (producer)

Constant: INPUT_DATA_S3_URI

The S3 location of the training data of the custom language model, for createLanguageModel. It is used together with the CamelAwsTranscribeDataAccessRoleArn header.

String

CamelAwsTranscribeDataAccessRoleArn (producer)

Constant: DATA_ACCESS_ROLE_ARN

The ARN of the IAM role that Amazon Transcribe uses to read the training data, for createLanguageModel, or the file of the vocabulary filter, for createVocabularyFilter and updateVocabularyFilter.

String

CamelAwsTranscribeOutputBucketName (producer)

Constant: OUTPUT_BUCKET_NAME

The S3 bucket that startMedicalTranscriptionJob writes the transcript to. startTranscriptionJob does not read it: Amazon Transcribe then keeps the transcript in a bucket of its own, at the URI that getTranscriptionJob gives.

String

CamelAwsTranscribeSpecialty (producer)

Constant: SPECIALTY

The medical specialty of the audio, for startMedicalTranscriptionJob, such as PRIMARYCARE.

String

CamelAwsTranscribeType (producer)

Constant: TYPE

The type of the audio, for startMedicalTranscriptionJob: CONVERSATION for a conversation between people, or DICTATION for a single speaker.

String

Message Body

The message body at each side of the AWS Transcribe component: Consumer is the body of the messages the consumer creates, Consumer reply the bodies a consumer that answers its caller can reply with, Producer input the bodies the producer can send or write, and Producer output the body after the producer.

Side Body Description

Producer input

any

Not used: AWS reads the audio from S3, at the URI in the CamelAwsTranscribeMediaUri header, and the other inputs come from headers too, such as the job name in CamelAwsTranscribeTranscriptionJobName. With pojoRequest=true the request of the AWS SDK for the operation, such as a StartTranscriptionJobRequest: another body fails.

  • With pojoRequest=true: pojo

Producer output

pojo

The response of the AWS SDK for the operation, such as the StartTranscriptionJobResponse of startTranscriptionJob. The transcript is not in the body: the job writes it to S3, at the URI that getTranscriptionJob gives.

The bodies are the ones with the default options. A side that is not listed is not known, and tooling does not guess it. The carriers, the sides and the tools that use them are described in Message Body Types.

Required Transcribe component options

You have to provide the transcribeClient in the Registry or your accessKey and secretKey to access the Amazon Transcribe service.

Usage

Static credentials, Default Credential Provider and Profile Credentials Provider

You have the possibility of avoiding the usage of explicit static credentials by specifying the useDefaultCredentialsProvider option and set it to true.

The order of evaluation for Default Credentials Provider is the following:

  • Java system properties - aws.accessKeyId and aws.secretKey

  • Environment variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

  • Web Identity Token from AWS STS.

  • The shared credentials and config files.

  • Amazon ECS container credentials - loaded from the Amazon ECS if the environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is set.

  • Amazon EC2 Instance profile credentials.

You have also the possibility of using Profile Credentials Provider, by specifying the useProfileCredentialsProvider option to true and profileCredentialsName to the profile name.

Only one of static, default and profile credentials could be used at the same time.

For more information about this you can look at AWS credentials documentation

Example

The following route starts a transcription job for an audio file in S3. The job comes from the headers:

- route:
    from:
      uri: direct:transcribe
      steps:
        - setHeader:
            name: CamelAwsTranscribeTranscriptionJobName
            expression:
              constant:
                expression: meeting-2026-10-17
        - setHeader:
            name: CamelAwsTranscribeLanguageCode
            expression:
              constant:
                expression: en-US
        - setHeader:
            name: CamelAwsTranscribeMediaFormat
            expression:
              constant:
                expression: mp3
        - setHeader:
            name: CamelAwsTranscribeMediaUri
            expression:
              constant:
                expression: s3://my-audio/meeting.mp3
        - to:
            uri: aws2-transcribe:transcribe
            parameters:
              operation: startTranscriptionJob
              region: eu-west-1
              accessKey: "{{aws.access-key}}"
              secretKey: "{{aws.secret-key}}"

Dependencies

Maven users will need to add the following dependency to their pom.xml.

pom.xml

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-aws2-transcribe</artifactId>
    <version>${camel-version}</version>
</dependency>

where ${camel-version} must be replaced by the actual version of Camel.