124 lines
3.4 KiB
Go
124 lines
3.4 KiB
Go
// Package seriatim declares the adapter contract for transcript merge/normalize/trim/render execution.
|
|
package seriatim
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
// Runner is the adapter boundary for seriatim merge/normalize/trim/render invocations.
|
|
type Runner interface {
|
|
Run(ctx context.Context, req MergeRequest) (MergeResult, error)
|
|
Normalize(ctx context.Context, req NormalizeRequest) (NormalizeResult, error)
|
|
Trim(ctx context.Context, req TrimRequest) (TrimResult, error)
|
|
Render(ctx context.Context, req RenderRequest) (RenderResult, error)
|
|
}
|
|
|
|
// MergeRequest describes a seriatim merge invocation.
|
|
type MergeRequest struct {
|
|
GeneratedConfigPath string
|
|
InputTranscriptPaths []string
|
|
OutputMergedTranscriptPath string
|
|
ReportPath string
|
|
SpeakersPath string
|
|
AutocorrectPath string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
}
|
|
|
|
// MergeResult describes a merge output.
|
|
type MergeResult struct {
|
|
MergedTranscriptPath string
|
|
ReportPath string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
ExitCode int
|
|
Duration time.Duration
|
|
InvokedBinary string
|
|
OutputSchema string
|
|
Metadata map[string]any
|
|
}
|
|
|
|
// NormalizeRequest describes a seriatim normalize invocation.
|
|
type NormalizeRequest struct {
|
|
Binary string
|
|
InputTranscriptPath string
|
|
OutputNormalizedPath string
|
|
OutputSchema string
|
|
ReportPath string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
Timeout time.Duration
|
|
}
|
|
|
|
// NormalizeResult describes a normalize output.
|
|
type NormalizeResult struct {
|
|
OutputNormalizedPath string
|
|
ReportPath string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
ExitCode int
|
|
Duration time.Duration
|
|
InvokedBinary string
|
|
OutputSchema string
|
|
Metadata map[string]any
|
|
}
|
|
|
|
// TrimRequest describes a seriatim trim invocation.
|
|
type TrimRequest struct {
|
|
Binary string
|
|
InputTranscriptPath string
|
|
OutputTrimmedPath string
|
|
KeepSelector string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
Timeout time.Duration
|
|
}
|
|
|
|
// TrimResult describes a trim output.
|
|
type TrimResult struct {
|
|
OutputTrimmedPath string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
ExitCode int
|
|
Duration time.Duration
|
|
InvokedBinary string
|
|
KeepSelector string
|
|
Metadata map[string]any
|
|
}
|
|
|
|
// RenderRequest describes a seriatim render invocation.
|
|
type RenderRequest struct {
|
|
Binary string
|
|
InputTranscriptPath string
|
|
OutputRenderedPath string
|
|
Format string
|
|
Title string
|
|
IncludeTimestamps bool
|
|
IncludeSegmentIDs bool
|
|
IncludeMetadata bool
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
Timeout time.Duration
|
|
}
|
|
|
|
// RenderResult describes a render output.
|
|
type RenderResult struct {
|
|
OutputRenderedPath string
|
|
StdoutLogPath string
|
|
StderrLogPath string
|
|
GeneratedConfigPath string
|
|
ExitCode int
|
|
Duration time.Duration
|
|
InvokedBinary string
|
|
Format string
|
|
Title string
|
|
Metadata map[string]any
|
|
}
|