Download pkg/sound/float32.go from AbdulElahGwaith/LocalAI: direct link, hf CLI and curl.
- Browser
- Download file 192 Bytes
-
https://huggingface.co/AbdulElahGwaith/LocalAI/resolve/main/pkg/sound/float32.go
- Command line
-
hf download hf://AbdulElahGwaith/LocalAI/pkg/sound/float32.go
-
curl -L -o float32.go https://huggingface.co/AbdulElahGwaith/LocalAI/resolve/main/pkg/sound/float32.go
192 Bytes
| package sound | |
| import ( | |
| "encoding/binary" | |
| "math" | |
| ) | |
| func BytesFloat32(bytes []byte) float32 { | |
| bits := binary.LittleEndian.Uint32(bytes) | |
| float := math.Float32frombits(bits) | |
| return float | |
| } | |