transcribe

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 23 Imported by: 0

README

Transcribe

Parity grade: A · SDK aws-sdk-go-v2/service/transcribe@v1.55.0 · last audited 2026-07-24 (92c92ff03)

Coverage

Metric Value
Operations audited 43 (43 ok)
Feature families 4 (4 ok)
Known gaps 4
Deferred items 0
Resource leaks clean
Known gaps
  • MaxResults (all List* ops) is accepted on the wire but not honored -- page size is a fixed constant (transcribeDefaultPageSize=100) regardless of the caller's requested MaxResults. AWS documents MaxResults as an upper bound the service may return fewer than, so this is non-conformant but not client-breaking (real SDK clients page via NextToken, not by asserting exact page sizes). Not fixed this pass; tracked as a future follow-up.
  • CallAnalyticsJobDetails (skipped-analytics-feature reporting) on CallAnalyticsJobSummary/CallAnalyticsJob is not implemented -- gopherstack's synthetic backend never skips any Call Analytics feature, so this optional field would always be absent/empty in a real scenario too; low priority.
  • MedicalScribeContext (StartMedicalScribeJobInput patient-context field) and MedicalScribeContextProvided (response echo of whether it was supplied) are not implemented. Since gopherstack never accepts MedicalScribeContext, MedicalScribeContextProvided would always be false, and awsjson1.1 omits false bool fields on the wire (matching the omitted-field behavior already produced by not implementing it) -- low priority, not client-breaking.
  • LanguageIdSettings keys are not cross-validated against LanguageOptions/IdentifyMultipleLanguages the way real AWS does (real API returns a validation error if a LanguageIdSettings key isn't also present in LanguageOptions). gopherstack accepts and echoes any keys supplied. Low priority correctness gap, not a wire-shape bug.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a transcription job is not found.
	ErrNotFound = awserr.New("NotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource with the given name already exists.
	ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists)
	// ErrValidation is returned for invalid or missing input parameters.
	ErrValidation = awserr.New("BadRequestException", awserr.ErrInvalidParameter)
	// ErrVocabularyNotFound is returned when a vocabulary is not found.
	// Real AWS returns BadRequestException (400) for missing vocabularies, not NotFoundException (404).
	ErrVocabularyNotFound = awserr.New("BadRequestException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("transcribe: nil app context")

ErrNilAppContext is returned when Init is called with a nil AppContext.

Functions

This section is empty.

Types

type CallAnalyticsCategory

type CallAnalyticsCategory struct {
	CreateTime     time.Time           `json:"createTime"`
	LastUpdateTime time.Time           `json:"lastUpdateTime"`
	Tags           map[string]string   `json:"tags,omitempty"`
	CategoryName   string              `json:"categoryName"`
	InputType      string              `json:"inputType"`
	Rules          []CallAnalyticsRule `json:"rules,omitempty"`
}

CallAnalyticsCategory represents an Amazon Transcribe Call Analytics category.

type CallAnalyticsJob

type CallAnalyticsJob struct {
	StartTime               time.Time              `json:"startTime"`
	CompletionTime          time.Time              `json:"completionTime"`
	CreationTime            time.Time              `json:"creationTime"`
	Tags                    map[string]string      `json:"tags,omitempty"`
	Settings                *CallAnalyticsSettings `json:"settings,omitempty"`
	Media                   Media                  `json:"media"`
	CallAnalyticsJobStatus  string                 `json:"callAnalyticsJobStatus"`
	LanguageCode            string                 `json:"languageCode"`
	MediaFormat             string                 `json:"mediaFormat,omitempty"`
	DataAccessRoleArn       string                 `json:"dataAccessRoleArn,omitempty"`
	FailureReason           string                 `json:"failureReason,omitempty"`
	CallAnalyticsJobName    string                 `json:"callAnalyticsJobName"`
	ChannelDefinitions      []ChannelDefinition    `json:"channelDefinitions,omitempty"`
	TranscriptJSON          []byte                 `json:"-"`
	IdentifiedLanguageScore float32                `json:"identifiedLanguageScore,omitempty"`
	MediaSampleRateHertz    int32                  `json:"mediaSampleRateHertz,omitempty"`
}

CallAnalyticsJob represents an Amazon Transcribe Call Analytics job.

type CallAnalyticsRule

type CallAnalyticsRule struct {
	NonTalkTimeFilter  *NonTalkTimeFilter  `json:"NonTalkTimeFilter,omitempty"`
	InterruptionFilter *InterruptionFilter `json:"InterruptionFilter,omitempty"`
	TranscriptFilter   *TranscriptFilter   `json:"TranscriptFilter,omitempty"`
	SentimentFilter    *SentimentFilter    `json:"SentimentFilter,omitempty"`
}

CallAnalyticsRule is a rule in a call analytics category.

type CallAnalyticsSettings

type CallAnalyticsSettings struct {
	ContentRedaction       *ContentRedaction      `json:"ContentRedaction,omitempty"`
	Summarization          *SummarizationSettings `json:"Summarization,omitempty"`
	VocabularyName         string                 `json:"VocabularyName,omitempty"`
	VocabularyFilterName   string                 `json:"VocabularyFilterName,omitempty"`
	VocabularyFilterMethod string                 `json:"VocabularyFilterMethod,omitempty"`
	LanguageModelName      string                 `json:"LanguageModelName,omitempty"`
	LanguageOptions        []string               `json:"LanguageOptions,omitempty"`
}

CallAnalyticsSettings holds settings for a call analytics job.

type ChannelDefinition

type ChannelDefinition struct {
	ParticipantRole string `json:"ParticipantRole"`
	ChannelID       int32  `json:"ChannelId"`
}

ChannelDefinition defines a channel in a call analytics job.

type ClinicalNoteGenerationSettings

type ClinicalNoteGenerationSettings struct {
	NoteTemplate string `json:"NoteTemplate,omitempty"`
}

ClinicalNoteGenerationSettings controls clinical note generation in medical scribe.

type ContentRedaction

type ContentRedaction struct {
	RedactionType   string   `json:"RedactionType"`
	RedactionOutput string   `json:"RedactionOutput,omitempty"`
	PiiEntityTypes  []string `json:"PiiEntityTypes,omitempty"`
}

ContentRedaction represents content redaction settings for a transcription job.

type Handler

type Handler struct {
	Backend StorageBackend
	// contains filtered or unexported fields
}

Handler is the Echo HTTP handler for Amazon Transcribe operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Transcribe handler.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this Transcribe instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the Transcribe action from the X-Amz-Target header.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the primary resource name from the request body.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported Transcribe operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears handler state by delegating to the backend.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches Transcribe requests.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

type InMemoryBackend

type InMemoryBackend struct {
	// contains filtered or unexported fields
}

InMemoryBackend is the in-memory store for Transcribe jobs.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the synthetic AWS account ID used by this backend.

func (*InMemoryBackend) AddCallAnalyticsCategoryInternal

func (b *InMemoryBackend) AddCallAnalyticsCategoryInternal(cat *CallAnalyticsCategory)

AddCallAnalyticsCategoryInternal seeds a Call Analytics category directly (test helper).

func (*InMemoryBackend) AddCallAnalyticsJobInternal

func (b *InMemoryBackend) AddCallAnalyticsJobInternal(job *CallAnalyticsJob)

AddCallAnalyticsJobInternal seeds a Call Analytics job directly (test helper).

func (*InMemoryBackend) AddLanguageModelInternal

func (b *InMemoryBackend) AddLanguageModelInternal(m *LanguageModel)

AddLanguageModelInternal seeds a language model directly (test helper).

func (*InMemoryBackend) AddMedicalScribeJobInternal

func (b *InMemoryBackend) AddMedicalScribeJobInternal(job *MedicalScribeJob)

AddMedicalScribeJobInternal seeds a Medical Scribe job directly (test helper).

func (*InMemoryBackend) AddMedicalTranscriptionJobInternal

func (b *InMemoryBackend) AddMedicalTranscriptionJobInternal(job *MedicalTranscriptionJob)

AddMedicalTranscriptionJobInternal seeds a Medical Transcription job directly (test helper).

func (*InMemoryBackend) AddMedicalVocabularyInternal

func (b *InMemoryBackend) AddMedicalVocabularyInternal(v *MedicalVocabulary)

AddMedicalVocabularyInternal seeds a medical vocabulary directly (test helper).

func (*InMemoryBackend) AddVocabularyFilterInternal

func (b *InMemoryBackend) AddVocabularyFilterInternal(f *VocabularyFilter)

AddVocabularyFilterInternal seeds a vocabulary filter directly (test helper).

func (*InMemoryBackend) AddVocabularyInternal

func (b *InMemoryBackend) AddVocabularyInternal(v *Vocabulary)

AddVocabularyInternal seeds a vocabulary directly (test helper).

func (*InMemoryBackend) CreateCallAnalyticsCategory

func (b *InMemoryBackend) CreateCallAnalyticsCategory(input *CallAnalyticsCategory) (*CallAnalyticsCategory, error)

CreateCallAnalyticsCategory creates a new Call Analytics category.

func (*InMemoryBackend) CreateLanguageModel

func (b *InMemoryBackend) CreateLanguageModel(input *LanguageModel) (*LanguageModel, error)

CreateLanguageModel creates a new custom language model.

func (*InMemoryBackend) CreateMedicalVocabulary

func (b *InMemoryBackend) CreateMedicalVocabulary(
	vocabularyName, languageCode, vocabularyFileURI string, tags map[string]string,
) (*MedicalVocabulary, error)

CreateMedicalVocabulary creates a new medical custom vocabulary.

func (*InMemoryBackend) CreateVocabulary

func (b *InMemoryBackend) CreateVocabulary(input *Vocabulary) (*Vocabulary, error)

CreateVocabulary creates a new custom vocabulary.

func (*InMemoryBackend) CreateVocabularyFilter

func (b *InMemoryBackend) CreateVocabularyFilter(input *VocabularyFilter) (*VocabularyFilter, error)

CreateVocabularyFilter creates a new custom vocabulary filter.

func (*InMemoryBackend) DeleteCallAnalyticsCategory

func (b *InMemoryBackend) DeleteCallAnalyticsCategory(categoryName string) error

DeleteCallAnalyticsCategory removes a Call Analytics category by name.

func (*InMemoryBackend) DeleteCallAnalyticsJob

func (b *InMemoryBackend) DeleteCallAnalyticsJob(jobName string) error

DeleteCallAnalyticsJob removes a Call Analytics job by name.

func (*InMemoryBackend) DeleteLanguageModel

func (b *InMemoryBackend) DeleteLanguageModel(modelName string) error

DeleteLanguageModel removes a custom language model by name.

func (*InMemoryBackend) DeleteMedicalScribeJob

func (b *InMemoryBackend) DeleteMedicalScribeJob(jobName string) error

DeleteMedicalScribeJob removes a Medical Scribe job by name.

func (*InMemoryBackend) DeleteMedicalTranscriptionJob

func (b *InMemoryBackend) DeleteMedicalTranscriptionJob(jobName string) error

DeleteMedicalTranscriptionJob removes a medical transcription job by name.

func (*InMemoryBackend) DeleteMedicalVocabulary

func (b *InMemoryBackend) DeleteMedicalVocabulary(vocabularyName string) error

DeleteMedicalVocabulary removes a medical vocabulary by name.

func (*InMemoryBackend) DeleteTranscriptionJob

func (b *InMemoryBackend) DeleteTranscriptionJob(jobName string) error

DeleteTranscriptionJob removes a transcription job by name.

func (*InMemoryBackend) DeleteVocabulary

func (b *InMemoryBackend) DeleteVocabulary(vocabularyName string) error

DeleteVocabulary removes a custom vocabulary by name.

func (*InMemoryBackend) DeleteVocabularyFilter

func (b *InMemoryBackend) DeleteVocabularyFilter(vocabularyFilterName string) error

DeleteVocabularyFilter removes a vocabulary filter by name.

func (*InMemoryBackend) DescribeLanguageModel

func (b *InMemoryBackend) DescribeLanguageModel(modelName string) (*LanguageModel, error)

DescribeLanguageModel returns a language model by name.

func (*InMemoryBackend) GetCallAnalyticsCategory

func (b *InMemoryBackend) GetCallAnalyticsCategory(
	categoryName string,
) (*CallAnalyticsCategory, error)

GetCallAnalyticsCategory returns a Call Analytics category by name.

func (*InMemoryBackend) GetCallAnalyticsJob

func (b *InMemoryBackend) GetCallAnalyticsJob(jobName string) (*CallAnalyticsJob, error)

GetCallAnalyticsJob returns a Call Analytics job by name.

func (*InMemoryBackend) GetMedicalScribeJob

func (b *InMemoryBackend) GetMedicalScribeJob(jobName string) (*MedicalScribeJob, error)

GetMedicalScribeJob returns a Medical Scribe job by name.

func (*InMemoryBackend) GetMedicalTranscriptionJob

func (b *InMemoryBackend) GetMedicalTranscriptionJob(
	jobName string,
) (*MedicalTranscriptionJob, error)

GetMedicalTranscriptionJob returns a Medical Transcription job by name.

func (*InMemoryBackend) GetMedicalVocabulary

func (b *InMemoryBackend) GetMedicalVocabulary(vocabularyName string) (*MedicalVocabulary, error)

GetMedicalVocabulary returns a medical vocabulary by name.

func (*InMemoryBackend) GetTranscriptionJob

func (b *InMemoryBackend) GetTranscriptionJob(jobName string) (*TranscriptionJob, error)

GetTranscriptionJob returns a transcription job by name.

func (*InMemoryBackend) GetVocabulary

func (b *InMemoryBackend) GetVocabulary(vocabularyName string) (*Vocabulary, error)

GetVocabulary returns a custom vocabulary by name.

func (*InMemoryBackend) GetVocabularyFilter

func (b *InMemoryBackend) GetVocabularyFilter(
	vocabularyFilterName string,
) (*VocabularyFilter, error)

GetVocabularyFilter returns a custom vocabulary filter by name.

func (*InMemoryBackend) ListCallAnalyticsCategories

func (b *InMemoryBackend) ListCallAnalyticsCategories(
	nextToken string, maxResults int32,
) ([]CallAnalyticsCategory, string)

ListCallAnalyticsCategories returns all Call Analytics categories with pagination.

func (*InMemoryBackend) ListCallAnalyticsJobs

func (b *InMemoryBackend) ListCallAnalyticsJobs(
	statusFilter, nameContains, nextToken string, maxResults int32,
) ([]CallAnalyticsJob, string)

ListCallAnalyticsJobs returns Call Analytics jobs with optional status filter, name substring filter, and pagination.

func (*InMemoryBackend) ListLanguageModels

func (b *InMemoryBackend) ListLanguageModels(
	statusFilter, nameContains, nextToken string, maxResults int32,
) ([]LanguageModel, string)

ListLanguageModels returns language models with optional status filter, name substring filter, and pagination.

func (*InMemoryBackend) ListMedicalScribeJobs

func (b *InMemoryBackend) ListMedicalScribeJobs(
	statusFilter, nameContains, nextToken string, maxResults int32,
) ([]MedicalScribeJob, string)

ListMedicalScribeJobs returns Medical Scribe jobs with optional status filter, name substring filter, and pagination.

func (*InMemoryBackend) ListMedicalTranscriptionJobs

func (b *InMemoryBackend) ListMedicalTranscriptionJobs(
	statusFilter, nameContains, nextToken string, maxResults int32,
) ([]MedicalTranscriptionJob, string)

ListMedicalTranscriptionJobs returns Medical Transcription jobs with optional status filter, name substring filter, and pagination.

func (*InMemoryBackend) ListMedicalVocabularies

func (b *InMemoryBackend) ListMedicalVocabularies(
	stateFilter, nameContains, nextToken string, maxResults int32,
) ([]MedicalVocabulary, string)

ListMedicalVocabularies returns medical vocabularies with optional state filter, name substring filter, and pagination.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)

ListTagsForResource returns all tags for a resource identified by ARN.

func (*InMemoryBackend) ListTranscriptionJobs

func (b *InMemoryBackend) ListTranscriptionJobs(
	statusFilter, nameContains, nextToken string, maxResults int32,
) ([]TranscriptionJob, string)

ListTranscriptionJobs returns transcription jobs, optionally filtered by status and name substring, with pagination.

func (*InMemoryBackend) ListVocabularies

func (b *InMemoryBackend) ListVocabularies(
	stateFilter, nameContains, nextToken string, maxResults int32,
) ([]Vocabulary, string)

ListVocabularies returns custom vocabularies with optional state filter, name substring filter, and pagination.

func (*InMemoryBackend) ListVocabularyFilters

func (b *InMemoryBackend) ListVocabularyFilters(
	nameContains, nextToken string, maxResults int32,
) ([]VocabularyFilter, string)

ListVocabularyFilters returns vocabulary filters with optional name substring filter and pagination.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored state.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) StartCallAnalyticsJob

