### Start the Demo Project Source: https://github.com/volcengine/volcenginertc/blob/main/Web/QuickStart_Demo/BasicDemo/README.md Starts the WebRTC demo project. This command should be executed after installing dependencies and configuring the project files. ```bash yarn start ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md Navigate to the iOS example directory and install project dependencies using CocoaPods. It's recommended to update the repository first. ```bash cd iOS/ApiExample pod install --repo-update ``` -------------------------------- ### Clone and Checkout Example Project Source: https://github.com/volcengine/volcenginertc/blob/main/DouyinMicroApp/README.md Use these bash commands to clone the VolcEngineRTC repository and navigate to the DouyinMicroApp directory. ```bash git clone https://github.com/volcengine/VolcEngineRTC.git cd VolcEngineRTC git checkout main cd DouyinMicroApp ``` -------------------------------- ### Directory Structure of veRTC SDK Example Projects Source: https://github.com/volcengine/volcenginertc/blob/main/README.md This snippet outlines the directory structure for the veRTC SDK example projects, indicating the location of Java, Swift, C++, and mini-program examples. ```text . ├── Android │   ├── APIExample // Java 示例项目 │   └── README.md // 跑通 Android 示例项目 ├── iOS │   ├── ApiExample // Swift 示例项目 │   └── README.md // 跑通 iOS 示例项目 ├── Windows │   ├── API_Example.pro // C++ 示例项目,可在 macOS 和 Windows 下编译运行 │   ├── README.md // 跑通 Windows 示例项目 │   └── ... ├── mac │   └── README.md // 跑通 macOS 示例项目 ├── DouyinMicroApp │ ├── pages // 抖音小程序示例项目 │ ├── README.md // 跑通抖音小程序示例项目 │ └── ... └── README.md ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/volcengine/volcenginertc/blob/main/Web/QuickStart_Demo/BasicDemo/README.md Installs all the necessary dependencies for the demo project using Yarn. Run this command in the project's root directory. ```bash yarn ``` -------------------------------- ### Install Yarn Globally Source: https://github.com/volcengine/volcenginertc/blob/main/Web/QuickStart_Demo/BasicDemo/README.md Installs the Yarn package manager globally on your system. This is a prerequisite for managing project dependencies and running the demo. ```bash npm install -g yarn ``` -------------------------------- ### Clone VolcEngineRTC Project Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md Clone the VolcEngineRTC project from GitHub to access the iOS example project. Ensure you checkout the main branch. ```bash git clone https://github.com/volcengine/VolcEngineRTC.git cd VolcEngineRTC git checkout main ``` -------------------------------- ### Start Internal Audio Capture Source: https://github.com/volcengine/volcenginertc/blob/main/Web/Advanced_Demo/Examples/aians/README.md Initiate the internal audio capture process using the RTC engine. This is a prerequisite for the AI noise reduction to process audio. ```typescript // 开启内部音频采集 engine.startAudioCapture(); ``` -------------------------------- ### Configure AppID and AppKey Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md Open the ApiExample.xcworkspace in Xcode. Obtain your AppID and AppKey from the VolcEngine console and update the kAppID and kAppKey constants in ApiExample/Config.swift. Incorrect values will prevent compilation. ```swift let kAppID = "YOUR_APP_ID" let kAppKey = "YOUR_APP_KEY" ``` -------------------------------- ### Configure Signing & Capabilities Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md In Xcode, select the ApiExample project and go to the Signing & Capabilities tab. Enable 'Automatically manage signing' or manually configure your developer certificate. Ensure your Team is set to 'Personal Team' and update the Bundle Identifier to a unique value. ```swift Bundle Identifier: rtc.vertcdemo.apiexample.dev (or your custom identifier) ``` -------------------------------- ### Demo Configuration Object Source: https://github.com/volcengine/volcenginertc/blob/main/Web/QuickStart_Demo/BasicDemo/README.md This JavaScript object holds the configuration for the demo, including AppId, RoomId, and a list of user tokens. Ensure these values match those used for token generation. ```javascript const config = { appId: 'yourAppId', roomId: 'yourRoomId', tokens: [ { userId: 'yourUserId1', token: 'yourToken1', }, { userId: 'yourUserId2', token: 'yourToken2', } ], }; ``` -------------------------------- ### Set VolcBeauty License Name Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md Obtain the license file for intelligent beautification effects. Place the certificate file in the ApiExample/ImportantComponents/Beauty/VolcBeauty/resource folder. Update the CVLicenseName constant in ApiExample/Config.swift with the exact filename of your certificate. ```swift let CVLicenseName = "rtc_test_vertc.veRTCDemo.ios_4.4.2_633.licbag" ``` -------------------------------- ### Import AI Noise Reduction Plugin Source: https://github.com/volcengine/volcenginertc/blob/main/Web/Advanced_Demo/Examples/aians/README.md Import the RTCAIAnsExtension class from the Volcengine RTC SDK. This is the first step to using the AI noise reduction functionality. ```typescript import RTCAIAnsExtension from '@volcengine/rtc/extension-ainr'; ``` -------------------------------- ### Embed Effect SDK Framework Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md Download the RTC SDK iOS offline package. Extract the 'effect-sdk.framework' file and place it in the ApiExample/ImportantComponents/Beauty/VolcBeauty folder. Ensure it is set to 'Embed & Sign' under Frameworks, Libraries, and Embedded Content in Xcode's General settings. ```swift // Ensure effect-sdk.framework is set to Embed & Sign ``` -------------------------------- ### Replace FaceUnity Beauty Authpack Source: https://github.com/volcengine/volcenginertc/blob/main/iOS/README.md For FaceUnity beauty effects, contact their business team for a certificate. Replace the existing 'authpack.h' file in the ApiExample/ImportantComponents/Beauty/FaceUnityBeauty directory with the certificate you received. ```c // Replace ApiExample/ImportantComponents/Beauty/FaceUnityBeauty/authpack.h with your certificate ``` -------------------------------- ### Register AI Noise Reduction Plugin Source: https://github.com/volcengine/volcenginertc/blob/main/Web/Advanced_Demo/Examples/aians/README.md Instantiate the AIAnsExtension and register it with the RTC engine. Ensure the engine instance is created with your App ID. Error handling is included for registration failures. ```typescript import VERTC from '@volcengine/rtc'; // 创建引擎实例 const engine = VERTC.createEngine('appid'); // 创建 AI 降噪插件实例 const AIAnsExtension = new RTCAIAnsExtension(); // 注册 AI 降噪插件 try { await engine.registerExtension(AIAnsExtension); } catch (error) { // 注册失败,详细信息:error.message } ``` -------------------------------- ### IRTCAIAnsExtension API Reference Source: https://github.com/volcengine/volcenginertc/blob/main/Web/Advanced_Demo/Examples/aians/README.md Reference for the IRTCAIAnsExtension class, which provides methods to control AI noise suppression. ```APIDOC ## IRTCAIAnsExtension Type: `class` ### enable Type: `() => void` Description: Enables AI noise suppression. This applies to internally captured audio. ### disable Type: `() => void` Description: Disables AI noise suppression. ``` -------------------------------- ### Enable and Disable AI Noise Reduction Source: https://github.com/volcengine/volcenginertc/blob/main/Web/Advanced_Demo/Examples/aians/README.md Control the AI noise reduction feature by calling enable() to turn it on and disable() to turn it off. These methods operate on the AIAnsExtension instance. ```typescript // 开启/关闭降噪 AIAnsExtension.enable(); AIAnsExtension.disable(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.