Chore: panic is not solved (WIP)
This commit is contained in:
@@ -99,6 +99,11 @@ func (o *KokoroONNXOrator) ensureInitialized(modelPath string) error {
|
||||
} else {
|
||||
// Shape is (510, 1, 256), we want the last 256 values (or first? let's use mean or just pick one)
|
||||
// Actually, let's average across all 510 to get a single 256-dim vector
|
||||
if len(styleVec) != 510*256 {
|
||||
o.logger.Error("voice embedding has unexpected size", "len", len(styleVec))
|
||||
err = fmt.Errorf("voice embedding has unexpected size", "len", len(styleVec))
|
||||
return err
|
||||
}
|
||||
o.styleVector = make([]float32, 256)
|
||||
for i := 0; i < 256; i++ {
|
||||
var sum float32
|
||||
|
||||
Reference in New Issue
Block a user