func (b *InMemoryBackend) StartCallAnalyticsJob(input *CallAnalyticsJob) (*CallAnalyticsJob, error)

StartCallAnalyticsJob creates a new Call Analytics job.

func (*InMemoryBackend) StartMedicalScribeJob

func (b *InMemoryBackend) StartMedicalScribeJob(input *MedicalScribeJob) (*MedicalScribeJob, error)

StartMedicalScribeJob creates a new Medical Scribe job.

func (*InMemoryBackend) StartMedicalTranscriptionJob

func (b *InMemoryBackend) StartMedicalTranscriptionJob(
	input *MedicalTranscriptionJob,
) (*MedicalTranscriptionJob, error)

StartMedicalTranscriptionJob creates a new Medical Transcription job.

func (*InMemoryBackend) StartTranscriptionJob

func (b *InMemoryBackend) StartTranscriptionJob(input *TranscriptionJob) (*TranscriptionJob, error)

StartTranscriptionJob creates a new transcription job with synthetic results. The input struct carries all supported fields; validation is performed before storage.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceArn string, tags map[string]string) error

TagResource adds or updates tags on a resource identified by ARN.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error

UntagResource removes specific tag keys from a resource identified by ARN.

func (*InMemoryBackend) UpdateCallAnalyticsCategory

