Change wyoming Event.Data type to string

This commit is contained in:
Alex X
2025-04-22 16:35:44 +03:00
parent 7cf672da84
commit 70b4bf779e
5 changed files with 14 additions and 13 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ func (s *Server) HandleMic(conn net.Conn) error {
api := NewAPI(conn)
mic := newMicConsumer(func(chunk []byte) {
data := fmt.Sprintf(`{"rate":16000,"width":2,"channels":1,"timestamp":%d}`, timestamp)
evt := &Event{Type: "audio-chunk", Data: []byte(data), Payload: chunk}
evt := &Event{Type: "audio-chunk", Data: data, Payload: chunk}
if err := api.WriteEvent(evt); err != nil {
closed.Done(nil)
}