Multiple Audio Source

I am building a karaoke app using photon voice. The karaoke system itself already provided by another 3rd party SDK, the SDK create an Audio Source to play the bgm when karaoke session started.

I am currently unsure about the most efficient method to combine and transmit the BGM and the user's singing to other players. I tried playing the BGM locally for each player and then transmitted only the singing voice, but the network latency often caused the singing voice and the BGM to be out of sync. To resolve this, I considered allowing only one player to sing at a time, with the BGM played only on the singer's side. The combined audio would then be transmitted as a single stream to prevent any syncing issues.

from this comment, it seems that a single player can have multiple recorders. Is it possible to use one recorder to transmit the BGM using the AudioSource, and another recorder to transmit the singing voice using the microphone?

I have also seen a similar use case discussed here

It only use one recorder with two audio sources: the BGM and the singing voice. These two audio streams were then combined using the OnAudioFilterRead callback on each audio source.

I would appreciate a second opinion on which approach might be better. Perhaps there's an alternative way to implement this using a Photon Voice API feature that I haven't yet discovered?

I'm inclined towards the second approach, as it only transmits a single audio stream, which I suspect would consume less bandwidth compared to the first approach.

I look forward to hearing your suggestions and feedback.


  • i didnt realize this forum is retired and become read only. moving question to discord