func (b *InMemoryBackend) UpdateCallAnalyticsCategory(input *CallAnalyticsCategory) (*CallAnalyticsCategory, error)

UpdateCallAnalyticsCategory updates an existing Call Analytics category.

func (*InMemoryBackend) UpdateMedicalVocabulary

func (b *InMemoryBackend) UpdateMedicalVocabulary(
	vocabularyName, languageCode, vocabularyFileURI string,
) (*MedicalVocabulary, error)

UpdateMedicalVocabulary updates an existing medical vocabulary.

func (*InMemoryBackend) UpdateVocabulary

func (b *InMemoryBackend) UpdateVocabulary(
	input *Vocabulary,
) (*Vocabulary, error)

UpdateVocabulary updates an existing custom vocabulary.

func (*InMemoryBackend) UpdateVocabularyFilter

func (b *InMemoryBackend) UpdateVocabularyFilter(
	input *VocabularyFilter,
) (*VocabularyFilter, error)

UpdateVocabularyFilter updates an existing vocabulary filter.

type InputDataConfig

type InputDataConfig struct {
	S3Uri             string `json:"S3Uri"`
	TuningDataS3Uri   string `json:"TuningDataS3Uri,omitempty"`
	DataAccessRoleArn string `json:"DataAccessRoleArn"`
}

