How to estimate ReverseStreamDelayMs in WebRtcAudioDsp of Photon Voice 2?


I am trying DemoVoice scene of Photon Voice 2 and found that there is ReverseStreamDelayMs in WebRtcAudioDsp script. I believe the configuration is for echo cancellation but what does ReverseStreamDelayMs mean and how do I estimate the value for my device?

Thank you.


  • Hello,

    Why you need this parameter? Echo cancellation should adjust this delay automatically.
    Or something does not work for you?
  • Hi,

    I got many echoes when testing DemoVoice on my device(Vive Focus). My configurations are
    Microphone = Unity
    Reliable Transmission = FALSE
    DebugEcho = TRUE
    AECMobile = TRUE
    Noise Suppression = TRUE
    AGC = TRUE
    VAD = TRUE

    I also dumped the value of ReverseStreamDelayMs when the echoes happened but the value did not adjust automatically.
  • I have the same issue with a lot of echoes when using speakerphone on cell phone devices. If I plug headphones into the phones, there is no echo, and you cannot hear the other party's voice repeating,(Works great) but when using the speakerphone, it becomes un-useable when both parties/more than one person is speaking and you record your voice while the speaker is playing their voice audio.
    I have attempted to use the DemoVoice scene and my own scene with the WebRtcAudioDsp script, inbut don't really notice a difference, even when using Unity vs Photon Microphones.

    Did you find a way to verify that WebRtcAudioDsp script is actually scrubbing the audio?
  • Echo cancellation is enabled when you use default settings (import PhotonVoice into new empty project) and set microphone type to Photon. Which devices did you test? Do you have any errors in log?
    Alternatively, use WebRtcAudioDsp plugin when microphone type set to Unity. Check logs for lines containing "WebRTC" in case something goes wrong.
    Echo cancellation is not intended to cancel echo produced by signal returned from server in Debug Echo mode. Test PhotonVoice with at least 2 clients and make sure that there is no audio feedback between devices.