Push to Talk

So, I have a bit of a puzzling situation --

I have push-to-talk that works great in DebugEchoMode with
a single client and AutoTransmit set to off

and

AutoTransmit that works great with more than one client (send/receive)
but ignores my push-to-talk.

I understand why AutoTransmit might be overriding any calls
to VoiceRecorder.Transmit(on/off), but I don't understand why I can't
transmit anything without AutoTransmit as soon as I have 2 clients open.

What am I doing wrong?

I'm running PUN 1.69, VOICE 1.3, Unity 5.3.4
(tried switching to 1.72 & 1.4 but that only breaks more things in my code).

Comments

  • vadimvadim ✭✭✭
    AutoTransmit sets Transmit property only once on voice room join. So you can ignore it or better set to false if control Transmit property manually.
    What is IsTransmitting property of PhotonVoiceRecorder component when you switch transmission?
    Don't forget to disable voice autodetection while debugging app.
  • Hi vadim,

    I did dig into AutoTransmit so yes, I do know that it sets Transmit once, but that makes it into even more of a puzzle ;)

    Ok, maybe this set of clues will be of more help:

    - I have a push to talk function which toggles Transmit on/off
    - this works great if I test it in Debug Echo mode (AutoTransmit = off) AND I'm only using 1 client
    - isTransmitting works as expected in this situation (toggles on/off per request)

    - now, if I try doing this with 2 clients debug or not, isTransmitting always shows false
    even though I'm using the same function to toggle Transmit and I can trace a successful
    calls to the function.

    - the only way I've figured out to have Voice work in the above situation, is to set AutoTransmit to ON,
    but my calls to voiceRecorder.Transmit are still ignored, so I can't turn it on/off.

    So, the puzzling part is: why is a call to Transmit working when called by AutoTransmit and NOT by my function when the only difference in those two situations is the number of clients in the room?


  • P.S. With the exception of AutoTransmit, which I use in 1 test case, the ONLY Photon Voice Settings toggle I have on is AutoConnect.
  • Went back to resolving this issue and finally found the bug! The script that registers the VoiceRecorder ran on both clients! In short, I was inadvertently registering the voice on the wrong client, then couldn't understand why the right one wasn't receiving my calls. photonView.isMine solved this in a sec :)
  • Hi @ikrs,

    I'm glad you managed to resolve your issue by yourself! We wanted to help sooner and in fact, we made a whole Push-To-Talk scene to be released in an upcoming Photon Voice unity package. It's working as expected and we could not reproduce the issue.

    Anyway, thanks for choosing Photon!
Sign In or Register to comment.