InputDataConfig holds the S3 input configuration for custom language models.

type InterruptionFilter

type InterruptionFilter struct {
	ParticipantRole string `json:"ParticipantRole,omitempty"`
	Threshold       int64  `json:"Threshold,omitempty"`
	Negate          bool   `json:"Negate,omitempty"`
}

InterruptionFilter matches interruptions by a participant.

type JobExecutionSettings

type JobExecutionSettings struct {
	DataAccessRoleArn      string `json:"DataAccessRoleArn,omitempty"`
	AllowDeferredExecution bool   `json:"AllowDeferredExecution,omitempty"`
}

JobExecutionSettings controls deferred execution behavior.

type LanguageCodeItem

type LanguageCodeItem struct {
	LanguageCode      string  `json:"LanguageCode"`
	DurationInSeconds float32 `json:"DurationInSeconds"`
}

LanguageCodeItem represents an identified language with a score.

type LanguageIDSettings

type LanguageIDSettings struct {
	VocabularyName       string `json:"VocabularyName,omitempty"`
	VocabularyFilterName string `json:"VocabularyFilterName,omitempty"`
	LanguageModelName    string `json:"LanguageModelName,omitempty"`
}

LanguageIDSettings holds per-language-code identification settings.

type LanguageModel

type LanguageModel struct {
	CreateTime          time.Time         `json:"createTime"`
	LastModifiedTime    time.Time         `json:"lastModifiedTime"`
	InputDataConfig     *InputDataConfig  `json:"inputDataConfig,omitempty"`
	Tags                map[string]string `json:"tags,omitempty"`
	ModelName           string            `json:"modelName"`
	BaseModelName       string            `json:"baseModelName"`
	LanguageCode        string            `json:"languageCode"`
	ModelStatus         string            `json:"modelStatus"`
	FailureReason       string            `json:"failureReason,omitempty"`
	UpgradeAvailability bool              `json:"upgradeAvailability,omitempty"`
}

