please select
RTC Engine
  • Overview
  • Web
    • Run Sample Demo
    • Integration
    • Basic Features
      • Screen Sharing
      • Live Streaming
      • Media Device
      • Audio Volume
      • Set Encoding Profile
      • Detect Network Quality
      • Detect Capabilities
    • Advance Features
      • Enable AI Denoiser
      • Enable Audio Mixer
      • Enable Watermark
      • Enable Virtual Background
      • Enable Beauty and Effects
      • Data Messages
      • Custom Capturing and Rendering
    • API List
    • Released Notes
    • Supported Platforms
    • Web FAQs
      • Optimize Multi-Person Video Calls
      • Handle Autoplay Restriction
      • Handle Firewall Restriction
      • Others
  • Android
    • Run Sample Code
    • Integration
    • Basic Features
      • Sensing Network Quality
      • Enabling Screen Sharing
      • Setting Video Quality
      • Rotating Videos
    • Advanced Features
      • Testing Newwork Quality
      • Custom Capturing and Rendering
      • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • TRTCCloud
      • TRTCStatistics
      • TRTCCloudListener
      • TXAudioEffectManager
      • TXBeautyManager
      • TXDeviceManager
      • Type Definition
      • Deprecated Interface
      • Error Codes
    • Solution
      • Real-Time Chorus (TUIKaraoke)
        • Quick Integration
        • Implementation Steps
        • Song Synchronization
        • Lyric Synchronization
        • Vocal Synchronization
        • Mixing Stream Solution
        • TRTCKaraoke APIs
        • FAQs
    • Release Notes
  • iOS
    • Run Sample Code
    • Integration
    • Basic Features
      • Sensing Network Quality
      • Enabling Screen Sharing
      • Setting Video Quality
      • Rotating Videos
    • Advanced Features
      • Testing Network Quality
      • Custom Capturing and Rendering
      • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • TRTCCloud
      • TRTCCloudDelegate
      • TRTCStatistics
      • TXAudioEffectManager
      • TXBeautyManager
      • TXDeviceManager
      • Type Definition
      • Deprecated Interface
      • ErrorCode
    • Solution
      • Quick Integration
      • Implementation Steps
      • Song Synchronization
      • Lyric Synchronization
      • Vocal Synchronization
      • Mixing Stream Solution
      • TRTCKaraoke APIs
      • FAQs
    • Release Notes
  • macOS
    • Run Sample Code
    • Integration
    • Basic Features
      • Sensing Network Quality
      • Enabling Screen Sharing
      • Sharing Computer Audio
      • Setting Video Quality
      • Rotating Videos
    • Advanced Features
      • Testing Hardware Devices
      • Testing Network Quality
      • Custom Capturing and Rendering
      • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • TRTCCloud
      • TRTCCloudDelegate
      • TRTCStatistics
      • TXAudioEffectManager
      • TXBeautyManager
      • TXDeviceManager
      • Type Definition
      • Deprecated Interface
      • ErrorCode
      • Release Notes
    • Release Notes
  • Windows
    • Run Sample Code
    • Integration
    • Basic Features
      • Sensing Network Quality
      • Enabling Screen Sharing
      • Setting Video Quality
      • Rotating Videos
    • Advanced Features
      • Testing Hardware Devices
      • Testing Network Quality
      • Custom Capturing and Rendering
      • Custom Audio Capturing and Playback
    • Client APIs
      • Overview
      • ITRTCCloud
      • ITRTCStatistics
      • TRTCCloudCallback
      • ITXAudioEffectManager
      • ITXDeviceManager
      • Type Definition
      • Deprecated Interface
      • Error Codes
    • Release Notes
  • Electron
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Sharing Computer Audio
      • 10.Setting Video Quality
      • 11.Rotating Videos
    • Client APIs
      • Overview
      • Error Codes
  • Flutter
    • Integration
      • 1.API Examples
      • 2.Importing the SDK
      • 3.Entering a Room
      • 4.Subscribing to Audio/Video Streams
      • 5.Publish Audio/Video Streams
      • 6.Exiting a Room
      • 7.Sensing Network Quality
      • 8.Enabling Screen Sharing
      • 9.Sharing Computer Audio
      • 10.Setting Video Quality
      • 11.Rotating Videos
    • Client APIs
      • Overview
      • Error Codes
  • Unity
    • Integration
      • 1.API Examples
      • 2Importing the SDK
    • Client APIs
      • Overview
      • Error Codes
  • Qt
    • Integration
      • 1.Importing the SDK
  • Overview
    • Overview
  • Concepts
  • Features
  • Performance Statistics
  • Pricing
    • Free Minutes
    • RTC-Engine Monthly Packages
    • Billing Explanation for Subscription Package Duration
    • Pay-as-you-go
      • Billing of Audio and Video Duration
      • Billing of On-Cloud Recording and Recording Delivery
      • Billing of MixTranscoding and Relay to CDN
  • FAQs
    • FAQs for Beginners
    • Migration Guide
      • Twilio Video to Tencent RTC
      • Billing
      • Features
      • UserSig
      • Firewall Restrictions
      • How to Downsize Installation Package
      • TRTCCalling for Web
      • Audio and Video Quality
      • Others
