zelloptt / zello-channel-api

WebSocket-based API and SDKs to connect to Zello channels (BETA)
MIT License
88 stars 35 forks source link

Need some help in decoding the binary audio stream #188

Open ayush-pradhan-bit opened 2 years ago

ayush-pradhan-bit commented 2 years ago

I have written the code to receive audio from a client in the same channel. However, the data are in Binary. I have attached a text file containing the Binary. data.txt

Is there any suggestion to convert the Binary into Opus stream.

ayush-pradhan-bit commented 2 years ago

I went through previous issues and found the solution for the extra 9 bytes which needs to be stripped off to get the opus audio. However, is there any python file to do so. There is a dedicated JS SDK for it but unfortunately I am working with python or c language.

ihorserba commented 2 years ago

Hi @ayush-pradhan-bit !

There is the python application for streaming an ogg-encapsulated opus stream to a Zello channel.

You can investigate how it constructs outgoing packets and implement the reverse logic in order to parse incoming packets.