Download

Create/Join Session Blueprint Voice Chat

I have been struggling to get an online session going in code so I decided to try through blueprints. I believe it is actually working, it’s really hacky, but my main goal is to demonstrate voice chat on Macs. Here is a picture of MyGameInstance setting up the network:

And the basic UMG widget:

When I build this out the two Macs will connect to each other over LAN. I can’t get voice chat to work. Here is my DefauleEngine.ini code:


[OnlineSubsystem]
DefaultPlatformService=Null
bHasVoiceEnabled=true

[Voice]
bEnabled=true

Here is my DefaultGame.ini code:


[/Script/Engine.GameSession]
bRequiresPushToTalk=false

Does anyone have any idea what else needs to happen? Do the macs need microphones plugged into them to send voice chat over? Any help would be awesome! Thanks!

well obviously you need a microphone on both computers, other than that I have no idea and would also like to know about it.

Haha! Yeah, I worded that incorrectly… I meant to say, “does a built in microphone work?” as all Macs include a microphone built in.

oh, I guess that would not be a problem at all, I never used a mac and never will but if the mic is working on other apps, then the ue4 should detect it too and it should work I guess.

From everything I see online, this should work. It’s really got me stumped. You’d think once the two computers are running the same program the voice would be going with bRequiresPushToTalk set to false.

I am still stuck on this, I know the two computers are connecting using the online system. I just can’t get the voice chat to work. Is there no one that knows why this isn’t working?

Hi StretchMan,

Unfortunately we haven’t implemented the voice module for Mac OS yet. We are tracking this feature internally, so keep an eye out for it in a future release.

If you’re interested, we’re always happy to look at a GitHub pull request as well!

Do you have a timeline on this? I was really looking to do a quick proof of concept to show UE4’s graphics for Mac but I need Voice Chat included. I am not sure if I was intending to do something as complex as building in Voice Chat for a platform that isn’t supported. Well, on the bright side, that explains the last few weeks of frustration. Thanks!

Sorry, we don’t have a timeline to share for this feature right now.

I would really be interested in voice chat on mac too. By the way, is voice chat available on mobile platforms (android / iOS)?

Also, where can I find documentation about voice chat? At the moment I found only this:
https://docs.unrealengine.com/latest/INT/Programming/Online/Interfaces/Voice/index.html

I’ve just added a really trivial OpenAL implementation for OS X in Main, CL #2468783, Git: https://github.com/EpicGames/UnrealEngine/commit/7891945d2184f246cc42e3932800933f4740ff7a
It’ll be in the 4.8 binary release, but is very small & could theoretically be spot merged into 4.7 if you are building from source (with the usual caveat that it hasn’t been fully tested yet).

That’s just great!! thanks, I’ll check it out soon!
could this possibly work also on android or iOS devices?

OpenAL should be available on iOS, so in theory it might work there too, but I can’t say for sure as I’ve not checked/tested it. it won’t work on Android as that uses a very different audio API.

Ok thanks! I’ve compiled 4.7.2 replacing the three files you modified, packaged a multiplayer standalone client following these instructions:
https://answers.unrealengine.com/questions/49442/trying-to-make-in-game-voice-communication.html?sort=oldest
(changed DefaultEngine.ini and DefaultGame.ini basically)
I connected the two clients (running on 2 different macs) but I didn’t manage to have voice chat working (couldn’t hear anything on none of the two sides). Is there anything else I am supposed to do to enable the functionality?
I tried to type DumpVoiceMutingState in the console but the command was not recognised. How can I debug what’s going on?

Make sure that you have correctly setup your input device in System Preferences > Sound.

Try a simpler test case - on one Mac bring down the console & enter ‘online test voice’ without the quotes. This should start playing the capture back through the speakers. During implementation, I disabled the compression/decompression routines so that I could be sure that what I’d done worked by modifying the default value for bUseDecompressed in TestVoice.cpp. If that makes the test work then at least we know the problem is somewhere in the encoding or decoding.

Ok, tried ‘online test voice’ and it works, I can hear my voice. Is there anything else I have to enable or any multiplayer session should work?
Up to now I just changed DefaultEngine.ini with:
[OnlineSubsystem]
DefaultPlatformService=Null
bHasVoiceEnabled=true

[Voice]
bEnabled=true

and DefaultGame.ini with:
[/Script/Engine.GameSession]
bRequiresPushToTalk=false

put the server in listen mode and open a connection from the other client with the console.

Ok, ‘online test voice’ works, I can hear my voice. Is there a way I can test if voice chat is working using a single mac? (e.g. both clients on the same machine?)

Exiting the clients or the editor I often get the following crash log:

Exiting the client often I get this crash:
<SOURCE START>
<SOURCE END>

