mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 06:25:00 +00:00
feat(realtime): Initial Realtime API implementation
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
456b4982ef
commit
ae6069a0a0
13 changed files with 1453 additions and 1135 deletions
12
pkg/sound/float32.go
Normal file
12
pkg/sound/float32.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package sound
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"math"
|
||||
)
|
||||
|
||||
func BytesFloat32(bytes []byte) float32 {
|
||||
bits := binary.LittleEndian.Uint32(bytes)
|
||||
float := math.Float32frombits(bits)
|
||||
return float
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue