Oculus & PUN2 w/ Voice not working as intended

edited July 2022 in Photon Voice

I'm trying to integrate Voice2 to a multiplayer scene and I'm facing some issues:

The first player spawns in. The second player spawns in. They can both hear each other.

The third player spawns in and can only hear the second player. The first and second player can't hear the third.

The fourth player spawns in and can only hear the third player. The first, second, and third can't hear the fourth player. And so on...

This is how I have it set up currently:

I have a scene with a PlayerPrefab GameObject in it called XR Rig. That GameObject has a Photon View and a PhotonVoiceView. A Child GameObject is also included called Speaker which has the Audio Source and the Speaker components in it.

The scene also has a VoiceManager GameObject which has a Photon Voice Network, a Recorder, and an Audio Changes Handler Component in it.

This is the script I use for instantiating the Remote Representation of the Player called RemotePlayer. That Prefab has no Voice Components in it. Just a Photon View.

Any help would be appreciated!


  • Hi,

    Can you reproduce this with one of the demos from the Voice package or the bug is specific to your app?

    Detailed logs (level ALL) collected from 3 or 4 clients may help to track the issue.

    Normally, for Voice/PUN integration, you need only one prefab representing the player, with PhotonVoiceView, Recorder an Speaker attached. When the client instantiates the prefab, prefab's remote copies automatically created. The local copy starts the Recorder capturing audio steam and remote copies start Speakers playing this stream.

    Your app does not seem to align well with this workflow. Maybe this is the reason.

    On the other hand, Voice should not expose such asymmetrical behavior even if used incorrectly: w/o using audio groups, the audio source should be heard on all or none of the other clients. Making Voice behavior consistent and predictable under different circumstances is our goal currently. We expect improvements in this matter in the next release.

  • Hey @vadim!

    I got it to work. The solution (in case you're interested) was to only use a PhotonVoiceView, a PhotonView, a PhotonVoiceNetwork, and a Recorder in the local prefab and a PhotonView, PhotonVoiceView, an AudioSource, and a Speaker in the remote instantiated player prefab.

    Thanks for your response!

  • It's great that it works.

    Is it possible to have different prefabs for local and remote objects in PUN?