Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/AgoraIO/Doc-Source-Private
Browse files Browse the repository at this point in the history
… into staging
  • Loading branch information
atovpeko committed Dec 13, 2023
2 parents e850b8c + d92b88c commit 1a5fb69
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Dabi AI Dubbing Voice Changer"
title: "Dubbing AI Voice Changer"
sidebar_position: 3
type: docs
description: >
Dabi AI voice changing plug-in is an encapsulation of the core API of real-time AI voice conversion.
Dubbing AI Voice Changer extension is an encapsulation of the core API of real-time AI voice conversion.
---
export const toc = [{}];

Expand Down
22 changes: 21 additions & 1 deletion shared/extensions-marketplace/reference/_vb.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
**You may be charged for the usage of this extension. Contact <a href="mailto:[email protected]">[email protected]</a> for details.**
### v1.2.0

v1.2.0 was released on December 10, 2023.

#### Compatibility changes

As of this version, the Virtual Background extension incorporates the necessary Wasm module. You no longer need to publish the Wasm file separately, and pass the `wasmDir` parameter when calling the `init` method to initialize the extension.

After upgrading to this version, please modify your code accordingly.

#### Improvements

This release upgrades the background segmentation algorithm of the extension, optimizing the segmentation effects on the subject, edges, and fingers in complex static and dynamic backgrounds.

#### Fixed issues

This release fixed the issue that `checkCompatibility` could return inaccurate results on specific devices.

#### API changes

The `wasmDir` parameter of the `init` method is now optional.

### v1.1.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Integrate the virtual background extension, and implement the virtual background
processor = extension.createProcessor();
```

2. Call `processor.init` to initialize the extension. In this method, you need to pass in the URL of the Wasm module. If resource loading or extension initialization fails, this method throws an exception. Catch this exception, and handle it accordingly.
2. Call `processor.init` to initialize the extension. If resource loading or extension initialization fails, this method throws an exception. Catch this exception, and handle it accordingly.

```typescript
await processor.init("./assets/wasms");
await processor.init();
```

3. After creating a local camera track, call `videoTrack.pipe` and `videoTrack.processorDestination` to inject the extension into the SDK's media processing pipeline.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Take the following steps to set up your project:

1. Refer to the appropriate Quickstart Guide to integrate the Web SDK (v4.10.0 or later) and implement the basic real-time communication functions in your project.

2. Integrate the [virtual background extension](https://www.npmjs.com/package/agora-extension-virtual-background) into your project via npm:
1. Integrate the [virtual background extension](https://www.npmjs.com/package/agora-extension-virtual-background) into your project via npm:

1. To install the virtual background extension, run the following command :

```bash
npm install agora-extension-virtual-background
```

2. To import the virtual background extension, use any of the following methods:
1. To import the virtual background extension, use any of the following methods:

Method one: Add the following code to the JavaScript file:

Expand All @@ -26,7 +26,4 @@ Take the following steps to set up your project:
<script src="./agora-extension-virtual-background.js"></script>
```

3. Dynamically load the Wasm dependency: The virtual background extension depends on a Wasm file. Find the Wasm file in `node_modules/agora-extension-virtual-background/wasms`. You need to publish the Wasm file to a CDN or static resource server. You need to pass in the URL of the Wasm file when calling `processor.init` in subsequent steps. The extension dynamically loads the Wasm file.

If the host URL of the Wasm file is not the same as that of the web application, enable the CORS policy. Do not put the Wasm file in an HTTP service, because loading HTTP resources in the HTTPS domain is blocked by browsers' security policy.
</PlatformWrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ async function getProcessorInstance() {
processor = extension.createProcessor();

try {
// Initialize the extension and pass in the URL of the Wasm file
await processor.init("./assets/wasms");
// Initialize the extension
await processor.init();
} catch(e) {
console.log("Fail to load WASM resource!");return null;
}
Expand Down Expand Up @@ -153,6 +153,10 @@ init(wasmDir: string): Promise<void>;

Initializes the extension.

Parameters:

- `wasmDir`: The URL where the virtual background WASM module is located (without the `WASM` filename). Starting from v1.2.0, this parameter is optional.

If the initialization of the extension fails due to the failure to access the Wasm file, this method throws an exception. Agora recommends that you disable the virtual background feature catching the exception.

If the Wasm file is deployed on third-party services such as CDN and OSS across domains, you need to enable cross-domain access. For example, when deploying Nginx servers across domains, to enable cross-domain access, add the following configurations:
Expand All @@ -162,10 +166,6 @@ add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' "true";
```

Parameters:

- `wasmDir`: The URL where the virtual background WASM module is located (without the `WASM` filename).

<a name="setoptions"></a>

##### setOptions
Expand Down
2 changes: 1 addition & 1 deletion shared/variables/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const RTEE_FU = 'FaceUnity';
export const RTEE_AF = 'ActiveFence';
export const RTEE_AF_D = `ActiveOS`;
export const RTEE_HT3D = `HTEffect 3D Avatar`
export const RTEE_DUB = `Dabi AI Dubbing Voice Changer`
export const RTEE_DUB = `Dubbing AI Voice Changer`
export const AA = `${COMPANY} Analytics`;
export const AA_DI = `Data Insights`;
export const AA_DIP = `Data Insights Plus`;
Expand Down

0 comments on commit 1a5fb69

Please sign in to comment.