From ef8df5b18af0217287335e32936db073e0083919 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Thu, 16 Feb 2023 21:19:09 +0600 Subject: Feat: use opus; buffered queue --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b7b84f2..de3fa58 100644 --- a/main.go +++ b/main.go @@ -73,7 +73,7 @@ func linesToUtterances(lines []string, fd *FileData) []*Utterance { RightTime: strings.TrimSpace(splitted[1]), FD: fd, } - u.OutPath = fmt.Sprintf("%s/%s_%s_%s.wav", outdir, fd.AudioBase, + u.OutPath = fmt.Sprintf("%s/%s_%s_%s.opus", outdir, fd.AudioBase, u.LeftTime, u.RightTime) // todo: compare and filter time @@ -166,7 +166,7 @@ func main() { // filteredUtterances := []*Utterance{} // === concurrent === - queue := make(chan *Utterance) + queue := make(chan *Utterance, len(utterances)) done := make(chan bool, 1) for _, ut := range utterances { -- cgit v1.2.3