You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::TranscribeService::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-transcribeservice/lib/aws-sdk-transcribeservice/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-transcribeservice/lib/aws-sdk-transcribeservice/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#get_transcription_job(params = {}) ⇒ Types::GetTranscriptionJobResponse

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

Examples:

Request syntax with placeholder values


resp = client.get_transcription_job({
  transcription_job_name: "TranscriptionJobName", # required
})

Response structure


resp.transcription_job.transcription_job_name #=> String
resp.transcription_job.transcription_job_status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
resp.transcription_job.language_code #=> String, one of "en-US", "es-US"
resp.transcription_job.media_sample_rate_hertz #=> Integer
resp.transcription_job.media_format #=> String, one of "mp3", "mp4", "wav", "flac"
resp.transcription_job.media.media_file_uri #=> String
resp.transcription_job.transcript.transcript_file_uri #=> String
resp.transcription_job.creation_time #=> Time
resp.transcription_job.completion_time #=> Time
resp.transcription_job.failure_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :transcription_job_name (required, String)

    The name of the job.

Returns:

See Also:



193
194
195
196
# File 'gems/aws-sdk-transcribeservice/lib/aws-sdk-transcribeservice/client.rb', line 193

def get_transcription_job(params = {}, options = {})
  req = build_request(:get_transcription_job, params)
  req.send_request(options)
end

#list_transcription_jobs(params = {}) ⇒ Types::ListTranscriptionJobsResponse

Lists transcription jobs with the specified status.

Examples:

Request syntax with placeholder values


resp = client.list_transcription_jobs({
  status: "IN_PROGRESS", # required, accepts IN_PROGRESS, FAILED, COMPLETED
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
resp.next_token #=> String
resp.transcription_job_summaries #=> Array
resp.transcription_job_summaries[0].transcription_job_name #=> String
resp.transcription_job_summaries[0].creation_time #=> Time
resp.transcription_job_summaries[0].completion_time #=> Time
resp.transcription_job_summaries[0].language_code #=> String, one of "en-US", "es-US"
resp.transcription_job_summaries[0].transcription_job_status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
resp.transcription_job_summaries[0].failure_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :status (required, String)

    When specified, returns only transcription jobs with the specified status.

  • :next_token (String)

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

  • :max_results (Integer)

    The maximum number of jobs to return in the response.

Returns:

See Also:



241
242
243
244
# File 'gems/aws-sdk-transcribeservice/lib/aws-sdk-transcribeservice/client.rb', line 241

def list_transcription_jobs(params = {}, options = {})
  req = build_request(:list_transcription_jobs, params)
  req.send_request(options)
end

#start_transcription_job(params = {}) ⇒ Types::StartTranscriptionJobResponse

Starts an asynchronous job to transcribe speech to text.

Examples:

Request syntax with placeholder values


resp = client.start_transcription_job({
  transcription_job_name: "TranscriptionJobName", # required
  language_code: "en-US", # required, accepts en-US, es-US
  media_sample_rate_hertz: 1,
  media_format: "mp3", # required, accepts mp3, mp4, wav, flac
  media: { # required
    media_file_uri: "Uri",
  },
})

Response structure


resp.transcription_job.transcription_job_name #=> String
resp.transcription_job.transcription_job_status #=> String, one of "IN_PROGRESS", "FAILED", "COMPLETED"
resp.transcription_job.language_code #=> String, one of "en-US", "es-US"
resp.transcription_job.media_sample_rate_hertz #=> Integer
resp.transcription_job.media_format #=> String, one of "mp3", "mp4", "wav", "flac"
resp.transcription_job.media.media_file_uri #=> String
resp.transcription_job.transcript.transcript_file_uri #=> String
resp.transcription_job.creation_time #=> Time
resp.transcription_job.completion_time #=> Time
resp.transcription_job.failure_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :transcription_job_name (required, String)

    The name of the job. The name must be unique within an AWS account.

  • :language_code (required, String)

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

  • :media_sample_rate_hertz (Integer)

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

  • :media_format (required, String)

    The format of the input media file.

  • :media (required, Types::Media)

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

Returns:

See Also:



296
297
298
299
# File 'gems/aws-sdk-transcribeservice/lib/aws-sdk-transcribeservice/client.rb', line 296

def start_transcription_job(params = {}, options = {})
  req = build_request(:start_transcription_job, params)
  req.send_request(options)
end