Steam voice chat stops working after server travel

Sean, have you tried without push to talk?

I haven’t had time to make a project for you, as I work 7 days per week, but I did look at the project you linked. The obvious difference was the use of c++ and push to talk. Could you just follow the Steam multiplayer blueprint tutorial series and use that to test?

Hey Sean,
This may be a dumb question, but are you sure the voice was working on both the server and the client in your tests? and did you server travel several (~5) times? And also, are you using seamless travel?
I’ll see if I can get you a test project as my next task, but if you could answer those questions in the meantime it would help me out a lot, thanks!
-Nicholaos

Hi Sean,

Looking at your project, it seems that you didn’t yet set a transition map for the seamless travel… I think that’s what was going wrong with your project… Also, the bRequiresPushToTalk entry must be removed from your DefaultEngine.ini file. Also, you have to call the ServerTravel console command instead of the SeamlessTravel function. I’ve done that with this project, give it a try.

-Nicholaos

link text

Thank you for all of your information and effort as far as reproducing the issue goes. I’ve reproduced it, and gotten a bug report entered, which you can track using the link below:

Have a great day

this is happening to me too, in 4.16.2. Voice fades back after i stop talking for 5-10 seconds

i’ve been digging, and it looks like voice only comes back after the audio component is “starved” by a sufficient lack of packets.

UE_LOG(LogVoiceDecode, Log, TEXT("VOIP audio component was starved!"));

I have a workaround, although it’s sort of hacky.

I pulled the OnlineSubsystemSteam plugin code into my project so I can modify it. In VoiceEngineSteam.h, I modified RegisterRemoteTalker (which is basically empty for steam) as follows:

virtual uint32 RegisterRemoteTalker(const FUniqueNetId& UniqueId) override
{
	const FUniqueNetIdSteam& SteamId = (const FUniqueNetIdSteam&)UniqueId;
	RemoteTalkerBuffers.Remove(SteamId);

	// Not needed in Steam
	return S_OK;
}

This will force the player’s talk buffer to be recreated. I had some trouble figuring out where to put this because of interface/scope craziness, so I just chose to put it here because it’s accessible through the interface. VoiceInterfaceSteam will not call the function if the talker has already been registered, however, so in VoiceInterfaceSteam.cpp I’ve modified the RegisterRemoteTalker function as follows:

bool FOnlineVoiceSteam::RegisterRemoteTalker(const FUniqueNetId& UniqueId) 
{
    uint32 Return = E_FAIL;

// Skip this if the session isn't active
if (SessionInt && SessionInt->GetNumSessions() > 0 &&
	// Or when voice is disabled
	VoiceEngine.IsValid())
{
	// See if this talker has already been registered or not
	FRemoteTalker* Talker = FindRemoteTalker(UniqueId);
	if (Talker == NULL)
	{
               ...
	}
	else
	{
		UE_LOG(LogVoice, Verbose, TEXT("Remote talker %s is being re-registered"), *UniqueId.ToDebugString());

		// call register anyways because we need to flush the buffer
		Return = VoiceEngine->RegisterRemoteTalker(UniqueId);
	}
	...
}

return Return == S_OK;
}

Then I’m just calling

VoiceInterface->RegisterRemoteTalker(SteamId)

for each player state after a seamless travel. The buffers get recreated and voice comes back immediately.

Obviously this is not an ideal solution, but it does technically solve the problem.

apparently TickTalkers dumps audio components after 5 seconds of inactivity:

void FVoiceEngineSteam::TickTalkers(float DeltaTime)
{
	// Remove users that are done talking.
	const double CurTime = FPlatformTime::Seconds();
	for (FRemoteTalkerData::TIterator It(RemoteTalkerBuffers); It; ++It)
	{
		FRemoteTalkerDataSteam& RemoteData = It.Value();
		double TimeSince = CurTime - RemoteData.LastSeen;
		if (TimeSince >= 5.0)
		{
			// Dump the whole talker
			if (RemoteData.AudioComponent)
			{
				RemoteData.AudioComponent->Stop();
				RemoteData.AudioComponent = NULL;
			}

			It.RemoveCurrent();
		}
	}
}

How did you pull the subsystem plugin into your own code? I am having trouble doing that, if I put it in the plugins folder, it says that I cannot have duplicate classes, and if I copy into my own project, I have to edit all the include files

i was able to just copy/paste it from Engine/Plugins to MyProject/Plugins. You may have to regenerate VS project files

The problem persists in UE4.22

Hello I´m having the same issue, somedy has solve the problem? I´m working in a project in unreal 4.24 and after travelling players can´t speak each other any longer.

I am having the same problem in 4.26