<CALLSTACK START>
OALCaptureDevice::~OALCaptureDevice() Address = 0x1088dbf41 (filename not found) [in OpenAL]
alcCaptureCloseDevice() Address = 0x1088c1843 (filename not found) [in OpenAL]
FVoiceCaptureOpenAL::~FVoiceCaptureOpenAL() Address = 0x1030ec97e (filename not found) [in xxx]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x10310d5cb (filename not found) [in xxx]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x10310d95e (filename not found) [in xxx]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x10310fd05 (filename not found) [in xxx]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x1031100ae (filename not found) [in xxx]
FOnlineSubsystemNull::Shutdown() Address = 0x1045e3184 (filename not found) [in xxx]
FOnlineSubsystemModule::ShutdownOnlineSubsystem() Address = 0x1030dd557 (filename not found) [in xxx]
FModuleManager::UnloadModule(FName, bool) Address = 0x101bb4dea (filename not found) [in xxx]
FModuleManager::UnloadModulesAtShutdown() Address = 0x101bb5986 (filename not found) [in xxx]
FEngineLoop::Exit() Address = 0x1019e58ca (filename not found) [in xxx]
GuardedMain(wchar_t const*) Address = 0x1019e638e (filename not found) [in xxx]
-[UE4AppDelegate() Address = 0x1019f1a93 (filename not found) [in xxx]
-[FCocoaGameThread() Address = 0x101acf038 (filename not found) [in xxx]
NSThread__main() Address = 0x7fff8e29c90a (filename not found) [in Foundation]
_pthread_body() Address = 0x7fff92fa3268 (filename not found) [in libsystem_pthread.dylib]
_pthread_body() Address = 0x7fff92fa31e5 (filename not found) [in libsystem_pthread.dylib]
thread_start() Address = 0x7fff92fa141d (filename not found) [in libsystem_pthread.dylib]
<CALLSTACK END>

Enabling bUseDecompressed(false) has caused ‘online test voice’ work for a few seconds and then no more, even relaunching the app.
Often when exiting the client I get the following crash:

<SOURCE START>
<SOURCE END>

<CALLSTACK START>
OALCaptureDevice::~OALCaptureDevice() Address = 0x1176eaf41 (filename not found) [in OpenAL]
alcCaptureCloseDevice() Address = 0x1176d0843 (filename not found) [in OpenAL]
FVoiceCaptureOpenAL::~FVoiceCaptureOpenAL() Address = 0x111ef697e (filename not found) [in Rift]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x111f175cb (filename not found) [in Rift]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x111f1795e (filename not found) [in Rift]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x111f19d05 (filename not found) [in Rift]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x111f1a0ae (filename not found) [in Rift]
FOnlineSubsystemNull::Shutdown() Address = 0x1133ed184 (filename not found) [in Rift]
FOnlineSubsystemModule::ShutdownOnlineSubsystem() Address = 0x111ee7557 (filename not found) [in Rift]
FModuleManager::UnloadModule(FName, bool) Address = 0x1109bedea (filename not found) [in Rift]
FModuleManager::UnloadModulesAtShutdown() Address = 0x1109bf986 (filename not found) [in Rift]
FEngineLoop::Exit() Address = 0x1107ef8ca (filename not found) [in Rift]
GuardedMain(wchar_t const*) Address = 0x1107f038e (filename not found) [in Rift]
-[UE4AppDelegate() Address = 0x1107fba93 (filename not found) [in Rift]
-[FCocoaGameThread() Address = 0x1108d9038 (filename not found) [in Rift]
NSThread__main() Address = 0x7fff8e29c90a (filename not found) [in Foundation]
_pthread_body() Address = 0x7fff92fa3268 (filename not found) [in libsystem_pthread.dylib]
_pthread_body() Address = 0x7fff92fa31e5 (filename not found) [in libsystem_pthread.dylib]
thread_start() Address = 0x7fff92fa141d (filename not found) [in libsystem_pthread.dylib]
<CALLSTACK END>

Enabling bUseDecompressed(false) has caused ‘online test voice’ work for a few seconds and then no more, even relaunching the app.
Often when exiting the client I get the following crash:

<SOURCE START>
<SOURCE END>

<CALLSTACK START>
OALCaptureDevice::~OALCaptureDevice() Address = 0x1176eaf41 (filename not found) [in OpenAL]
alcCaptureCloseDevice() Address = 0x1176d0843 (filename not found) [in OpenAL]
FVoiceCaptureOpenAL::~FVoiceCaptureOpenAL() Address = 0x111ef697e (filename not found) [in xxx]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x111f175cb (filename not found) [in xxx]
FVoiceEngineImpl::~FVoiceEngineImpl() Address = 0x111f1795e (filename not found) [in xxx]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x111f19d05 (filename not found) [in xxx]
FOnlineVoiceImpl::~FOnlineVoiceImpl() Address = 0x111f1a0ae (filename not found) [in xxx]
FOnlineSubsystemNull::Shutdown() Address = 0x1133ed184 (filename not found) [in xxx]
FOnlineSubsystemModule::ShutdownOnlineSubsystem() Address = 0x111ee7557 (filename not found) [in xxx]
FModuleManager::UnloadModule(FName, bool) Address = 0x1109bedea (filename not found) [in xxx]
FModuleManager::UnloadModulesAtShutdown() Address = 0x1109bf986 (filename not found) [in xxx]
FEngineLoop::Exit() Address = 0x1107ef8ca (filename not found) [in xxx]
GuardedMain(wchar_t const*) Address = 0x1107f038e (filename not found) [in xxx]
-[UE4AppDelegate() Address = 0x1107fba93 (filename not found) [in xxx]
-[FCocoaGameThread() Address = 0x1108d9038 (filename not found) [in xxx]
NSThread__main() Address = 0x7fff8e29c90a (filename not found) [in Foundation]
_pthread_body() Address = 0x7fff92fa3268 (filename not found) [in libsystem_pthread.dylib]
_pthread_body() Address = 0x7fff92fa31e5 (filename not found) [in libsystem_pthread.dylib]
thread_start() Address = 0x7fff92fa141d (filename not found) [in libsystem_pthread.dylib]
<CALLSTACK END>