Documentation ¶
Overview ¶
Package transcribeservice provides the client and types for making API requests to Amazon Transcribe Service.
Operations and objects for transcribing speech to text.
See https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26 for more information on this service.
See transcribeservice package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/transcribeservice/
Using the Client ¶
To Amazon Transcribe Service with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the Amazon Transcribe Service client TranscribeService for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/transcribeservice/#New
Index ¶
- Constants
- type GetTranscriptionJobInput
- type GetTranscriptionJobOutput
- type GetTranscriptionJobRequest
- type LanguageCode
- type ListTranscriptionJobsInput
- type ListTranscriptionJobsOutput
- type ListTranscriptionJobsPager
- type ListTranscriptionJobsRequest
- type Media
- type MediaFormat
- type StartTranscriptionJobInput
- type StartTranscriptionJobOutput
- type StartTranscriptionJobRequest
- type TranscribeService
- func (c *TranscribeService) GetTranscriptionJobRequest(input *GetTranscriptionJobInput) GetTranscriptionJobRequest
- func (c *TranscribeService) ListTranscriptionJobsRequest(input *ListTranscriptionJobsInput) ListTranscriptionJobsRequest
- func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscriptionJobInput) StartTranscriptionJobRequest
- type Transcript
- type TranscriptionJob
- type TranscriptionJobStatus
- type TranscriptionJobSummary
Constants ¶
const ( // ErrCodeBadRequestException for service response error code // "BadRequestException". // // There is a problem with one of the input fields. Check the S3 bucket name, // make sure that the job name is not a duplicate, and confirm that you are // using the correct file format. Then resend your request. ErrCodeBadRequestException = "BadRequestException" // ErrCodeConflictException for service response error code // "ConflictException". // // The JobName field is a duplicate of a previously entered job name. Resend // your request with a different name. ErrCodeConflictException = "ConflictException" // ErrCodeInternalFailureException for service response error code // "InternalFailureException". // // There was an internal error. Check the error message and try your request // again. ErrCodeInternalFailureException = "InternalFailureException" // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // // Either you have sent too many requests or your input file is longer than // 2 hours. Wait before you resend your request, or use a smaller file and resend // the request. ErrCodeLimitExceededException = "LimitExceededException" // ErrCodeNotFoundException for service response error code // "NotFoundException". // // We can't find the requested job. Check the job name and try your request // again. ErrCodeNotFoundException = "NotFoundException" )
const ( ServiceName = "transcribe" // Service endpoint prefix API calls made to. EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetTranscriptionJobInput ¶
type GetTranscriptionJobInput struct { // The name of the job. // // TranscriptionJobName is a required field TranscriptionJobName *string `min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJobRequest
func (GetTranscriptionJobInput) GoString ¶
func (s GetTranscriptionJobInput) GoString() string
GoString returns the string representation
func (GetTranscriptionJobInput) String ¶
func (s GetTranscriptionJobInput) String() string
String returns the string representation
func (*GetTranscriptionJobInput) Validate ¶
func (s *GetTranscriptionJobInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GetTranscriptionJobOutput ¶
type GetTranscriptionJobOutput struct { // An object that contains the results of the transcription job. TranscriptionJob *TranscriptionJob `type:"structure"` // contains filtered or unexported fields }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJobResponse
func (GetTranscriptionJobOutput) GoString ¶
func (s GetTranscriptionJobOutput) GoString() string
GoString returns the string representation
func (GetTranscriptionJobOutput) SDKResponseMetadata ¶
func (s GetTranscriptionJobOutput) SDKResponseMetadata() aws.Response
SDKResponseMetdata return sthe response metadata for the API.
func (GetTranscriptionJobOutput) String ¶
func (s GetTranscriptionJobOutput) String() string
String returns the string representation
type GetTranscriptionJobRequest ¶
type GetTranscriptionJobRequest struct { *aws.Request Input *GetTranscriptionJobInput Copy func(*GetTranscriptionJobInput) GetTranscriptionJobRequest }
GetTranscriptionJobRequest is a API request type for the GetTranscriptionJob API operation.
func (GetTranscriptionJobRequest) Send ¶
func (r GetTranscriptionJobRequest) Send() (*GetTranscriptionJobOutput, error)
Send marshals and sends the GetTranscriptionJob API request.
type LanguageCode ¶
type LanguageCode string
const ( LanguageCodeEnUs LanguageCode = "en-US" LanguageCodeEsUs LanguageCode = "es-US" )
Enum values for LanguageCode
func (LanguageCode) MarshalValue ¶
func (enum LanguageCode) MarshalValue() (string, error)
func (LanguageCode) MarshalValueBuf ¶
func (enum LanguageCode) MarshalValueBuf(b []byte) ([]byte, error)
type ListTranscriptionJobsInput ¶
type ListTranscriptionJobsInput struct { // The maximum number of jobs to return in the response. MaxResults *int64 `min:"1" type:"integer"` // If the result of the previous request to ListTranscriptionJobs was truncated, // include the NextToken to fetch the next set of jobs. NextToken *string `type:"string"` // When specified, returns only transcription jobs with the specified status. // // Status is a required field Status TranscriptionJobStatus `type:"string" required:"true" enum:"true"` // contains filtered or unexported fields }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobsRequest
func (ListTranscriptionJobsInput) GoString ¶
func (s ListTranscriptionJobsInput) GoString() string
GoString returns the string representation
func (ListTranscriptionJobsInput) String ¶
func (s ListTranscriptionJobsInput) String() string
String returns the string representation
func (*ListTranscriptionJobsInput) Validate ¶
func (s *ListTranscriptionJobsInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ListTranscriptionJobsOutput ¶
type ListTranscriptionJobsOutput struct { // The ListTranscriptionJobs operation returns a page of jobs at a time. The // 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. NextToken *string `type:"string"` // The requested status of the jobs returned. Status TranscriptionJobStatus `type:"string" enum:"true"` // A list of objects containing summary information for a transcription job. TranscriptionJobSummaries []TranscriptionJobSummary `type:"list"` // contains filtered or unexported fields }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobsResponse
func (ListTranscriptionJobsOutput) GoString ¶
func (s ListTranscriptionJobsOutput) GoString() string
GoString returns the string representation
func (ListTranscriptionJobsOutput) SDKResponseMetadata ¶
func (s ListTranscriptionJobsOutput) SDKResponseMetadata() aws.Response
SDKResponseMetdata return sthe response metadata for the API.
func (ListTranscriptionJobsOutput) String ¶
func (s ListTranscriptionJobsOutput) String() string
String returns the string representation
type ListTranscriptionJobsPager ¶
ListTranscriptionJobsPager is used to paginate the request. This can be done by calling Next and CurrentPage.
func (*ListTranscriptionJobsPager) CurrentPage ¶
func (p *ListTranscriptionJobsPager) CurrentPage() *ListTranscriptionJobsOutput
type ListTranscriptionJobsRequest ¶
type ListTranscriptionJobsRequest struct { *aws.Request Input *ListTranscriptionJobsInput Copy func(*ListTranscriptionJobsInput) ListTranscriptionJobsRequest }
ListTranscriptionJobsRequest is a API request type for the ListTranscriptionJobs API operation.
func (*ListTranscriptionJobsRequest) Paginate ¶
func (p *ListTranscriptionJobsRequest) Paginate(opts ...aws.Option) ListTranscriptionJobsPager
Paginate pages iterates over the pages of a ListTranscriptionJobsRequest operation, calling the Next method for each page. Using the paginators Next method will depict whether or not there are more pages.
Note: This operation can generate multiple requests to a service.
// Example iterating over at most 3 pages of a ListTranscriptionJobs operation. req := client.ListTranscriptionJobsRequest(input) p := req.Paginate() for p.Next() { page := p.CurrentPage() } if err := p.Err(); err != nil { return err }
func (ListTranscriptionJobsRequest) Send ¶
func (r ListTranscriptionJobsRequest) Send() (*ListTranscriptionJobsOutput, error)
Send marshals and sends the ListTranscriptionJobs API request.
type Media ¶
type Media struct { // The S3 location of the input media file. The general form is: // // https://<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey> // // For example: // // https://s3-us-west-2.amazonaws.com/examplebucket/example.mp4 // // https://s3-us-west-2.amazonaws.com/examplebucket/mediadocs/example.mp4 MediaFileUri *string `min:"1" type:"string"` // contains filtered or unexported fields }
Describes the input media file in a transcription request. Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/Media
type MediaFormat ¶
type MediaFormat string
const ( MediaFormatMp3 MediaFormat = "mp3" MediaFormatMp4 MediaFormat = "mp4" MediaFormatWav MediaFormat = "wav" MediaFormatFlac MediaFormat = "flac" )
Enum values for MediaFormat
func (MediaFormat) MarshalValue ¶
func (enum MediaFormat) MarshalValue() (string, error)
func (MediaFormat) MarshalValueBuf ¶
func (enum MediaFormat) MarshalValueBuf(b []byte) ([]byte, error)
type StartTranscriptionJobInput ¶
type StartTranscriptionJobInput struct { // The language code for the language used in the input media file. // // LanguageCode is a required field LanguageCode LanguageCode `type:"string" required:"true" enum:"true"` // An object that describes the input media for a transcription job. // // Media is a required field Media *Media `type:"structure" required:"true"` // The format of the input media file. // // MediaFormat is a required field MediaFormat MediaFormat `type:"string" required:"true" enum:"true"` // The sample rate, in Hertz, of the audio track in the input media file. MediaSampleRateHertz *int64 `min:"8000" type:"integer"` // The name of the job. The name must be unique within an AWS account. // // TranscriptionJobName is a required field TranscriptionJobName *string `min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJobRequest
func (StartTranscriptionJobInput) GoString ¶
func (s StartTranscriptionJobInput) GoString() string
GoString returns the string representation
func (StartTranscriptionJobInput) String ¶
func (s StartTranscriptionJobInput) String() string
String returns the string representation
func (*StartTranscriptionJobInput) Validate ¶
func (s *StartTranscriptionJobInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type StartTranscriptionJobOutput ¶
type StartTranscriptionJobOutput struct { // An object containing details of the asynchronous transcription job. TranscriptionJob *TranscriptionJob `type:"structure"` // contains filtered or unexported fields }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJobResponse
func (StartTranscriptionJobOutput) GoString ¶
func (s StartTranscriptionJobOutput) GoString() string
GoString returns the string representation
func (StartTranscriptionJobOutput) SDKResponseMetadata ¶
func (s StartTranscriptionJobOutput) SDKResponseMetadata() aws.Response
SDKResponseMetdata return sthe response metadata for the API.
func (StartTranscriptionJobOutput) String ¶
func (s StartTranscriptionJobOutput) String() string
String returns the string representation
type StartTranscriptionJobRequest ¶
type StartTranscriptionJobRequest struct { *aws.Request Input *StartTranscriptionJobInput Copy func(*StartTranscriptionJobInput) StartTranscriptionJobRequest }
StartTranscriptionJobRequest is a API request type for the StartTranscriptionJob API operation.
func (StartTranscriptionJobRequest) Send ¶
func (r StartTranscriptionJobRequest) Send() (*StartTranscriptionJobOutput, error)
Send marshals and sends the StartTranscriptionJob API request.
type TranscribeService ¶
TranscribeService provides the API operation methods for making requests to Amazon Transcribe Service. See this package's package overview docs for details on the service.
TranscribeService methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(config aws.Config) *TranscribeService
New creates a new instance of the TranscribeService client with a config.
Example:
// Create a TranscribeService client from just a config. svc := transcribeservice.New(myConfig)
func (*TranscribeService) GetTranscriptionJobRequest ¶
func (c *TranscribeService) GetTranscriptionJobRequest(input *GetTranscriptionJobInput) GetTranscriptionJobRequest
GetTranscriptionJobRequest returns a request value for making API operation for Amazon Transcribe Service.
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.
// Example sending a request using the GetTranscriptionJobRequest method. req := client.GetTranscriptionJobRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/GetTranscriptionJob
func (*TranscribeService) ListTranscriptionJobsRequest ¶
func (c *TranscribeService) ListTranscriptionJobsRequest(input *ListTranscriptionJobsInput) ListTranscriptionJobsRequest
ListTranscriptionJobsRequest returns a request value for making API operation for Amazon Transcribe Service.
Lists transcription jobs with the specified status.
// Example sending a request using the ListTranscriptionJobsRequest method. req := client.ListTranscriptionJobsRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/ListTranscriptionJobs
func (*TranscribeService) StartTranscriptionJobRequest ¶
func (c *TranscribeService) StartTranscriptionJobRequest(input *StartTranscriptionJobInput) StartTranscriptionJobRequest
StartTranscriptionJobRequest returns a request value for making API operation for Amazon Transcribe Service.
Starts an asynchronous job to transcribe speech to text.
// Example sending a request using the StartTranscriptionJobRequest method. req := client.StartTranscriptionJobRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/StartTranscriptionJob
type Transcript ¶
type Transcript struct { // The S3 location where the transcription result is stored. The general form // of this Uri is: // // https://<aws-region>.amazonaws.com/<bucket-name>/<keyprefix>/<objectkey> // // For example: // // https://s3-us-west-2.amazonaws.com/examplebucket/example.json // // https://s3-us-west-2.amazonaws.com/examplebucket/mediadocs/example.json TranscriptFileUri *string `min:"1" type:"string"` // contains filtered or unexported fields }
Describes the output of a transcription job. Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/Transcript
func (Transcript) GoString ¶
func (s Transcript) GoString() string
GoString returns the string representation
func (Transcript) String ¶
func (s Transcript) String() string
String returns the string representation
type TranscriptionJob ¶
type TranscriptionJob struct { // Timestamp of the date and time that the job completed. CompletionTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Timestamp of the date and time that the job was created. CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` // If the TranscriptionJobStatus field is FAILED, this field contains information // about why the job failed. FailureReason *string `type:"string"` // The language code for the input speech. LanguageCode LanguageCode `type:"string" enum:"true"` // An object that describes the input media for a transcription job. Media *Media `type:"structure"` // The format of the input media file. MediaFormat MediaFormat `type:"string" enum:"true"` // The sample rate, in Hertz, of the audio track in the input media file. MediaSampleRateHertz *int64 `min:"8000" type:"integer"` // An object that describes the output of the transcription job. Transcript *Transcript `type:"structure"` // A name to identify the transcription job. TranscriptionJobName *string `min:"1" type:"string"` // The identifier assigned to the job when it was created. TranscriptionJobStatus TranscriptionJobStatus `type:"string" enum:"true"` // contains filtered or unexported fields }
Describes an asynchronous transcription job that was created with the StartTranscriptionJob operation. Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/TranscriptionJob
func (TranscriptionJob) GoString ¶
func (s TranscriptionJob) GoString() string
GoString returns the string representation
func (TranscriptionJob) String ¶
func (s TranscriptionJob) String() string
String returns the string representation
type TranscriptionJobStatus ¶
type TranscriptionJobStatus string
const ( TranscriptionJobStatusInProgress TranscriptionJobStatus = "IN_PROGRESS" TranscriptionJobStatusFailed TranscriptionJobStatus = "FAILED" TranscriptionJobStatusCompleted TranscriptionJobStatus = "COMPLETED" )
Enum values for TranscriptionJobStatus
func (TranscriptionJobStatus) MarshalValue ¶
func (enum TranscriptionJobStatus) MarshalValue() (string, error)
func (TranscriptionJobStatus) MarshalValueBuf ¶
func (enum TranscriptionJobStatus) MarshalValueBuf(b []byte) ([]byte, error)
type TranscriptionJobSummary ¶
type TranscriptionJobSummary struct { // Timestamp of the date and time that the job completed. CompletionTime *time.Time `type:"timestamp" timestampFormat:"unix"` // Timestamp of the date and time that the job was created. CreationTime *time.Time `type:"timestamp" timestampFormat:"unix"` // If the TranscriptionJobStatus field is FAILED, this field contains a description // of the error. FailureReason *string `type:"string"` // The language code for the input speech. LanguageCode LanguageCode `type:"string" enum:"true"` // The name assigned to the transcription job when it was created. TranscriptionJobName *string `min:"1" type:"string"` // The status of the transcription job. When the status is COMPLETED, use the // GetTranscriptionJob operation to get the results of the transcription. TranscriptionJobStatus TranscriptionJobStatus `type:"string" enum:"true"` // contains filtered or unexported fields }
Provides a summary of information about a transcription job. Please also see https://docs.aws.amazon.com/goto/WebAPI/transcribe-2017-10-26/TranscriptionJobSummary
func (TranscriptionJobSummary) GoString ¶
func (s TranscriptionJobSummary) GoString() string
GoString returns the string representation
func (TranscriptionJobSummary) String ¶
func (s TranscriptionJobSummary) String() string
String returns the string representation
Directories ¶
Path | Synopsis |
---|---|
Package transcribeserviceiface provides an interface to enable mocking the Amazon Transcribe Service service client for testing your code.
|
Package transcribeserviceiface provides an interface to enable mocking the Amazon Transcribe Service service client for testing your code. |