chore: add Apache License 2.0 and ignore build directory

This commit is contained in:
2026-07-16 17:24:50 +03:00
parent 45e4bce2a0
commit 7affa0dbc8
23 changed files with 1814 additions and 157 deletions
+3 -8
View File
@@ -12,11 +12,6 @@ import (
"tea.chunkbyte.com/kato/captioneer/src/config"
)
type SpeechSegment struct {
Start int
Samples []float32
}
type modelPaths struct {
encoder string
decoder string
@@ -96,13 +91,13 @@ func (r *Resources) FlushVAD() {
r.vad.Flush()
}
func (r *Resources) NextSpeechSegment() (SpeechSegment, bool) {
func (r *Resources) NextSpeechSegment() (int, []float32, bool) {
if r.vad.IsEmpty() {
return SpeechSegment{}, false
return 0, nil, false
}
segment := r.vad.Front()
r.vad.Pop()
return SpeechSegment{Start: segment.Start, Samples: segment.Samples}, true
return segment.Start, segment.Samples, true
}
func validatePaths(modelsDir string, mode config.Mode) (modelPaths, error) {