MCPcopy
hub / github.com/mudler/LocalAI / parseRefAudio

Function parseRefAudio

backend/go/vibevoice-cpp/govibevoicecpp.go:195–208  ·  view source on GitHub ↗

parseRefAudio splits a comma-separated audio_path value into a resolved list of WAVs. The 1.5B model uses one WAV per speaker; callers that only need a single reference set audio_path to a single path. Empty / whitespace-only entries are skipped.

(audioPath, relTo string)

Source from the content-addressed store, hash-verified

193// callers that only need a single reference set audio_path to a single
194// path. Empty / whitespace-only entries are skipped.
195func parseRefAudio(audioPath, relTo string) []string {
196 if audioPath == "" {
197 return nil
198 }
199 var out []string
200 for _, p := range strings.Split(audioPath, ",") {
201 p = strings.TrimSpace(p)
202 if p == "" {
203 continue
204 }
205 out = append(out, resolvePath(p, relTo))
206 }
207 return out
208}
209
210func (v *VibevoiceCpp) Load(opts *pb.ModelOptions) error {
211 if opts.ModelFile == "" {

Callers 1

LoadMethod · 0.85

Calls 1

resolvePathFunction · 0.85

Tested by

no test coverage detected