RTC Engine

Enable AI Denoiser

The AI Denoiser plugin can reduce noise in calls and minimize the impact of environmental noise on communication. It can effectively suppress keyboard sounds, collisions, and other noises during calls, making it particularly suitable for scenarios where transient noise is sensitive, such as in conference settings.

This tutorial will introduce how to apply AI Denoiser to the local audio stream. Try Online Demo.

Prerequisites

1. For usage fee instructions, please see TRTC Edition Features and Pricing.
2. Supported browsers: Chrome 66+, Edge 79+, Safari 14.1+, Firefox 76+. To make the best use of AI Denoiser, it is recommended to use the latest version of Chrome browser.
Note
If there is background music in the microphone input, the denoising plugin may treat it as noise and eliminate it.

Implementation Process

Deploying Resources for Denoising

Dynamic loading of file dependencies: The AI Denoiser plugin relies on some files. To ensure that the browser can load and run these files properly, you need to complete the following steps:

Publish the denoiser-wasm.js file from the node_modules/trtc-sdk-v5/plugins/ai-denoiser directory to a CDN or a static resource server, and it should be in the same public path. If you need to use the denoising feature, you need to pass the URL of the above public path, and the plugin will dynamically load the dependent files.

If the Host URL of the files in the directory is different from the Host URL of the web application, you need to enable CORS policy for accessing the file domain.
Do not place the directory files under an HTTP service, as loading HTTP resources under an HTTPS domain will be blocked by the browser's security policy.

Enable Denoising

await trtc.startLocalAudio();
await trtc.startPlugin('AIDenoiser', {
assetsPath: 'XXXXX/assets/', // For example: the denoiser-wasm.js file is stored in the assets directory
sdkAppId: 123456,
userId: 'user_123',
userSig: 'XXXXXXXX'
});

Disable Denoising

await trtc.stopPlugin('AIDenoiser');

API Description

trtc.startPlugin('AIDenoiser', options)

Used to enable denoising.

options

Name
Type
Attributes
assetsPath
string
The location where the denoiser-wasm.js file is stored, for example: if it is stored in the assets directory, pass 'XXXXX/assets/'
sdkAppId
number
The sdkAppId of the current application
userId
string
The userId of the current user
userSig
string
The userSig of the current user
await trtc.startLocalAudio();
await trtc.startPlugin('AIDenoiser', {
assetsPath: 'XXXXX/assets/', // For example: the denoiser-wasm.js file is stored in the assets directory
sdkAppId: 123456,
userId: 'user_123',
userSig: 'XXXXXXXX'
});

trtc.stopPlugin('AIDenoiser')

Used to disable denoising.
await trtc.stopPlugin('AIDenoiser');