Class: AWS.TranscribeService

Inherits:
AWS.Service show all
Identifier:
transcribeservice
API Version:
2017-10-26
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Operations and objects for transcribing speech to text.

Sending a Request Using TranscribeService

var transcribeservice = new AWS.TranscribeService();
transcribeservice.createVocabulary(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the TranscribeService object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var transcribeservice = new AWS.TranscribeService({apiVersion: '2017-10-26'});

You can also set the API version globally in AWS.config.apiVersions using the transcribeservice service identifier:

AWS.config.apiVersions = {
  transcribeservice: '2017-10-26',
  // other service API versions
};

var transcribeservice = new AWS.TranscribeService();

Version:

  • 2017-10-26

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.TranscribeService(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a TranscribeService object

var transcribeservice = new AWS.TranscribeService({apiVersion: '2017-10-26'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.TranscribeService.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.TranscribeService.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.TranscribeService.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createVocabulary(params = {}, callback) ⇒ AWS.Request

Creates a new custom vocabulary that you can use to change the way Amazon Transcribe handles transcription of an audio file.

Service Reference:

Examples:

Calling the createVocabulary operation

var params = {
  LanguageCode: en-US | es-US | en-AU | fr-CA | en-GB | de-DE | pt-BR | fr-FR | it-IT | ko-KR | es-ES, /* required */
  VocabularyName: 'STRING_VALUE', /* required */
  Phrases: [
    'STRING_VALUE',
    /* more items */
  ],
  VocabularyFileUri: 'STRING_VALUE'
};
transcribeservice.createVocabulary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VocabularyName — (String)

      The name of the vocabulary. The name must be unique within an AWS account. The name is case-sensitive.

    • LanguageCode — (String)

      The language code of the vocabulary entries.

      Possible values include:
      • "en-US"
      • "es-US"
      • "en-AU"
      • "fr-CA"
      • "en-GB"
      • "de-DE"
      • "pt-BR"
      • "fr-FR"
      • "it-IT"
      • "ko-KR"
      • "es-ES"
    • Phrases — (Array<String>)

      An array of strings that contains the vocabulary entries.

    • VocabularyFileUri — (String)

      The S3 location of the text file that contains the definition of the custom vocabulary. The URI must be in the same region as the API endpoint that you are calling. The general form is

      https://s3-&lt;aws-region&gt;.amazonaws.com/&lt;bucket-name&gt;/&lt;keyprefix&gt;/&lt;objectkey&gt;

      For example:

      https://s3-us-east-1.amazonaws.com/examplebucket/vocab.txt

      For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide.

      For more information about custom vocabularies, see Custom Vocabularies.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • VocabularyName — (String)

        The name of the vocabulary.

      • LanguageCode — (String)

        The language code of the vocabulary entries.

        Possible values include:
        • "en-US"
        • "es-US"
        • "en-AU"
        • "fr-CA"
        • "en-GB"
        • "de-DE"
        • "pt-BR"
        • "fr-FR"
        • "it-IT"
        • "ko-KR"
        • "es-ES"
      • VocabularyState — (String)

        The processing state of the vocabulary. When the VocabularyState field contains READY the vocabulary is ready to be used in a StartTranscriptionJob request.

        Possible values include:
        • "PENDING"
        • "READY"
        • "FAILED"
      • LastModifiedTime — (Date)

        The date and time that the vocabulary was created.

      • FailureReason — (String)

        If the VocabularyState field is FAILED, this field contains information about why the job failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteTranscriptionJob(params = {}, callback) ⇒ AWS.Request

Deletes a previously submitted transcription job along with any other generated results such as the transcription, models, and so on.

Service Reference:

Examples:

Calling the deleteTranscriptionJob operation

var params = {
  TranscriptionJobName: 'STRING_VALUE' /* required */
};
transcribeservice.deleteTranscriptionJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TranscriptionJobName — (String)

      The name of the transcription job to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteVocabulary(params = {}, callback) ⇒ AWS.Request

Deletes a vocabulary from Amazon Transcribe.

Service Reference:

Examples:

Calling the deleteVocabulary operation

var params = {
  VocabularyName: 'STRING_VALUE' /* required */
};
transcribeservice.deleteVocabulary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VocabularyName — (String)

      The name of the vocabulary to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getTranscriptionJob(params = {}, callback) ⇒ AWS.Request

Returns information about a transcription job. To see the status of the job, check the TranscriptionJobStatus field. If the status is COMPLETED, the job is finished and you can find the results at the location specified in the TranscriptionFileUri field.

Service Reference:

Examples:

Calling the getTranscriptionJob operation

var params = {
  TranscriptionJobName: 'STRING_VALUE' /* required */
};
transcribeservice.getTranscriptionJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TranscriptionJobName — (String)

      The name of the job.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TranscriptionJob — (map)

        An object that contains the results of the transcription job.

        • TranscriptionJobName — (String)

          The name of the transcription job.

        • TranscriptionJobStatus — (String)

          The status of the transcription job.

          Possible values include:
          • "IN_PROGRESS"
          • "FAILED"
          • "COMPLETED"
        • LanguageCode — (String)

          The language code for the input speech.

          Possible values include:
          • "en-US"
          • "es-US"
          • "en-AU"
          • "fr-CA"
          • "en-GB"
          • "de-DE"
          • "pt-BR"
          • "fr-FR"
          • "it-IT"
          • "ko-KR"
          • "es-ES"
        • MediaSampleRateHertz — (Integer)

          The sample rate, in Hertz, of the audio track in the input media file.

        • MediaFormat — (String)

          The format of the input media file.

          Possible values include:
          • "mp3"
          • "mp4"
          • "wav"
          • "flac"
        • Media — (map)

          An object that describes the input media for the transcription job.

        • Transcript — (map)

          An object that describes the output of the transcription job.

          • TranscriptFileUri — (String)

            The location where the transcription is stored.

            Use this URI to access the transcription. If you specified an S3 bucket in the OutputBucketName field when you created the job, this is the URI of that bucket. If you chose to store the transcription in Amazon Transcribe, this is a shareable URL that provides secure access to that location.

        • CreationTime — (Date)

          A timestamp that shows when the job was created.

        • CompletionTime — (Date)

          A timestamp that shows when the job was completed.

        • FailureReason — (String)

          If the TranscriptionJobStatus field is FAILED, this field contains information about why the job failed.

          The FailureReason field can contain one of the following values:

          • Unsupported media format - The media format specified in the MediaFormat field of the request isn't valid. See the description of the MediaFormat field for a list of valid values.

          • The media format provided does not match the detected media format - The media format of the audio file doesn't match the format specified in the MediaFormat field in the request. Check the media format of your media file and make sure that the two values match.

          • Invalid sample rate for audio file - The sample rate specified in the MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and 48000 Hertz.

          • The sample rate provided does not match the detected sample rate - The sample rate in the audio file doesn't match the sample rate specified in the MediaSampleRateHertz field in the request. Check the sample rate of your media file and make sure that the two values match.

          • Invalid file size: file size too large - The size of your audio file is larger than Amazon Transcribe can process. For more information, see Limits in the Amazon Transcribe Developer Guide.

          • Invalid number of channels: number of channels too large - Your audio contains more channels than Amazon Transcribe is configured to process. To request additional channels, see Amazon Transcribe Limits in the Amazon Web Services General Reference.

        • Settings — (map)

          Optional settings for the transcription job. Use these settings to turn on speaker recognition, to set the maximum number of speakers that should be identified and to specify a custom vocabulary to use when processing the transcription job.

          • VocabularyName — (String)

            The name of a vocabulary to use when processing the transcription job.

          • ShowSpeakerLabels — (Boolean)

            Determines whether the transcription job uses speaker recognition to identify different speakers in the input audio. Speaker recognition labels individual speakers in the audio file. If you set the ShowSpeakerLabels field to true, you must also set the maximum number of speaker labels MaxSpeakerLabels field.

            You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

          • MaxSpeakerLabels — (Integer)

            The maximum number of speakers to identify in the input audio. If there are more speakers in the audio than this number, multiple speakers will be identified as a single speaker. If you specify the MaxSpeakerLabels field, you must set the ShowSpeakerLabels field to true.

          • ChannelIdentification — (Boolean)

            Instructs Amazon Transcribe to process each audio channel separately and then merge the transcription output of each channel into a single transcription.

            Amazon Transcribe also produces a transcription of each item detected on an audio channel, including the start time and end time of the item and alternative transcriptions of the item including the confidence that Amazon Transcribe has in the transcription.

            You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getVocabulary(params = {}, callback) ⇒ AWS.Request

Gets information about a vocabulary.

Service Reference:

Examples:

Calling the getVocabulary operation

var params = {
  VocabularyName: 'STRING_VALUE' /* required */
};
transcribeservice.getVocabulary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • VocabularyName — (String)

      The name of the vocabulary to return information about. The name is case-sensitive.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • VocabularyName — (String)

        The name of the vocabulary to return.

      • LanguageCode — (String)

        The language code of the vocabulary entries.

        Possible values include:
        • "en-US"
        • "es-US"
        • "en-AU"
        • "fr-CA"
        • "en-GB"
        • "de-DE"
        • "pt-BR"
        • "fr-FR"
        • "it-IT"
        • "ko-KR"
        • "es-ES"
      • VocabularyState — (String)

        The processing state of the vocabulary.

        Possible values include:
        • "PENDING"
        • "READY"
        • "FAILED"
      • LastModifiedTime — (Date)

        The date and time that the vocabulary was last modified.

      • FailureReason — (String)

        If the VocabularyState field is FAILED, this field contains information about why the job failed.

      • DownloadUri — (String)

        The S3 location where the vocabulary is stored. Use this URI to get the contents of the vocabulary. The URI is available for a limited time.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTranscriptionJobs(params = {}, callback) ⇒ AWS.Request

Lists transcription jobs with the specified status.

Service Reference:

Examples:

Calling the listTranscriptionJobs operation

var params = {
  JobNameContains: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  Status: IN_PROGRESS | FAILED | COMPLETED
};
transcribeservice.listTranscriptionJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Status — (String)

      When specified, returns only transcription jobs with the specified status. Jobs are ordered by creation date, with the newest jobs returned first. If you don’t specify a status, Amazon Transcribe returns all transcription jobs ordered by creation date.

      Possible values include:
      • "IN_PROGRESS"
      • "FAILED"
      • "COMPLETED"
    • JobNameContains — (String)

      When specified, the jobs returned in the list are limited to jobs whose name contains the specified string.

    • NextToken — (String)

      If the result of the previous request to ListTranscriptionJobs was truncated, include the NextToken to fetch the next set of jobs.

    • MaxResults — (Integer)

      The maximum number of jobs to return in the response. If there are fewer results in the list, this response contains only the actual results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Status — (String)

        The requested status of the jobs returned.

        Possible values include:
        • "IN_PROGRESS"
        • "FAILED"
        • "COMPLETED"
      • NextToken — (String)

        The ListTranscriptionJobs operation returns a page of jobs at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListTranscriptionJobs operation to return in the next page of jobs.

      • TranscriptionJobSummaries — (Array<map>)

        A list of objects containing summary information for a transcription job.

        • TranscriptionJobName — (String)

          The name of the transcription job.

        • CreationTime — (Date)

          A timestamp that shows when the job was created.

        • CompletionTime — (Date)

          A timestamp that shows when the job was completed.

        • LanguageCode — (String)

          The language code for the input speech.

          Possible values include:
          • "en-US"
          • "es-US"
          • "en-AU"
          • "fr-CA"
          • "en-GB"
          • "de-DE"
          • "pt-BR"
          • "fr-FR"
          • "it-IT"
          • "ko-KR"
          • "es-ES"
        • TranscriptionJobStatus — (String)

          The status of the transcription job. When the status is COMPLETED, use the GetTranscriptionJob operation to get the results of the transcription.

          Possible values include:
          • "IN_PROGRESS"
          • "FAILED"
          • "COMPLETED"
        • FailureReason — (String)

          If the TranscriptionJobStatus field is FAILED, a description of the error.

        • OutputLocationType — (String)

          Indicates the location of the output of the transcription job.

          If the value is CUSTOMER_BUCKET then the location is the S3 bucket specified in the outputBucketName field when the transcription job was started with the StartTranscriptionJob operation.

          If the value is SERVICE_BUCKET then the output is stored by Amazon Transcribe and can be retrieved using the URI in the GetTranscriptionJob response's TranscriptFileUri field.

          Possible values include:
          • "CUSTOMER_BUCKET"
          • "SERVICE_BUCKET"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listVocabularies(params = {}, callback) ⇒ AWS.Request

Returns a list of vocabularies that match the specified criteria. If no criteria are specified, returns the entire list of vocabularies.

Service Reference:

Examples:

Calling the listVocabularies operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NameContains: 'STRING_VALUE',
  NextToken: 'STRING_VALUE',
  StateEquals: PENDING | READY | FAILED
};
transcribeservice.listVocabularies(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      If the result of the previous request to ListVocabularies was truncated, include the NextToken to fetch the next set of jobs.

    • MaxResults — (Integer)

      The maximum number of vocabularies to return in the response. If there are fewer results in the list, this response contains only the actual results.

    • StateEquals — (String)

      When specified, only returns vocabularies with the VocabularyState field equal to the specified state.

      Possible values include:
      • "PENDING"
      • "READY"
      • "FAILED"
    • NameContains — (String)

      When specified, the vocabularies returned in the list are limited to vocabularies whose name contains the specified string. The search is case-insensitive, ListVocabularies will return both "vocabularyname" and "VocabularyName" in the response list.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Status — (String)

        The requested vocabulary state.

        Possible values include:
        • "IN_PROGRESS"
        • "FAILED"
        • "COMPLETED"
      • NextToken — (String)

        The ListVocabularies operation returns a page of vocabularies at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListVocabularies operation to return in the next page of jobs.

      • Vocabularies — (Array<map>)

        A list of objects that describe the vocabularies that match the search criteria in the request.

        • VocabularyName — (String)

          The name of the vocabulary.

        • LanguageCode — (String)

          The language code of the vocabulary entries.

          Possible values include:
          • "en-US"
          • "es-US"
          • "en-AU"
          • "fr-CA"
          • "en-GB"
          • "de-DE"
          • "pt-BR"
          • "fr-FR"
          • "it-IT"
          • "ko-KR"
          • "es-ES"
        • LastModifiedTime — (Date)

          The date and time that the vocabulary was last modified.

        • VocabularyState — (String)

          The processing state of the vocabulary. If the state is READY you can use the vocabulary in a StartTranscriptionJob request.

          Possible values include:
          • "PENDING"
          • "READY"
          • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startTranscriptionJob(params = {}, callback) ⇒ AWS.Request

Starts an asynchronous job to transcribe speech to text.

Service Reference:

Examples:

Calling the startTranscriptionJob operation

var params = {
  LanguageCode: en-US | es-US | en-AU | fr-CA | en-GB | de-DE | pt-BR | fr-FR | it-IT | ko-KR | es-ES, /* required */
  Media: { /* required */
    MediaFileUri: 'STRING_VALUE'
  },
  MediaFormat: mp3 | mp4 | wav | flac, /* required */
  TranscriptionJobName: 'STRING_VALUE', /* required */
  MediaSampleRateHertz: 'NUMBER_VALUE',
  OutputBucketName: 'STRING_VALUE',
  Settings: {
    ChannelIdentification: true || false,
    MaxSpeakerLabels: 'NUMBER_VALUE',
    ShowSpeakerLabels: true || false,
    VocabularyName: 'STRING_VALUE'
  }
};
transcribeservice.startTranscriptionJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TranscriptionJobName — (String)

      The name of the job. Note that you can't use the strings "." or ".." by themselves as the job name. The name must also be unique within an AWS account.

    • LanguageCode — (String)

      The language code for the language used in the input media file.

      Possible values include:
      • "en-US"
      • "es-US"
      • "en-AU"
      • "fr-CA"
      • "en-GB"
      • "de-DE"
      • "pt-BR"
      • "fr-FR"
      • "it-IT"
      • "ko-KR"
      • "es-ES"
    • MediaSampleRateHertz — (Integer)

      The sample rate, in Hertz, of the audio track in the input media file.

    • MediaFormat — (String)

      The format of the input media file.

      Possible values include:
      • "mp3"
      • "mp4"
      • "wav"
      • "flac"
    • Media — (map)

      An object that describes the input media for a transcription job.

    • OutputBucketName — (String)

      The location where the transcription is stored.

      If you set the OutputBucketName, Amazon Transcribe puts the transcription in the specified S3 bucket. When you call the GetTranscriptionJob operation, the operation returns this location in the TranscriptFileUri field. The S3 bucket must have permissions that allow Amazon Transcribe to put files in the bucket. For more information, see Permissions Required for IAM User Roles.

      Amazon Transcribe uses the default Amazon S3 key for server-side encryption of transcripts that are placed in your S3 bucket. You can't specify your own encryption key.

      If you don't set the OutputBucketName, Amazon Transcribe generates a pre-signed URL, a shareable URL that provides secure access to your transcription, and returns it in the TranscriptFileUri field. Use this URL to download the transcription.

    • Settings — (map)

      A Settings object that provides optional settings for a transcription job.

      • VocabularyName — (String)

        The name of a vocabulary to use when processing the transcription job.

      • ShowSpeakerLabels — (Boolean)

        Determines whether the transcription job uses speaker recognition to identify different speakers in the input audio. Speaker recognition labels individual speakers in the audio file. If you set the ShowSpeakerLabels field to true, you must also set the maximum number of speaker labels MaxSpeakerLabels field.

        You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

      • MaxSpeakerLabels — (Integer)

        The maximum number of speakers to identify in the input audio. If there are more speakers in the audio than this number, multiple speakers will be identified as a single speaker. If you specify the MaxSpeakerLabels field, you must set the ShowSpeakerLabels field to true.

      • ChannelIdentification — (Boolean)

        Instructs Amazon Transcribe to process each audio channel separately and then merge the transcription output of each channel into a single transcription.

        Amazon Transcribe also produces a transcription of each item detected on an audio channel, including the start time and end time of the item and alternative transcriptions of the item including the confidence that Amazon Transcribe has in the transcription.

        You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TranscriptionJob — (map)

        An object containing details of the asynchronous transcription job.

        • TranscriptionJobName — (String)

          The name of the transcription job.

        • TranscriptionJobStatus — (String)

          The status of the transcription job.

          Possible values include:
          • "IN_PROGRESS"
          • "FAILED"
          • "COMPLETED"
        • LanguageCode — (String)

          The language code for the input speech.

          Possible values include:
          • "en-US"
          • "es-US"
          • "en-AU"
          • "fr-CA"
          • "en-GB"
          • "de-DE"
          • "pt-BR"
          • "fr-FR"
          • "it-IT"
          • "ko-KR"
          • "es-ES"
        • MediaSampleRateHertz — (Integer)

          The sample rate, in Hertz, of the audio track in the input media file.

        • MediaFormat — (String)

          The format of the input media file.

          Possible values include:
          • "mp3"
          • "mp4"
          • "wav"
          • "flac"
        • Media — (map)

          An object that describes the input media for the transcription job.

        • Transcript — (map)

          An object that describes the output of the transcription job.

          • TranscriptFileUri — (String)

            The location where the transcription is stored.

            Use this URI to access the transcription. If you specified an S3 bucket in the OutputBucketName field when you created the job, this is the URI of that bucket. If you chose to store the transcription in Amazon Transcribe, this is a shareable URL that provides secure access to that location.

        • CreationTime — (Date)

          A timestamp that shows when the job was created.

        • CompletionTime — (Date)

          A timestamp that shows when the job was completed.

        • FailureReason — (String)

          If the TranscriptionJobStatus field is FAILED, this field contains information about why the job failed.

          The FailureReason field can contain one of the following values:

          • Unsupported media format - The media format specified in the MediaFormat field of the request isn't valid. See the description of the MediaFormat field for a list of valid values.

          • The media format provided does not match the detected media format - The media format of the audio file doesn't match the format specified in the MediaFormat field in the request. Check the media format of your media file and make sure that the two values match.

          • Invalid sample rate for audio file - The sample rate specified in the MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and 48000 Hertz.

          • The sample rate provided does not match the detected sample rate - The sample rate in the audio file doesn't match the sample rate specified in the MediaSampleRateHertz field in the request. Check the sample rate of your media file and make sure that the two values match.

          • Invalid file size: file size too large - The size of your audio file is larger than Amazon Transcribe can process. For more information, see Limits in the Amazon Transcribe Developer Guide.

          • Invalid number of channels: number of channels too large - Your audio contains more channels than Amazon Transcribe is configured to process. To request additional channels, see Amazon Transcribe Limits in the Amazon Web Services General Reference.

        • Settings — (map)

          Optional settings for the transcription job. Use these settings to turn on speaker recognition, to set the maximum number of speakers that should be identified and to specify a custom vocabulary to use when processing the transcription job.

          • VocabularyName — (String)

            The name of a vocabulary to use when processing the transcription job.

          • ShowSpeakerLabels — (Boolean)

            Determines whether the transcription job uses speaker recognition to identify different speakers in the input audio. Speaker recognition labels individual speakers in the audio file. If you set the ShowSpeakerLabels field to true, you must also set the maximum number of speaker labels MaxSpeakerLabels field.

            You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

          • MaxSpeakerLabels — (Integer)

            The maximum number of speakers to identify in the input audio. If there are more speakers in the audio than this number, multiple speakers will be identified as a single speaker. If you specify the MaxSpeakerLabels field, you must set the ShowSpeakerLabels field to true.

          • ChannelIdentification — (Boolean)

            Instructs Amazon Transcribe to process each audio channel separately and then merge the transcription output of each channel into a single transcription.

            Amazon Transcribe also produces a transcription of each item detected on an audio channel, including the start time and end time of the item and alternative transcriptions of the item including the confidence that Amazon Transcribe has in the transcription.

            You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateVocabulary(params = {}, callback) ⇒ AWS.Request

Updates an existing vocabulary with new values. The UpdateVocabulary operation overwrites all of the existing information with the values that you provide in the request.

Service Reference:

Examples:

Calling the updateVocabulary operation

var params = {
  LanguageCode: en-US | es-US | en-AU | fr-CA | en-GB | de-DE | pt-BR | fr-FR | it-IT | ko-KR | es-ES, /* required */
  VocabularyName: 'STRING_VALUE', /* required */
  Phrases: [
    'STRING_VALUE',
    /* more items */
  ],
  VocabularyFileUri: 'STRING_VALUE'
};
transcribeservice.updateVocabulary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • VocabularyName — (String)

        The name of the vocabulary that was updated.

      • LanguageCode — (String)

        The language code of the vocabulary entries.

        Possible values include:
        • "en-US"
        • "es-US"
        • "en-AU"
        • "fr-CA"
        • "en-GB"
        • "de-DE"
        • "pt-BR"
        • "fr-FR"
        • "it-IT"
        • "ko-KR"
        • "es-ES"
      • LastModifiedTime — (Date)

        The date and time that the vocabulary was updated.

      • VocabularyState — (String)

        The processing state of the vocabulary. When the VocabularyState field contains READY the vocabulary is ready to be used in a StartTranscriptionJob request.

        Possible values include:
        • "PENDING"
        • "READY"
        • "FAILED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.