Problem with Voice chat in OnlineSubsystemNULL

Hi guys, I’m trying to make a voice chat for a LAN online session using the online subsystem NULL. I have correctly set up an online session between two players and the voice capturing is working fine, since recalling IOnlineVoice::IsRemotePlayerTalking() returns true when the second player joins the game. Furthermore reading this topic I have understood that the method that should play the remote voice is IVoiceEngine::ProcessRemoteVoicePackets(), so I have put a breakpoint on it, and indeed it is correctly executed, but still no sound has been played in my game. Reading the source I have noticed that the latter method creates an audio components for each new player and attach it to the default Audio Device, am I right? So I have assumed that the problem might be with my default Audio Device, but I have found no problem with it. Any help?
I’m also wondering if there is a way to redirect the remote packages to another AudioComponent or at least a way to retrieve this packages, but I have found nothing since the attributes that contains this data is private and to me no method seems to expose it. Does someone know a way to do it?
PS: I have thought about two workarounds:

  • Use an UDP socket to pass the voice data recording, so I can play them from any AudioComponents.
  • Create a custom OnlineSubsystem (subclass of the NULL subsystem) to expose a custom Voice system (subclass of FOnlineVoiceImplPtr) in which I override the method ProcessRemoteVoicePackets().
    Does those ideas seem legit?

Check the 4.19 changelog, redirecting voice to different components with spatialization is in now using UVOIPTalker. As far as not getting sound with the normal stuff, make sure you have in defaultengine.ini:



[OnlineSubsystem]
bHasVoiceEnabled=true
[Voice]
bEnabled=true


and defaultgame.ini:



[/Script/Engine.GameSession]
bRequiresPushToTalk=false


Yup, all my configurations were right, the problem is elsewhere. Anyway I read about that, but I understood that it is only available on Windows platform, isn’t it? Is there some documentation about that?

Edit: I have just run the program today and it works, I really have no idea what was the problem yesterday, perhaps my tiredness.
Edit2: I will open a new post for the question about UVOIPTalker.

Just in case, I remembered that Voice is only working if all the “sessions stuff” is properly activated and setup.

Hello,

You can use this plugin for voice chat, it works Cross-platform on Windows, Android, iOS. It works on both no session based game and session based game.

You can do global, team and proximity voice chat.
It is optimized with the usage of opus codec,
and you can choose microphone sampling rate and number of channels, you can also get the raw Pcm data of microphone input.