go : added wrappers to reset and print timings (#436)

This commit is contained in:
Lukas Rist
2023-01-25 17:57:30 +01:00
committed by GitHub
parent 411ea9b833
commit 02c7516c57
4 changed files with 17 additions and 0 deletions

View File

@ -64,10 +64,13 @@ func Process(model whisper.Model, path string, flags *Flags) error {
// Process the data
fmt.Fprintf(flags.Output(), " ...processing %q\n", path)
context.ResetTimings()
if err := context.Process(data, cb); err != nil {
return err
}
context.PrintTimings()
// Print out the results
switch {
case flags.GetOut() == "srt":