Documentation
¶
Index ¶
- type Alternative
- type AudioEvent
- type AudioStream
- type AudioStreamMemberAudioEvent
- type BadRequestException
- type ConflictException
- type ContentIdentificationType
- type ContentRedactionType
- type Entity
- type InternalFailureException
- type Item
- type ItemType
- type LanguageCode
- type LanguageWithScore
- type LimitExceededException
- type MediaEncoding
- type MedicalAlternative
- type MedicalContentIdentificationType
- type MedicalEntity
- type MedicalItem
- type MedicalResult
- type MedicalTranscript
- type MedicalTranscriptEvent
- type MedicalTranscriptResultStream
- type MedicalTranscriptResultStreamMemberTranscriptEvent
- type PartialResultsStability
- type Result
- type ServiceUnavailableException
- type Specialty
- type Transcript
- type TranscriptEvent
- type TranscriptResultStream
- type TranscriptResultStreamMemberTranscriptEvent
- type Type
- type UnknownUnionMember
- type VocabularyFilterMethod
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alternative ¶
type Alternative struct { // Contains the entities identified as personally identifiable information (PII) in // the transcription output. Entities []Entity // One or more alternative interpretations of the input audio. Items []Item // The text that was transcribed from the audio. Transcript *string // contains filtered or unexported fields }
A list of possible transcriptions for the audio.
type AudioEvent ¶
type AudioEvent struct { // An audio blob that contains the next part of the audio that you want to // transcribe. The maximum audio chunk size is 32 KB. AudioChunk []byte // contains filtered or unexported fields }
Provides a wrapper for the audio chunks that you are sending. For information on audio encoding in Amazon Transcribe, see Speech input (https://docs.aws.amazon.com/transcribe/latest/dg/input.html). For information on audio encoding formats in Amazon Transcribe Medical, see Speech input (https://docs.aws.amazon.com/transcribe/latest/dg/input-med.html).
type AudioStream ¶
type AudioStream interface {
// contains filtered or unexported methods
}
Represents the audio stream from your application to Amazon Transcribe.
The following types satisfy this interface:
AudioStreamMemberAudioEvent
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/transcribestreaming/types" ) func main() { var union types.AudioStream // type switches can be used to check the union value switch v := union.(type) { case *types.AudioStreamMemberAudioEvent: _ = v.Value // Value is types.AudioEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type AudioStreamMemberAudioEvent ¶
type AudioStreamMemberAudioEvent struct { Value AudioEvent // contains filtered or unexported fields }
A blob of audio from your application. You audio stream consists of one or more audio events. For information on audio encoding formats in Amazon Transcribe, see Speech input (https://docs.aws.amazon.com/transcribe/latest/dg/input.html). For information on audio encoding formats in Amazon Transcribe Medical, see Speech input (https://docs.aws.amazon.com/transcribe/latest/dg/input-med.html). For more information on stream encoding in Amazon Transcribe, see Event stream encoding (https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html). For information on stream encoding in Amazon Transcribe Medical, see Event stream encoding (https://docs.aws.amazon.com/transcribe/latest/dg/event-stream-med.html).
type BadRequestException ¶
type BadRequestException struct { Message *string // contains filtered or unexported fields }
One or more arguments to the StartStreamTranscription or StartMedicalStreamTranscription operation was invalid. For example, MediaEncoding was not set to a valid encoding, or LanguageCode was not set to a valid code. Check the parameters and try your request again.
func (*BadRequestException) Error ¶
func (e *BadRequestException) Error() string
func (*BadRequestException) ErrorCode ¶
func (e *BadRequestException) ErrorCode() string
func (*BadRequestException) ErrorFault ¶
func (e *BadRequestException) ErrorFault() smithy.ErrorFault
func (*BadRequestException) ErrorMessage ¶
func (e *BadRequestException) ErrorMessage() string
type ConflictException ¶
type ConflictException struct { Message *string // contains filtered or unexported fields }
A new stream started with the same session ID. The current stream has been terminated.
func (*ConflictException) Error ¶
func (e *ConflictException) Error() string
func (*ConflictException) ErrorCode ¶
func (e *ConflictException) ErrorCode() string
func (*ConflictException) ErrorFault ¶
func (e *ConflictException) ErrorFault() smithy.ErrorFault
func (*ConflictException) ErrorMessage ¶
func (e *ConflictException) ErrorMessage() string
type ContentIdentificationType ¶
type ContentIdentificationType string
const (
ContentIdentificationTypePii ContentIdentificationType = "PII"
)
Enum values for ContentIdentificationType
func (ContentIdentificationType) Values ¶
func (ContentIdentificationType) Values() []ContentIdentificationType
Values returns all known values for ContentIdentificationType. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type ContentRedactionType ¶
type ContentRedactionType string
const (
ContentRedactionTypePii ContentRedactionType = "PII"
)
Enum values for ContentRedactionType
func (ContentRedactionType) Values ¶
func (ContentRedactionType) Values() []ContentRedactionType
Values returns all known values for ContentRedactionType. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type Entity ¶
type Entity struct { // The category of information identified in this entity; for example, PII. Category *string // A value between zero and one that Amazon Transcribe assigns to PII identified in // the source audio. Larger values indicate a higher confidence in PII // identification. Confidence *float64 // The words in the transcription output that have been identified as a PII entity. Content *string // The end time of speech that was identified as PII. EndTime float64 // The start time of speech that was identified as PII. StartTime float64 // The type of PII identified in this entity; for example, name or credit card // number. Type *string // contains filtered or unexported fields }
The entity identified as personally identifiable information (PII).
type InternalFailureException ¶
type InternalFailureException struct { Message *string // contains filtered or unexported fields }
A problem occurred while processing the audio. Amazon Transcribe or Amazon Transcribe Medical terminated processing. Try your request again.
func (*InternalFailureException) Error ¶
func (e *InternalFailureException) Error() string
func (*InternalFailureException) ErrorCode ¶
func (e *InternalFailureException) ErrorCode() string
func (*InternalFailureException) ErrorFault ¶
func (e *InternalFailureException) ErrorFault() smithy.ErrorFault
func (*InternalFailureException) ErrorMessage ¶
func (e *InternalFailureException) ErrorMessage() string
type Item ¶
type Item struct { // A value between zero and one for an item that is a confidence score that Amazon // Transcribe assigns to each word or phrase that it transcribes. Confidence *float64 // The word or punctuation that was recognized in the input audio. Content *string // The offset from the beginning of the audio stream to the end of the audio that // resulted in the item. EndTime float64 // If speaker identification is enabled, shows the speakers identified in the media // stream. Speaker *string // If partial result stabilization has been enabled, indicates whether the word or // phrase in the item is stable. If Stable is true, the result is stable. Stable *bool // The offset from the beginning of the audio stream to the beginning of the audio // that resulted in the item. StartTime float64 // The type of the item. PRONUNCIATION indicates that the item is a word that was // recognized in the input audio. PUNCTUATION indicates that the item was // interpreted as a pause in the input audio. Type ItemType // Indicates whether a word in the item matches a word in the vocabulary filter // you've chosen for your media stream. If true then a word in the item matches // your vocabulary filter. VocabularyFilterMatch bool // contains filtered or unexported fields }
A word, phrase, or punctuation mark that is transcribed from the input audio.
type ItemType ¶
type ItemType string
type LanguageCode ¶
type LanguageCode string
const ( LanguageCodeEnUs LanguageCode = "en-US" LanguageCodeEnGb LanguageCode = "en-GB" LanguageCodeEsUs LanguageCode = "es-US" LanguageCodeFrCa LanguageCode = "fr-CA" LanguageCodeFrFr LanguageCode = "fr-FR" LanguageCodeEnAu LanguageCode = "en-AU" LanguageCodeItIt LanguageCode = "it-IT" LanguageCodeDeDe LanguageCode = "de-DE" LanguageCodePtBr LanguageCode = "pt-BR" LanguageCodeJaJp LanguageCode = "ja-JP" LanguageCodeKoKr LanguageCode = "ko-KR" LanguageCodeZhCn LanguageCode = "zh-CN" )
Enum values for LanguageCode
func (LanguageCode) Values ¶
func (LanguageCode) Values() []LanguageCode
Values returns all known values for LanguageCode. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type LanguageWithScore ¶ added in v1.1.0
type LanguageWithScore struct { // The language code of the language identified by Amazon Transcribe. LanguageCode LanguageCode // The confidence score for the associated language code. Confidence scores are // values between zero and one; larger values indicate a higher confidence in the // identified language. Score float64 // contains filtered or unexported fields }
The language codes of the identified languages and their associated confidence scores. The confidence score is a value between zero and one; a larger value indicates a higher confidence in the identified language.
type LimitExceededException ¶
type LimitExceededException struct { Message *string // contains filtered or unexported fields }
You have exceeded the maximum number of concurrent transcription streams, are starting transcription streams too quickly, or the maximum audio length of 4 hours. Wait until a stream has finished processing, or break your audio stream into smaller chunks and try your request again.
func (*LimitExceededException) Error ¶
func (e *LimitExceededException) Error() string
func (*LimitExceededException) ErrorCode ¶
func (e *LimitExceededException) ErrorCode() string
func (*LimitExceededException) ErrorFault ¶
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault
func (*LimitExceededException) ErrorMessage ¶
func (e *LimitExceededException) ErrorMessage() string
type MediaEncoding ¶
type MediaEncoding string
const ( MediaEncodingPcm MediaEncoding = "pcm" MediaEncodingOggOpus MediaEncoding = "ogg-opus" MediaEncodingFlac MediaEncoding = "flac" )
Enum values for MediaEncoding
func (MediaEncoding) Values ¶
func (MediaEncoding) Values() []MediaEncoding
Values returns all known values for MediaEncoding. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type MedicalAlternative ¶
type MedicalAlternative struct { // Contains the medical entities identified as personal health information in the // transcription output. Entities []MedicalEntity // A list of objects that contains words and punctuation marks that represents one // or more interpretations of the input audio. Items []MedicalItem // The text that was transcribed from the audio. Transcript *string // contains filtered or unexported fields }
A list of possible transcriptions for the audio.
type MedicalContentIdentificationType ¶
type MedicalContentIdentificationType string
const (
MedicalContentIdentificationTypePhi MedicalContentIdentificationType = "PHI"
)
Enum values for MedicalContentIdentificationType
func (MedicalContentIdentificationType) Values ¶
func (MedicalContentIdentificationType) Values() []MedicalContentIdentificationType
Values returns all known values for MedicalContentIdentificationType. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type MedicalEntity ¶
type MedicalEntity struct { // The type of personal health information of the medical entity. Category *string // A value between zero and one that Amazon Transcribe Medical assigned to the // personal health information that it identified in the source audio. Larger // values indicate that Amazon Transcribe Medical has higher confidence in the // personal health information that it identified. Confidence *float64 // The word or words in the transcription output that have been identified as a // medical entity. Content *string // The end time of the speech that was identified as a medical entity. EndTime float64 // The start time of the speech that was identified as a medical entity. StartTime float64 // contains filtered or unexported fields }
The medical entity identified as personal health information.
type MedicalItem ¶
type MedicalItem struct { // A value between 0 and 1 for an item that is a confidence score that Amazon // Transcribe Medical assigns to each word that it transcribes. Confidence *float64 // The word or punctuation mark that was recognized in the input audio. Content *string // The number of seconds into an audio stream that indicates the creation time of // an item. EndTime float64 // If speaker identification is enabled, shows the integer values that correspond // to the different speakers identified in the stream. For example, if the value of // Speaker in the stream is either a 0 or a 1, that indicates that Amazon // Transcribe Medical has identified two speakers in the stream. The value of 0 // corresponds to one speaker and the value of 1 corresponds to the other speaker. Speaker *string // The number of seconds into an audio stream that indicates the creation time of // an item. StartTime float64 // The type of the item. PRONUNCIATION indicates that the item is a word that was // recognized in the input audio. PUNCTUATION indicates that the item was // interpreted as a pause in the input audio, such as a period to indicate the end // of a sentence. Type ItemType // contains filtered or unexported fields }
A word, phrase, or punctuation mark that is transcribed from the input audio.
type MedicalResult ¶
type MedicalResult struct { // A list of possible transcriptions of the audio. Each alternative typically // contains one Item that contains the result of the transcription. Alternatives []MedicalAlternative // When channel identification is enabled, Amazon Transcribe Medical transcribes // the speech from each audio channel separately. You can use ChannelId to retrieve // the transcription results for a single channel in your audio stream. ChannelId *string // The time, in seconds, from the beginning of the audio stream to the end of the // result. EndTime float64 // Amazon Transcribe Medical divides the incoming audio stream into segments at // natural points in the audio. Transcription results are returned based on these // segments. The IsPartial field is true to indicate that Amazon Transcribe Medical // has additional transcription data to send. The IsPartial field is false to // indicate that this is the last transcription result for the segment. IsPartial bool // A unique identifier for the result. ResultId *string // The time, in seconds, from the beginning of the audio stream to the beginning of // the result. StartTime float64 // contains filtered or unexported fields }
The results of transcribing a portion of the input audio stream.
type MedicalTranscript ¶
type MedicalTranscript struct { // MedicalResult objects that contain the results of transcribing a portion of the // input audio stream. The array can be empty. Results []MedicalResult // contains filtered or unexported fields }
The medical transcript in a MedicalTranscriptEvent.
type MedicalTranscriptEvent ¶
type MedicalTranscriptEvent struct { // The transcription of the audio stream. The transcription is composed of all of // the items in the results list. Transcript *MedicalTranscript // contains filtered or unexported fields }
Represents a set of transcription results from the server to the client. It contains one or more segments of the transcription.
type MedicalTranscriptResultStream ¶
type MedicalTranscriptResultStream interface {
// contains filtered or unexported methods
}
Represents the transcription result stream from Amazon Transcribe Medical to your application.
The following types satisfy this interface:
MedicalTranscriptResultStreamMemberTranscriptEvent
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/transcribestreaming/types" ) func main() { var union types.MedicalTranscriptResultStream // type switches can be used to check the union value switch v := union.(type) { case *types.MedicalTranscriptResultStreamMemberTranscriptEvent: _ = v.Value // Value is types.MedicalTranscriptEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type MedicalTranscriptResultStreamMemberTranscriptEvent ¶
type MedicalTranscriptResultStreamMemberTranscriptEvent struct { Value MedicalTranscriptEvent // contains filtered or unexported fields }
A portion of the transcription of the audio stream. Events are sent periodically from Amazon Transcribe Medical to your application. The event can be a partial transcription of a section of the audio stream, or it can be the entire transcription of that portion of the audio stream.
type PartialResultsStability ¶
type PartialResultsStability string
const ( PartialResultsStabilityHigh PartialResultsStability = "high" PartialResultsStabilityMedium PartialResultsStability = "medium" PartialResultsStabilityLow PartialResultsStability = "low" )
Enum values for PartialResultsStability
func (PartialResultsStability) Values ¶
func (PartialResultsStability) Values() []PartialResultsStability
Values returns all known values for PartialResultsStability. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.
type Result ¶
type Result struct { // A list of possible transcriptions for the audio. Each alternative typically // contains one item that contains the result of the transcription. Alternatives []Alternative // When channel identification is enabled, Amazon Transcribe transcribes the speech // from each audio channel separately. You can use ChannelId to retrieve the // transcription results for a single channel in your audio stream. ChannelId *string // The offset in seconds from the beginning of the audio stream to the end of the // result. EndTime float64 // Amazon Transcribe divides the incoming audio stream into segments at natural // points in the audio. Transcription results are returned based on these segments. // The IsPartial field is true to indicate that Amazon Transcribe has additional // transcription data to send, false to indicate that this is the last // transcription result for the segment. IsPartial bool // The language code of the identified language in your media stream. LanguageCode LanguageCode // The language code of the dominant language identified in your media. LanguageIdentification []LanguageWithScore // A unique identifier for the result. ResultId *string // The offset in seconds from the beginning of the audio stream to the beginning of // the result. StartTime float64 // contains filtered or unexported fields }
The result of transcribing a portion of the input audio stream.
type ServiceUnavailableException ¶
type ServiceUnavailableException struct { // contains filtered or unexported fields }
Service is currently unavailable. Try your request later.
func (*ServiceUnavailableException) Error ¶
func (e *ServiceUnavailableException) Error() string
func (*ServiceUnavailableException) ErrorCode ¶
func (e *ServiceUnavailableException) ErrorCode() string
func (*ServiceUnavailableException) ErrorFault ¶
func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault
func (*ServiceUnavailableException) ErrorMessage ¶
func (e *ServiceUnavailableException) ErrorMessage() string
type Specialty ¶
type Specialty string
type Transcript ¶
type Transcript struct { // Result objects that contain the results of transcribing a portion of the input // audio stream. The array can be empty. Results []Result // contains filtered or unexported fields }
The transcription in a TranscriptEvent.
type TranscriptEvent ¶
type TranscriptEvent struct { // The transcription of the audio stream. The transcription is composed of all of // the items in the results list. Transcript *Transcript // contains filtered or unexported fields }
Represents a set of transcription results from the server to the client. It contains one or more segments of the transcription.
type TranscriptResultStream ¶
type TranscriptResultStream interface {
// contains filtered or unexported methods
}
Represents the transcription result stream from Amazon Transcribe to your application.
The following types satisfy this interface:
TranscriptResultStreamMemberTranscriptEvent
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/transcribestreaming/types" ) func main() { var union types.TranscriptResultStream // type switches can be used to check the union value switch v := union.(type) { case *types.TranscriptResultStreamMemberTranscriptEvent: _ = v.Value // Value is types.TranscriptEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type TranscriptResultStreamMemberTranscriptEvent ¶
type TranscriptResultStreamMemberTranscriptEvent struct { Value TranscriptEvent // contains filtered or unexported fields }
A portion of the transcription of the audio stream. Events are sent periodically from Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio stream, or it can be the entire transcription of that portion of the audio stream.
type UnknownUnionMember ¶
type UnknownUnionMember struct { Tag string Value []byte // contains filtered or unexported fields }
UnknownUnionMember is returned when a union member is returned over the wire, but has an unknown tag.
type VocabularyFilterMethod ¶
type VocabularyFilterMethod string
const ( VocabularyFilterMethodRemove VocabularyFilterMethod = "remove" VocabularyFilterMethodMask VocabularyFilterMethod = "mask" VocabularyFilterMethodTag VocabularyFilterMethod = "tag" )
Enum values for VocabularyFilterMethod
func (VocabularyFilterMethod) Values ¶
func (VocabularyFilterMethod) Values() []VocabularyFilterMethod
Values returns all known values for VocabularyFilterMethod. Note that this can be expanded in the future, and so it is only as up to date as the client. The ordering of this slice is not guaranteed to be stable across updates.