Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agora-extension-ai-denoiser

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agora-extension-ai-denoiser - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

index.d.ts

6

package.json
{
"name": "agora-extension-ai-denoiser",
"version": "1.0.0",
"version": "1.1.0",
"description": "",

@@ -8,8 +8,8 @@ "keywords": [],

"module": "index.esm.js",
"typings": "agora-extension-ai-denoiser.d.ts",
"typings": "index.d.ts",
"author": "agora",
"peerDependencies": {
"agora-rtc-sdk-ng": ">=4.10.0"
"agora-rtc-sdk-ng": ">=4.15.0"
},
"license": "MIT"
}
### Install AI denoiser extension with Agora web SDK.
```javascript
import {AIDenoiserExtension} from "agora-extension-ai-denoiser";
// Create AIDenoiserExtension instance, please make sure this instance is a singleton, assetsPath is the path of wasm and wasmjs.
const denoiser = new AIDenoiserExtension({assetsPath:'./external'});
// Create AIDenoiserExtension instance, assetsPath is the path of wasm files.
const extension = new AIDenoiserExtension({assetsPath:'./external'});
// Register AI denoiser extension into AgoraRTC.
AgoraRTC.registerExtensions([denoiser]);
AgoraRTC.registerExtensions([extension]);
// listen the loaderror callback to handle loading module failed.
denoiser.onloaderror = (e) => {
extension.onloaderror = (e) => {
// if loading denoiser is failed, disable the function of denoiser. For example, set your button disbled.

@@ -21,13 +22,15 @@ openDenoiserButton.enabled = false;

```javascript
const processor = denoiser.createProcessor();
const processor = extension.createProcessor();
// If you want to enable the processor by default.
processor.enable();
await processor.enable();
// If you want to disable the processor by default.
// processor.disable();
// await processor.disable();
// Optional, listen the processor`s overlaod callback to catch overload message
processor.onoverload = async () => {
console.log("overload!!!");
processor.onoverload = async (elapsedTimeInMs) => {
console.log("overload!!!", elapsedTimeInMs);
// fallback or disable
// await processor.setMode("STATIONARY_NS");
await processor.disable();

@@ -59,3 +62,12 @@ }

### Change the denoiser mode and level.
```javascript
await processor.setMode("NSNG"); // recommended
await processor.setMode("STATIONARY_NS");
await processor.setLevel("LEVEL26"); // recommended
await processor.setLevel("LEVEL40");
```
### Dump audio (download files which are 30s audio file before the method called and two audio files 30s after the method called)

@@ -66,5 +78,8 @@ ```javascript

const tag = document.createElement("a");
tag.download = name + ".wav";
tag.download = name;
tag.href = objectURL;
tag.click();
setTimeout(() => {
URL.revokeObjectURL(objectURL);
}, 0);
}

@@ -77,2 +92,2 @@

processor.dump();
```
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc