mirror of
https://github.com/mudler/LocalAI.git
synced 2025-12-27 08:29:29 -05:00
* feat(realtime): Initial Realtime API implementation Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * chore: go mod tidy Signed-off-by: Richard Palethorpe <io@richiejp.com> * feat: Implement transcription only mode for realtime API Reduce the scope of the real time API for the initial realease and make transcription only mode functional. Signed-off-by: Richard Palethorpe <io@richiejp.com> * chore(build): Build backends on a separate layer to speed up core only changes Signed-off-by: Richard Palethorpe <io@richiejp.com> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: Richard Palethorpe <io@richiejp.com> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
13 lines
192 B
Go
13 lines
192 B
Go
package sound
|
|
|
|
import (
|
|
"encoding/binary"
|
|
"math"
|
|
)
|
|
|
|
func BytesFloat32(bytes []byte) float32 {
|
|
bits := binary.LittleEndian.Uint32(bytes)
|
|
float := math.Float32frombits(bits)
|
|
return float
|
|
}
|