Comments (2)
Do you mean the JSON or the Opus codec?
Both are well documented and used everywhere - try Google?
from zello-channel-api.
I was able to get this to work in Go without any issues. This is binary data, so you may have to do a bit of bit-banging to make it work:
- Look at the first byte of the binary message. If it == 0x01, then this is an audio stream.
- Take bytes 1-4 and decode them to a Uint32 type with BigEndian encoding. Not sure how to do this with Python, but presumably you can take a sub-set of the byte array and there is a function that will take the four bytes and give you a Uint32 back. This is your stream ID (save this to a variable somewhere).
- Take bytes 5-8 and decode these the same way - this is your packet ID. This number will increment for every packet.
- The rest of the binary data from bytes 9 to the end is your Opus encoded audio. Send that to your Opus decoder to get the audio frame.
Here's a few other tips that might help:
- In order to initialize your Opus decoder, you need to get the format information from the stream start message. In my application, I use this to create a data structure to receive the audio, open up the sound card stream, etc.
- You will need to create some sort of jitter buffer structure to hold the incoming audio frames before you play them out, to ensure that the output doesn't get starved if there is a delay in a packet arriving. It isn't a big concern with TCP based audio, but you may want to look at the packet ID numbers to make sure they increment without a gap, and go in order.
- Here's an example of the signal flow: incoming packet > decode header (stream ID and packet ID) > Opus decoder > slice (array?) of Int16 audio samples > buffer > output.
The documentation is quite good, once you understand the binary encoding part of it. Do you have any more specific detail about where you are stuck?
from zello-channel-api.
Related Issues (20)
- password
- receiving audi from a particular user in Channel HOT 4
- Timeout Error while receiving audio from another user in the channel HOT 2
- Need some help in decoding the binary audio stream HOT 2
- Embedding Zello on a Website HOT 1
- Clean workflow to stop OutgoingMessage
- Zello Channel API - Embedded Device HOT 4
- support HOT 1
- Windows/Android non interoperabilty with Channel API HOT 4
- No locations or messages showing on SDK HOT 1
- Support for emergency alerts
- A
- Audio Upload Interrupted HOT 2
- Is dveloper option no longer available for consumer non paid accounts? HOT 4
- Android SDK not working on Targeting S+ android version
- How can I receive audio from channels?
- on_stream_start
- Implementations not work
- Reset password send recover not anymore HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zello-channel-api.