Implementing Photon Voice with c++

There is no PhotonVoice for C++ SDK and I need it for Unreal, so, I've implemented a voice chat using the mic and a procedural wav component, and what I do is to send the array of uint8 with the recorded voice buffer to all the players (but me) and rebuild this array in the destiny to play it.
The problem is that the buffer is really big (4k entries) and compression didnt save much (zip) because the repetitions pattern is so small, so we gain almost nothing compressing and we lost cpu load with the process.
So ,what can we do to save bandwidth? it's really huge, just 2 users can consume almost 1GB in a session, even trying to lowering the buffer and spacing it a little bit between sendings and detecting a total volume of a sensitivity...
maybe i should try a better audio-compressor instead of just pile up the buffer of uint8's and send it over?

Comments

  • Hi @jbelonalea.

    You may just want to download our Photon Voice package for Unity and implement it in a similar way in C++.
    The C# Voice Client uses Opus for the Audio encoding and Opus itself is written in C++, so that would be what we would also use in a C++ port of Photon Voice.

    You might also just contact us by email (https://www.photonengine.com/en-US/Contact) and discuss options.
  • vadim
    vadim mod
    edited September 2017
    Hi,

    Porting c# library may be a quite big task. But luckily you've already implemented most of what Photon Voice does.
    The only missing thing is compression/decompression. Integrate Opus lib in your application. It works only with predefined set of sampling rates and consumes data only in buffers of predefined sizes. If your audio processing pipeline can meet these requirements, integration should not be hard.