iOS echo cancellation in Unity

How to use the NatDevice plugin to implement iOS echo cancellation in Unity.



  • Add the following items to your Unity project's Packages/manifest.json

"scopedRegistries": [
      "name": "NatML",
      "url": "",
      "scopes": ["ai.natml"]
  "dependencies": {
    "ai.natml.natdevice": "1.2.2"
  • Copy your access key and add it to your Project Settings:


  • Copy NatDeviceAudioSource.cs from the liveswitch demo project located at Assets/Scripts/Channel
  • Change the CreateAudioSource method in LocalMedia.cs to return NatDeviceAudioSource instead of AudioClipSource
  protected override AudioSource CreateAudioSource(AudioConfig config)
        return new NatDeviceAudioSource(config);


Please reach out to if you would like us to provide you with a sample app to get you started.