LanguageModel represents a custom Amazon Transcribe language model.

type Media

type Media struct {
	MediaFileURI         string `json:"MediaFileUri,omitempty"`
	RedactedMediaFileURI string `json:"RedactedMediaFileUri,omitempty"`
}

Media holds the media location for a job.

type MedicalScribeChannelDefinition

type MedicalScribeChannelDefinition struct {
	ParticipantRole string `json:"ParticipantRole"`
	ChannelID       int32  `json:"ChannelId"`
}

MedicalScribeChannelDefinition defines a channel in a medical scribe job.

type MedicalScribeJob

type MedicalScribeJob struct {
	StartTime                      time.Time                        `json:"startTime"`
	CompletionTime                 time.Time                        `json:"completionTime"`
	CreationTime                   time.Time                        `json:"creationTime"`
	Tags                           map[string]string                `json:"tags,omitempty"`
	ClinicalNoteGenerationSettings *ClinicalNoteGenerationSettings  `json:"clinicalNoteGenerationSettings,omitempty"`
	Settings                       *MedicalScribeSettings           `json:"settings,omitempty"`
	Media                          Media                            `json:"media"`
	LanguageCode                   string                           `json:"languageCode,omitempty"`
	DataAccessRoleArn              string                           `json:"dataAccessRoleArn,omitempty"`
	OutputBucketName               string                           `json:"outputBucketName,omitempty"`
	FailureReason                  string                           `json:"failureReason,omitempty"`
	MedicalScribeJobStatus         string                           `json:"medicalScribeJobStatus"`
	MedicalScribeJobName           string                           `json:"medicalScribeJobName"`
	ChannelDefinitions             []MedicalScribeChannelDefinition `json:"channelDefinitions,omitempty"`
}

MedicalScribeJob represents an Amazon Transcribe Medical Scribe job.

type MedicalScribeSettings

