chore: add Apache License 2.0 and ignore build directory
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user