Documentation
¶
Overview ¶
Package audiohistory stores private audio artifacts and creates verified, independent snapshots for replay and export.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalid = errors.New("audio history metadata is unknown or invalid") ErrChanged = errors.New("audio history changed during the operation") )
Functions ¶
This section is empty.
Types ¶
type Settings ¶
type Settings struct {
Input string `json:"input"`
Instructions string `json:"instructions"`
Model string `json:"model"`
Voice string `json:"voice"`
Format string `json:"format"`
Speed float64 `json:"speed"`
Preview bool `json:"preview,omitempty"`
}
Settings records the explicitly private history of one audio request.
type Snapshot ¶
Snapshot owns a read-only copy of one verified result. Consume File directly; File.Name is not a replay path. Unix snapshots have no directory entry.
type Store ¶
type Store struct{ Directory string }
func (Store) Capture ¶
func (s Store) Capture(ctx context.Context, body io.ReadCloser, settings Settings) (entry Entry, err error)
Capture closes body on every exit. A manifest becomes visible only after the complete audio, source close, and metadata close have all succeeded.
func (Store) Clear ¶
Clear removes complete, validated history entries visible during its scan. A private manifest link makes interrupted deletions retryable. Unmarked pending captures, snapshots, corrupt entries, and unrelated files remain. Exported files are outside Store and are never visited.