2

I'm using Photon Voice feature but I get a lot of echo even on the demo. I need to use the speaker so using headphones is not a solution for me. I have try to raise the voice detection value but it barely helps. Someone have the same problem? Im testing the app on mobile and pc.

Thank you in advance!

EDIT: Removing the audio source of our own prefab, helps a lot but don't solve the problem on some scenarios.

To remove audio source add on class CharacterInstantiation

o.GetComponent<AudioSource> ().enabled = false;

Like this

public new void OnJoinedRoom() {
        if (this.PrefabsToInstantiate != null) {
            GameObject o = PrefabsToInstantiate[(PhotonNetwork.player.ID - 1) % 4];
            //Debug.Log("Instantiating: " + o.name);
            Vector3 spawnPos = Vector3.zero;
            if (this.SpawnPosition != null) {
                spawnPos = this.SpawnPosition.position;
            }
            Vector3 random = Random.insideUnitSphere;
            random = this.PositionOffset * random.normalized;
            spawnPos += random;
            spawnPos.y = 0;
            Camera.main.transform.position += spawnPos;
            o = PhotonNetwork.Instantiate(o.name, spawnPos, Quaternion.identity, 0);
            o.GetComponent<AudioSource> ().enabled = false;
            if (CharacterInstantiated != null) {
                CharacterInstantiated(o);
            }
        }
    }
  • Unfortunately there is no echo cancellation, so you need to use a headset. – peterept Mar 31 '16 at 09:45
  • With headphones works right but it's not functional on a mobile phone without headphones. I hope Photon implement the echo cancellation soon. Meanwhile if someone have any suggestion I will appreciate it :) – Miguel Ángel Llorente Apr 01 '16 at 09:58
  • You could look at Mumble https://wiki.mumble.info - however they don't have a Unity3d plugin - you'd have to make one. Or, you could port their echo cancellation to c#. – peterept Apr 01 '16 at 20:34
  • Actually Mumble have a Unity plugin and it's very easy to use https://github.com/BananaHemic/Mumble-Unity – rkachach Feb 15 '21 at 16:38

2 Answers2

4

We are trying our best to find any possible enhancement to add to the voice calibration, noise suppression and echo cancellation. However, we believe we can't reach a perfect solution for all cases as it may depend on the hardware. Some vendors may implement voice cancellation on chip or in OS, while other pass to mic everything that speakers output.

Games that rely on audio experience do recommend the use of headphones, especially on mobiles with a spherical microphone characteristic.

photonians
  • 699
  • 1
  • 4
  • 12
0

Its an old question and the answers here are old too so adding new answer to this thread.

Kindly see the official docs here

Use Voice Activity Detection (VAD) feature and increase the the threshold as you desire. Threshold will remove background sound.

Also select Photon mic from Microphone Type. Photon mic adds noise cancellation. If you don't want to use Photon Mic then add WebRTCAudioDSP component with PhotonVoiceNetwork.

See this link for known issues and solutions for Photon Voice

Saad Anees
  • 1,255
  • 1
  • 15
  • 32