type MedicalScribeSettings struct {
	VocabularyName         string `json:"VocabularyName,omitempty"`
	VocabularyFilterName   string `json:"VocabularyFilterName,omitempty"`
	VocabularyFilterMethod string `json:"VocabularyFilterMethod,omitempty"`
	MaxSpeakerLabels       int32  `json:"MaxSpeakerLabels,omitempty"`
	ShowSpeakerLabels      bool   `json:"ShowSpeakerLabels,omitempty"`
	ChannelIdentification  bool   `json:"ChannelIdentification,omitempty"`
}

MedicalScribeSettings holds settings for a Medical Scribe job.

type MedicalTranscriptionJob

type MedicalTranscriptionJob struct {
	CreationTime                     time.Time                     `json:"creationTime"`
	StartTime                        time.Time                     `json:"startTime"`
	CompletionTime                   time.Time                     `json:"completionTime"`
	Tags                             map[string]string             `json:"tags,omitempty"`
	Settings                         *MedicalTranscriptionSettings `json:"settings,omitempty"`
	Media                            Media                         `json:"media"`
	Type                             string                        `json:"type,omitempty"`
	Specialty                        string                        `json:"specialty,omitempty"`
	LanguageCode                     string                        `json:"languageCode"`
	MediaFormat                      string                        `json:"mediaFormat,omitempty"`
	FailureReason                    string                        `json:"failureReason,omitempty"`
	OutputBucketName                 string                        `json:"outputBucketName,omitempty"`
	OutputKey                        string                        `json:"outputKey,omitempty"`
	TranscriptionJobStatus           string                        `json:"transcriptionJobStatus"`
	MedicalContentIdentificationType string                        `json:"medicalContentIdentificationType,omitempty"`
	MedicalTranscriptionJobName      string                        `json:"medicalTranscriptionJobName"`
	TranscriptJSON                   []byte                        `json:"-"`
	MediaSampleRateHertz             int32                         `json:"mediaSampleRateHertz,omitempty"`
}

MedicalTranscriptionJob represents an Amazon Transcribe Medical transcription job.

type MedicalTranscriptionSettings

type MedicalTranscriptionSettings struct {
	VocabularyName        string `json:"VocabularyName,omitempty"`
	MaxSpeakerLabels      int32  `json:"MaxSpeakerLabels,omitempty"`
	MaxAlternatives       int32  `json:"MaxAlternatives,omitempty"`
	ShowSpeakerLabels     bool   `json:"ShowSpeakerLabels,omitempty"`
	ChannelIdentification bool   `json:"ChannelIdentification,omitempty"`
	ShowAlternatives      bool   `json:"ShowAlternatives,omitempty"`
}

MedicalTranscriptionSettings holds settings specific to medical transcription.

type MedicalVocabulary

type MedicalVocabulary struct {
	LastModifiedTime  time.Time         `json:"lastModifiedTime"`
	Tags              map[string]string `json:"tags,omitempty"`
	VocabularyName    string            `json:"vocabularyName"`
	LanguageCode      string            `json:"languageCode"`
	VocabularyState   string            `json:"vocabularyState"`
	VocabularyFileURI string            `json:"vocabularyFileUri"`
	FailureReason     string            `json:"failureReason,omitempty"`
}

MedicalVocabulary represents an Amazon Transcribe Medical custom vocabulary.

type ModelSettings

type ModelSettings struct {
	LanguageModelName string `json:"LanguageModelName,omitempty"`
}

ModelSettings holds the language model settings for a transcription job.

type NonTalkTimeFilter

type NonTalkTimeFilter struct {
	ParticipantRole string `json:"ParticipantRole,omitempty"`
	Threshold       int64  `json:"Threshold,omitempty"`
	Negate          bool   `json:"Negate,omitempty"`
}

NonTalkTimeFilter matches segments with no speech.

type Provider

type Provider struct{}

Provider implements service.Provider for Amazon Transcribe.

func (*Provider) Init

Init initializes the Transcribe service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type SentimentFilter

type SentimentFilter struct {
	ParticipantRole string   `json:"ParticipantRole,omitempty"`
	Sentiments      []string `json:"Sentiments"`
	Negate          bool     `json:"Negate,omitempty"`
}

SentimentFilter matches sentiment in the transcript.

type StorageBackend

