232 lines
8.8 KiB
Go
232 lines
8.8 KiB
Go
package config
|
|
|
|
// Config is the resolved combined configuration from pipeline.yml and session.yml.
|
|
type Config struct {
|
|
Pipeline *PipelineConfig
|
|
Session *SessionConfig
|
|
PipelinePath string
|
|
SessionPath string
|
|
}
|
|
|
|
// PipelineConfig contains durable pipeline-level settings.
|
|
type PipelineConfig struct {
|
|
Workspace WorkspaceConfig `yaml:"workspace"`
|
|
Storage StorageConfig `yaml:"storage"`
|
|
Spool SpoolConfig `yaml:"spool"`
|
|
Archive *ArchiveConfig `yaml:"archive"`
|
|
Secrets *SecretsConfig `yaml:"secrets"`
|
|
WhisperX WhisperXConfig `yaml:"whisperx"`
|
|
Seriatim SeriatimConfig `yaml:"seriatim"`
|
|
Audita AuditaConfig `yaml:"audita"`
|
|
Normalize *NormalizeConfig `yaml:"normalize"`
|
|
Trim *TrimConfig `yaml:"trim"`
|
|
Scriptorium *ScriptoriumConfig `yaml:"scriptorium"`
|
|
Analyzer AnalyzerConfig `yaml:"analyzer"`
|
|
Notification NotificationConfig `yaml:"notification"`
|
|
}
|
|
|
|
// SessionConfig contains per-session inputs and metadata.
|
|
type SessionConfig struct {
|
|
SessionID string `yaml:"session_id"`
|
|
PreviousSessionID string `yaml:"previous_session_id"`
|
|
Campaign string `yaml:"campaign"`
|
|
Date string `yaml:"date"`
|
|
Title string `yaml:"title"`
|
|
Inputs SessionInputsConfig `yaml:"inputs"`
|
|
}
|
|
|
|
// WorkspaceConfig configures local workspace behavior.
|
|
type WorkspaceConfig struct {
|
|
Root string `yaml:"root"`
|
|
CleanupAfterArchive bool `yaml:"cleanup_after_archive"`
|
|
}
|
|
|
|
// SecretsConfig configures optional local filesystem secret loading.
|
|
type SecretsConfig struct {
|
|
EnvDir string `yaml:"env_dir"`
|
|
}
|
|
|
|
// StorageConfig configures storage backends and related parameters.
|
|
type StorageConfig struct {
|
|
Backend string `yaml:"backend"`
|
|
Bucket string `yaml:"bucket"`
|
|
Prefix string `yaml:"prefix"`
|
|
S3 *StorageS3Config `yaml:"s3"`
|
|
}
|
|
|
|
// StorageS3Config configures S3 storage coordinates.
|
|
type StorageS3Config struct {
|
|
Bucket string `yaml:"bucket"`
|
|
RootPrefix string `yaml:"root_prefix"`
|
|
Region string `yaml:"region"`
|
|
Endpoint string `yaml:"endpoint"`
|
|
ForcePathStyle bool `yaml:"force_path_style"`
|
|
AccessKeyIDEnv string `yaml:"access_key_id_env"`
|
|
SecretKeyEnv string `yaml:"secret_access_key_env"`
|
|
}
|
|
|
|
// SpoolConfig configures local spool storage for staged data.
|
|
type SpoolConfig struct {
|
|
Root string `yaml:"root"`
|
|
DeleteAudioAfterArchive bool `yaml:"delete_audio_after_archive"`
|
|
}
|
|
|
|
// ArchiveConfig configures archive behavior and artifact promotions.
|
|
type ArchiveConfig struct {
|
|
Enabled *bool `yaml:"enabled"`
|
|
UploadRun *bool `yaml:"upload_run"`
|
|
PromoteArtifacts []ArchivePromotionRule `yaml:"promote_artifacts"`
|
|
}
|
|
|
|
// ArchivePromotionRule configures one artifact promotion mapping.
|
|
type ArchivePromotionRule struct {
|
|
Source string `yaml:"source"`
|
|
Dest string `yaml:"dest"`
|
|
Required *bool `yaml:"required"`
|
|
}
|
|
|
|
// WhisperXConfig configures WhisperX adapter settings.
|
|
type WhisperXConfig struct {
|
|
TranscribeURL string `yaml:"transcribe_url"`
|
|
Language string `yaml:"language"`
|
|
Timeout string `yaml:"timeout"`
|
|
Retries *int `yaml:"retries"`
|
|
RetryDelay string `yaml:"retry_delay"`
|
|
Concurrency *int `yaml:"concurrency"`
|
|
}
|
|
|
|
// SeriatimConfig configures seriatim adapter settings.
|
|
type SeriatimConfig struct {
|
|
Binary string `yaml:"binary"`
|
|
Timeout string `yaml:"timeout"`
|
|
OutputSchema string `yaml:"output_schema"`
|
|
CoalesceGap *float64 `yaml:"coalesce_gap"`
|
|
Report *bool `yaml:"report"`
|
|
Env SeriatimEnvConfig `yaml:"env"`
|
|
}
|
|
|
|
// SeriatimEnvConfig configures optional advanced seriatim environment tuning.
|
|
type SeriatimEnvConfig struct {
|
|
OverlapWordRunGap *float64 `yaml:"overlap_word_run_gap"`
|
|
OverlapWordRunReorderWindow *float64 `yaml:"overlap_word_run_reorder_window"`
|
|
BackchannelMaxDuration *float64 `yaml:"backchannel_max_duration"`
|
|
FillerMaxDuration *float64 `yaml:"filler_max_duration"`
|
|
}
|
|
|
|
// AuditaConfig configures audita adapter settings.
|
|
type AuditaConfig struct {
|
|
Binary string `yaml:"binary"`
|
|
Timeout string `yaml:"timeout"`
|
|
LLMAPIKeyEnv string `yaml:"llm_api_key_env"`
|
|
Modules []string `yaml:"modules"`
|
|
BaseURL string `yaml:"base_url"`
|
|
Model string `yaml:"model"`
|
|
TotalLLMConcurrency *int `yaml:"total_llm_concurrency"`
|
|
ProposalLLMConcurrency *int `yaml:"proposal_llm_concurrency"`
|
|
ValidationModel string `yaml:"validation_model"`
|
|
ValidationLLMConcurrency *int `yaml:"validation_llm_concurrency"`
|
|
TranscriptDescription string `yaml:"transcript_description"`
|
|
ConfigPath string `yaml:"config_path"`
|
|
OutputSchema string `yaml:"output_schema"`
|
|
WorkDirRetention string `yaml:"work_dir_retention"`
|
|
Report *bool `yaml:"report"`
|
|
}
|
|
|
|
// NormalizeConfig configures normalize-stage transcript schema/output behavior.
|
|
type NormalizeConfig struct {
|
|
OutputPath string `yaml:"output_path"`
|
|
OutputSchema string `yaml:"output_schema"`
|
|
Report *bool `yaml:"report"`
|
|
|
|
outputPathSet bool `yaml:"-"`
|
|
}
|
|
|
|
// TrimConfig configures trim-stage transcript boundary behavior.
|
|
type TrimConfig struct {
|
|
Enabled bool `yaml:"enabled"`
|
|
OutputPath string `yaml:"output_path"`
|
|
Bounds TrimBoundsConfig `yaml:"bounds"`
|
|
Seriatim TrimSeriatimConfig `yaml:"seriatim"`
|
|
}
|
|
|
|
// TrimBoundsConfig configures Scriptorium bounds prompt execution for trim.
|
|
type TrimBoundsConfig struct {
|
|
PromptID string `yaml:"prompt_id"`
|
|
ProfileID string `yaml:"profile_id"`
|
|
TranscriptInputName string `yaml:"transcript_input_name"`
|
|
OutputPath string `yaml:"output_path"`
|
|
Timeout string `yaml:"timeout"`
|
|
RenderDebug bool `yaml:"render_debug"`
|
|
RenderOutputPath string `yaml:"render_output_path"`
|
|
}
|
|
|
|
// TrimSeriatimConfig configures Seriatim options for trim output construction.
|
|
type TrimSeriatimConfig struct {
|
|
Report *bool `yaml:"report"`
|
|
}
|
|
|
|
// ScriptoriumConfig configures Scriptorium-backed artifact generation.
|
|
type ScriptoriumConfig struct {
|
|
Binary string `yaml:"binary"`
|
|
ConfigPath string `yaml:"config_path"`
|
|
Timeout string `yaml:"timeout"`
|
|
RenderDebug bool `yaml:"render_debug"`
|
|
Artifacts map[string]ScriptoriumArtifactConfig `yaml:"artifacts"`
|
|
}
|
|
|
|
// ScriptoriumArtifactConfig configures one named output artifact workflow.
|
|
type ScriptoriumArtifactConfig struct {
|
|
Enabled bool `yaml:"enabled"`
|
|
DependsOn []string `yaml:"depends_on"`
|
|
RenderDebug *bool `yaml:"render_debug"`
|
|
PromptID string `yaml:"prompt_id"`
|
|
ProfileID string `yaml:"profile_id"`
|
|
OutputPath string `yaml:"output_path"`
|
|
Timeout string `yaml:"timeout"`
|
|
Inputs map[string]ScriptoriumInputConfig `yaml:"inputs"`
|
|
Vars map[string]any `yaml:"vars"`
|
|
}
|
|
|
|
// ScriptoriumInputConfig configures one named prompt input source.
|
|
type ScriptoriumInputConfig struct {
|
|
Source string `yaml:"source"`
|
|
Artifact string `yaml:"artifact"`
|
|
Path string `yaml:"path"`
|
|
Required bool `yaml:"required"`
|
|
}
|
|
|
|
// AnalyzerConfig configures analyzer adapter settings.
|
|
type AnalyzerConfig struct {
|
|
BinaryPath string `yaml:"binary_path"`
|
|
Timeout string `yaml:"timeout"`
|
|
Artifacts ArtifactSettings `yaml:"artifacts"`
|
|
}
|
|
|
|
// NotificationConfig configures notification backend settings.
|
|
type NotificationConfig struct {
|
|
Backend string `yaml:"backend"`
|
|
Recipient string `yaml:"recipient"`
|
|
Timeout string `yaml:"timeout"`
|
|
}
|
|
|
|
// ArtifactSettings configures generated artifact selection and paths.
|
|
type ArtifactSettings struct {
|
|
OutputDir string `yaml:"output_dir"`
|
|
Types []string `yaml:"types"`
|
|
}
|
|
|
|
// SessionInputsConfig contains per-session input references.
|
|
type SessionInputsConfig struct {
|
|
AudioDir string `yaml:"audio_dir"`
|
|
AudioFiles []string `yaml:"audio_files"`
|
|
AudioS3 *SessionAudioS3Input `yaml:"audio_s3"`
|
|
SpeakersFile string `yaml:"speakers_file"`
|
|
AutocorrectFile string `yaml:"autocorrect_file"`
|
|
GlossaryFile string `yaml:"glossary_file"`
|
|
}
|
|
|
|
// SessionAudioS3Input configures S3 session-audio input discovery.
|
|
type SessionAudioS3Input struct {
|
|
Prefix string `yaml:"prefix"`
|
|
}
|