The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Voice.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Photon Voice will NOT work

Grant
2020-04-04 00:14:24

Hi all, I just cannot get Photon Voice to work and I've tried everything for over 3 days now. I am not getting any audible voice on either my iPad or iOS device. On iOS 13.3.1, Unity 2019.30f5, and Voice 2.14 latest download. I have a Recorder in my scene with Debug Echo on. Auto start and transmit checked. Microphone type was tried with both Unity and Photon. Think the device defaults to the microphone on device but I created some code to make sure it selects device[0] at runtime to be sure. Speakers are on all the avatars along with Voice Views with Setup Debug Speaker checked as well as Use Primary Recorder. Each Voice View's Speaker in Use set to each avatar's speaker component. I had issues with crashing when using Photon microphone type which was a whole other issue on this thread:

forum.photonengine.com/discussion/comment/50087#Comment_50087

So while that fix keeps Photon microphone type for crashing out I still never have gotten sound through when using either Photon or Unity microphone type. I have also compiled and run the Voice demos on both devices and same thing. No audible sound whatsoever either via debug mode or between networked devices. The debug text in the demo shows Amp average and peak at 0.0000000 always. What am I missing?? I cannot get any of this work and pulling my hair out.

Comments

JohnTube
2020-04-04 14:14:19

Hi @Grant,

First, let's try the demos.
And I prefer DemoVoiceUI scene.

Does the demos work in the Unity Editor?
Could you try a build of the demos on Mac or another platform just to make sure the issue is not on iOS only?

Disable VAD (Voice Activity Detector) just in case.

When you test on iOS do you use headphone/headset or earpieces?

Did you increase log level of Voice components and checked the logs?

Grant
2020-04-05 19:44:16

OK, so right out of the gate it's not working with the Demo Voice UI scene run in the editor. Looks like it's connecting to the Asia server (I'm in USA) and failing to join random room. I have entered in the Voice Connection component my VoiceID number. No audio but it seems first we have a connection problem:

https://icloud.com/iclouddrive/0iyWOlxUHnCVAEDgx4G0fD5pg#ScreenShot-1

To answer you other questions above. I have tried dozens of things to get it to work so yes, I had VAD disabled. Tried on iPhone/iPad with just built-in speakers and also over bluetooth with earbuds. I did increase the log level and didn't see anything of note but I will do so again and past the logs.

Grant
2020-04-05 20:18:47

@JohnTube, I ran my scene/application again on iPhone using Photon Microphone Type (also with Unity, same thing) and here are the logs with increased log level:

https://icloud.com/iclouddrive/0sqiGvj1098lnMam1ELqnTNNw#PUN_Voice_Logs

The thing that sticks out (as I have mentioned on other threads) is:

Here are screen shots of my settings:

https://icloud.com/iclouddrive/0bthqNjhRewyPKpjHE5BS1ixQ#ScreenShot-2

https://icloud.com/iclouddrive/0PmaSoif_2GVnKljQviBXFnWg#ScreenShot-3

JohnTube
2020-04-06 09:32:45

Hey @Grant,

Let's make Photon Voice work in Unity Editor first.

From the logs & screenshots it looks like you are using a Photon Chat AppId instead of a Photon Voice AppId!
This won't work.

Please use a proper valid compatible supported type of AppId, e.g. PUN, Realtime, Voice.
Only Chat is different.


If issue persists:

Try setting a "Fixed Region", one that is close to you.

In DemoVoiceUI what text do you see in the bottom left under "Connection"?

Enable SupportLogger from settings.
What do you see in the logs?

Grant
2020-04-06 15:29:30

Hi @JohnTube, OK, wow. Yeah that was not at all clear with having the wrong ID type! Going to my dashboard there was already a Chat box there having been using PUN for quite a while so I thought that was it. And the logs mentioned nothing about having the wrong ID that I could find. That should really be more clear if you're trying to use a feature with the wrong ID.

So now the DemoVoiceUI app is connecting to a server near me properly via Editor and I see the little speaker icon go on when I speak (though I have to turn off VAD to get it to register) along with various percentages of packet loss in the bottom left corner so assume it's transmitting. However, I still don't hear anything back. If Debug speaker is checked in the demo I should hear something with a slight delay back though my speakers correct?

Have logs turned all the way and Support Logger on now. Don't see any errors and the connections look valid but still no return sound...

Grant
2020-04-06 17:28:14

Hi again @JohnTube, I went back with the new ID and recompiled my iOS app and now it works! Getting sound back and forth. Still don't know why the demo on Mac via Editor doesn't provide Debug feedback sound as I wrote above but at least it's working on the intended devices now. However, I have run into the problem others have had with the audio coming though the iPhone's earpiece speaker and not the main. Because I was previously crashing as in this thread:

https://forum.photonengine.com/discussion/15678/ios-crashes-after-updating-from-photon-voice-2-12-to-photon-voice-2-13#latest

I downloaded and installed the fix for the AudioIn.mm file. Thinking that may have been the culprit I reimported from latest Voice 2.14 on asset store but that caused the crash again in the pushCallback routine. So I reinstalled that fix. Will this be released officially soon?

In any event, I still can't get the main speaker to play, only the earpiece. On other threads you said using Photon Mic Type (which I am) shouldn't require the iOS Force Audio to Speaker script so I have not been using that. Should I? What's the solution here. Almost there!

JohnTube
2020-04-06 23:33:57

Hey @Grant,

I'm glad it finally worked!

I agree, we should make AppId type mismatch easier to spot as it happens.
The thing is, both services (Realtime & Chat) connect to the same NameServer first...

About the Speaker issue, we have all info here.

Grant
2020-04-06 23:51:50

Thanks @JohnTube. I thought you weren't supposed to mess with the iOS Audio Session Parameters but I did go in there in the editor and changed to Custom and added Default to Speaker and also Allow Bluetooth and that seemed to do the trick! In business now.

However, I did have to download and put in the AudiIn.mm file per that link above from another thread to keep from crashing when using Photon Mic Type. When will that fix be incorporated in the distro?

JohnTube
2020-04-07 10:18:56

Hi @Grant,

Could you post a screenshot of your iOS Audio Session Parameters?

The fix will be part of the next update yes.

Grant
2020-04-07 16:25:43

Here are my settings I used:

https://icloud.com/iclouddrive/0pS70yrWXgkZ5orRjkGP4UJhQ#ScreenShot-4

Does that look right?

JohnTube
2020-04-07 18:47:07

I see.
If it works fine then keep it.
Not sure why the Game preset did not work for you.

Grant
2020-04-07 18:52:02

Game preset doesn't appear to output to the iPhone speaker by default. Goes to earpiece.

Back to top