From b78b846189124ede389a25aee2a3b45c98b528ec Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Fri, 30 Oct 2026 08:25:35 +0000 Subject: Tell the phone what reading the words concluded Three numbers on the line that already says an episode has a transcript: how many stretches of advertising were found, how long they come to, and how. The method travels with them because subtraction and ad-copy reading are not close in quality -- 92-104% of the length gap against 0-29% -- and a figure on its own would invite reading the two alike. An episode that turned up nothing says nothing rather than zero, which is the same three-state care the rest of this takes. Still nothing published as a skip. This is so the evidence can be looked at from the app rather than from my logs, which is what the decision to publish should rest on. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B --- server/cmd/second-probe/main.go | 56 ----------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 server/cmd/second-probe/main.go (limited to 'server/cmd') diff --git a/server/cmd/second-probe/main.go b/server/cmd/second-probe/main.go deleted file mode 100644 index 1d2a840..0000000 --- a/server/cmd/second-probe/main.go +++ /dev/null @@ -1,56 +0,0 @@ -// Command second-probe subtracts a recognised second fetch from the mirrored copy. Throwaway. -package main - -import ( - "flag" - "fmt" - "os" - "path/filepath" - - "github.com/terst/listen/server/internal/transcribe" - "github.com/terst/listen/server/internal/transcript" -) - -func main() { - episode := flag.String("episode", "", "episode id") - secondFile := flag.String("second", "", "whisper -oj output for the second fetch") - servedMs := flag.Int64("served", 0, "") - declaredMs := flag.Int64("declared", 0, "") - show := flag.Bool("show", false, "") - flag.Parse() - - store := transcript.Store{Dir: "/site/listen.terst.org/data/transcripts"} - mirrored, err := store.Get(*episode) - if err != nil { - panic(err) - } - raw, err := os.ReadFile(*secondFile) - if err != nil { - panic(err) - } - second, err := transcribe.ParseOutput(raw) - if err != nil { - panic(err) - } - fmt.Printf("mirrored %d cues, second %d cues\n", len(mirrored.Cues), len(second.Cues)) - - found := transcript.Inserted(second.Cues, mirrored.Cues) - var total int64 - for _, c := range found { - total += c.EndMs - c.StartMs - fmt.Printf(" %s-%s (%s)\n", clock(c.StartMs), clock(c.EndMs), clock(c.EndMs-c.StartMs)) - if *show { - for _, cue := range mirrored.Cues { - if cue.StartMs >= c.StartMs && cue.EndMs <= c.EndMs { - fmt.Printf(" %.88s\n", cue.Text) - } - } - } - } - gap := *servedMs - *declaredMs - fmt.Printf("\n%d pods, %s found of the %s inserted (%d%%)\n", - len(found), clock(total), clock(gap), total*100/gap) - _ = filepath.Join -} - -func clock(ms int64) string { return fmt.Sprintf("%d:%02d", ms/1000/60, ms/1000%60) } -- cgit v1.2.3