npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rtc-voice-changer

v1.0.4

Published

voice changer plugin for TRTC Web SDK

Downloads

23

Readme

The RTCVoiceChanger plugin can be used in conjunction with the TRTC Web SDK to change the voice on TRTC calls.

NPM version NPM downloads Documents

English | 简体中文

Introduction

rtc-voice-changer is used to change the voice of TRTC's audio and video calls.

Prerequisites

TRTC monthly subscription Premium and higher is required to use this plugin.

Supported browsers: Chrome 66+, Edge 79+, Safari 14.1+, Firefox 76+.

For better use of rtc-voice-changer, it is recommended that you use the latest version of Chrome.

Installation

npm install rtc-voice-changer

Feature Description

Step 1. Initialize RTCVoiceChanger

import RTCVoiceChanger from 'rtc-voice-changer';
const voiceChanger = new RTCVoiceChanger();

Step 2. Create a processor instance to process audio and video streams

A processor can only process one stream.

let localStream = TRTC.createStream({ audio: true, video: true });
await localStream.initialize();
const processor = voiceChanger.createProcessor({ userId, sdkAppId, userSig });

// 1-Brat 2-Loli 3-Uncle 4-Heavy Metal 5-Cold 6-Foreign Accent 7-Beast 8-Fat Otaku 9-Strong Current 10-Heavy Machinery 11-Ethereal
await processor.process(localStream, 1);

// Switch effects midway
processor.setEffect(3);

Step 3. End the call and destroy resources

await client.leave();
voiceChangerProcessor.destroy();

API

RTCVoiceChanger

Create a plugin instance

const rtcVoiceChanger = new RTCVoiceChanger();

createProcessor(params)

Create a Processor instance

const voiceChangerProcessor = await rtcVoiceChanger.createProcessor({
  sdkAppId,
  userId,
  userSig
});

Params:

| Name | Type | Description | | -------- | -------- | ------------------------------------------------------------ | | sdkAppId | number | sdkAppId Get the sdkAppId information in Application Information after creating a new application by clicking Application Management > Create Application in the Real-Time Audio and Video Console. | | userId | string | User IDIt is recommended to limit the length to 32 bytes, and only allow uppercase and lowercase English letters (a-zA-Z), numbers (0-9), underscores, and hyphens. | | userSig | string | UserSig signatureRefer to UserSig Related for how to calculate userSig. |

Processor

process(localStream, voiceType)

Add noise reduction effect to the audio of the local stream.

Params:

| Name | Type | Description | |-------------|---------------|----------------------------------------------------------------| | localStream | LocalStream | Local stream. | | voiceType | number | 1-Brat 2-Loli 3-Uncle 4-Heavy Metal 5-Cold 6-Foreign Accent 7-Beast 8-Fat Otaku 9-Strong Current 10-Heavy Machinery 11-Ethereal. |

await voiceChangerProcessor.process(localStream, 1);

setEffect(type)

Switch effects.

| Name | Type | Description | |-------------|---------------|----------------------------------------------------------------| | voiceType | number | 1-Brat 2-Loli 3-Uncle 4-Heavy Metal 5-Cold 6-Foreign Accent 7-Beast 8-Fat Otaku 9-Strong Current 10-Heavy Machinery 11-Ethereal. |

await voiceChangerProcessor.setEffect(2);

close()

Turn off the voice changing effect.

voiceChangerProcessor.close();

destroy()

Destroy the processor and release resources, ending the processor's lifecycle.

voiceChangerProcessor.destroy();

Changelog

Version 1.0.1 @2023.7.7

Improvement

Optimising performance issues.

Version 1.0.0 @2023.06.20

Official Release 1.0.0