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)
| 193 | // callers that only need a single reference set audio_path to a single |
| 194 | // path. Empty / whitespace-only entries are skipped. |
| 195 | func 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 | |
| 210 | func (v *VibevoiceCpp) Load(opts *pb.ModelOptions) error { |
| 211 | if opts.ModelFile == "" { |