type StorageBackend interface {
	// Transcription jobs
	StartTranscriptionJob(input *TranscriptionJob) (*TranscriptionJob, error)
	GetTranscriptionJob(jobName string) (*TranscriptionJob, error)
	ListTranscriptionJobs(statusFilter, nameContains, nextToken string, maxResults int32) ([]TranscriptionJob, string)
	DeleteTranscriptionJob(jobName string) error

	// Call Analytics categories
	CreateCallAnalyticsCategory(cat *CallAnalyticsCategory) (*CallAnalyticsCategory, error)
	DeleteCallAnalyticsCategory(categoryName string) error

	// Language models
	CreateLanguageModel(model *LanguageModel) (*LanguageModel, error)
	DeleteLanguageModel(modelName string) error

	// Vocabularies
	CreateMedicalVocabulary(
		vocabularyName, languageCode, vocabularyFileURI string, tags map[string]string,
	) (*MedicalVocabulary, error)
	CreateVocabulary(vocab *Vocabulary) (*Vocabulary, error)
	CreateVocabularyFilter(vf *VocabularyFilter) (*VocabularyFilter, error)

	// Call Analytics jobs
	StartCallAnalyticsJob(job *CallAnalyticsJob) (*CallAnalyticsJob, error)
	GetCallAnalyticsJob(jobName string) (*CallAnalyticsJob, error)
	ListCallAnalyticsJobs(statusFilter, nameContains, nextToken string, maxResults int32) ([]CallAnalyticsJob, string)
	DeleteCallAnalyticsJob(jobName string) error

	// Call Analytics categories (Get/Update/List)
	GetCallAnalyticsCategory(categoryName string) (*CallAnalyticsCategory, error)
	UpdateCallAnalyticsCategory(cat *CallAnalyticsCategory) (*CallAnalyticsCategory, error)
	ListCallAnalyticsCategories(nextToken string, maxResults int32) ([]CallAnalyticsCategory, string)

	// Vocabulary CRUD
	GetVocabulary(vocabularyName string) (*Vocabulary, error)
	UpdateVocabulary(vocab *Vocabulary) (*Vocabulary, error)
	DeleteVocabulary(vocabularyName string) error
	ListVocabularies(stateFilter, nameContains, nextToken string, maxResults int32) ([]Vocabulary, string)

	// Vocabulary filter CRUD
	GetVocabularyFilter(vocabularyFilterName string) (*VocabularyFilter, error)
	UpdateVocabularyFilter(vf *VocabularyFilter) (*VocabularyFilter, error)
	DeleteVocabularyFilter(vocabularyFilterName string) error
	ListVocabularyFilters(nameContains, nextToken string, maxResults int32) ([]VocabularyFilter, string)

	// Medical vocabulary CRUD
	GetMedicalVocabulary(vocabularyName string) (*MedicalVocabulary, error)
	UpdateMedicalVocabulary(vocabularyName, languageCode, vocabularyFileURI string) (*MedicalVocabulary, error)
	DeleteMedicalVocabulary(vocabularyName string) error
	ListMedicalVocabularies(
		stateFilter, nameContains, nextToken string, maxResults int32,
	) ([]MedicalVocabulary, string)

	// Medical Scribe jobs
	StartMedicalScribeJob(job *MedicalScribeJob) (*MedicalScribeJob, error)
	GetMedicalScribeJob(jobName string) (*MedicalScribeJob, error)
	ListMedicalScribeJobs(
		statusFilter, nameContains, nextToken string, maxResults int32,
	) ([]MedicalScribeJob, string)
	DeleteMedicalScribeJob(jobName string) error

	// Medical Transcription jobs
	StartMedicalTranscriptionJob(job *MedicalTranscriptionJob) (*MedicalTranscriptionJob, error)
	GetMedicalTranscriptionJob(jobName string) (*MedicalTranscriptionJob, error)
	ListMedicalTranscriptionJobs(
		statusFilter, nameContains, nextToken string, maxResults int32,
	) ([]MedicalTranscriptionJob, string)
	DeleteMedicalTranscriptionJob(jobName string) error

	// Language model CRUD
	DescribeLanguageModel(modelName string) (*LanguageModel, error)
	ListLanguageModels(statusFilter, nameContains, nextToken string, maxResults int32) ([]LanguageModel, string)

	// Tags
	TagResource(resourceArn string, tags map[string]string) error
	UntagResource(resourceArn string, tagKeys []string) error
	ListTagsForResource(resourceArn string) (map[string]string, error)

	// Lifecycle
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend defines the interface for Transcribe backend implementations. All mutating methods must be safe for concurrent use.

type SubtitlesInput

type SubtitlesInput struct {
	Formats          []string `json:"Formats"`
	OutputStartIndex int32    `json:"OutputStartIndex,omitempty"`
}

SubtitlesInput represents the subtitle generation settings.

type SubtitlesOutput

type SubtitlesOutput struct {
	Formats          []string `json:"Formats,omitempty"`
	SubtitleFileURIs []string `json:"SubtitleFileUris,omitempty"`
	OutputStartIndex int32    `json:"OutputStartIndex,omitempty"`
}

SubtitlesOutput represents the subtitle output returned by Get operations.

type SummarizationSettings

type SummarizationSettings struct {
	GenerateSummary bool `json:"GenerateSummary"`
}

SummarizationSettings controls generative call summarization.

type ToxicityDetectionSettings

type ToxicityDetectionSettings struct {
	ToxicityCategories []string `json:"ToxicityCategories"`
}

ToxicityDetectionSettings represents a toxicity detection entry.

type TranscriptFilter

type TranscriptFilter struct {
	TranscriptFilterType string   `json:"TranscriptFilterType"`
	ParticipantRole      string   `json:"ParticipantRole,omitempty"`
	Targets              []string `json:"Targets"`
	Negate               bool     `json:"Negate,omitempty"`
}

TranscriptFilter matches specific phrases in the transcript.

type TranscriptionJob

type TranscriptionJob struct {
	StartTime                 time.Time                     `json:"startTime"`
	CompletionTime            time.Time                     `json:"completionTime"`
	CreationTime              time.Time                     `json:"creationTime"`
	Tags                      map[string]string             `json:"tags,omitempty"`
	Subtitles                 *SubtitlesOutput              `json:"subtitles,omitempty"`
	ContentRedaction          *ContentRedaction             `json:"contentRedaction,omitempty"`
	ModelSettings             *ModelSettings                `json:"modelSettings,omitempty"`
	JobExecutionSettings      *JobExecutionSettings         `json:"jobExecutionSettings,omitempty"`
	Settings                  *TranscriptionSettings        `json:"settings,omitempty"`
	Media                     Media                         `json:"media"`
	LanguageCode              string                        `json:"languageCode"`
	JobStatus                 string                        `json:"jobStatus"`
	MediaFormat               string                        `json:"mediaFormat,omitempty"`
	OutputBucketName          string                        `json:"outputBucketName,omitempty"`
	OutputKey                 string                        `json:"outputKey,omitempty"`
	OutputEncryptionKMSKeyID  string                        `json:"outputEncryptionKMSKeyId,omitempty"`
	TranscriptText            string                        `json:"transcriptText"`
	JobName                   string                        `json:"jobName"`
	FailureReason             string                        `json:"failureReason,omitempty"`
	LanguageOptions           []string                      `json:"languageOptions,omitempty"`
	ToxicityDetection         []ToxicityDetectionSettings   `json:"toxicityDetection,omitempty"`
	LanguageCodes             []LanguageCodeItem            `json:"languageCodes,omitempty"`
	LanguageIDSettings        map[string]LanguageIDSettings `json:"languageIdSettings,omitempty"`
	TranscriptJSON            []byte                        `json:"-"`
	MediaSampleRateHertz      int32                         `json:"mediaSampleRateHertz,omitempty"`
	IdentifiedLanguageScore   float32                       `json:"identifiedLanguageScore,omitempty"`
	IdentifyLanguage          bool                          `json:"identifyLanguage,omitempty"`
	IdentifyMultipleLanguages bool                          `json:"identifyMultipleLanguages,omitempty"`
}

TranscriptionJob represents an Amazon Transcribe transcription job.

type TranscriptionSettings

type TranscriptionSettings struct {
	VocabularyName         string `json:"VocabularyName,omitempty"`
	VocabularyFilterName   string `json:"VocabularyFilterName,omitempty"`
	VocabularyFilterMethod string `json:"VocabularyFilterMethod,omitempty"`
	MaxSpeakerLabels       int32  `json:"MaxSpeakerLabels,omitempty"`
	MaxAlternatives        int32  `json:"MaxAlternatives,omitempty"`
	ShowSpeakerLabels      bool   `json:"ShowSpeakerLabels,omitempty"`
	ChannelIdentification  bool   `json:"ChannelIdentification,omitempty"`
	ShowAlternatives       bool   `json:"ShowAlternatives,omitempty"`
}

TranscriptionSettings represents the Settings field of a transcription job.

type Vocabulary

type Vocabulary struct {
	LastModifiedTime  time.Time         `json:"lastModifiedTime"`
	Tags              map[string]string `json:"tags,omitempty"`
	VocabularyName    string            `json:"vocabularyName"`
	LanguageCode      string            `json:"languageCode"`
	VocabularyState   string            `json:"vocabularyState"`
	VocabularyFileURI string            `json:"vocabularyFileUri,omitempty"`
	FailureReason     string            `json:"failureReason,omitempty"`
	Phrases           []string          `json:"phrases,omitempty"`
}

Vocabulary represents an Amazon Transcribe custom vocabulary.

type VocabularyFilter

type VocabularyFilter struct {
	LastModifiedTime        time.Time         `json:"lastModifiedTime"`
	Tags                    map[string]string `json:"tags,omitempty"`
	VocabularyFilterName    string            `json:"vocabularyFilterName"`
	LanguageCode            string            `json:"languageCode"`
	VocabularyFilterFileURI string            `json:"vocabularyFilterFileUri,omitempty"`
	Words                   []string          `json:"words,omitempty"`
}

VocabularyFilter represents an Amazon Transcribe custom vocabulary filter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL