Against noise, one-click clarity, HMS Core audio editing service gives you a "recording studio" experience

With the advent of the short video era, a mobile phone can play a variety of tricks, so more and more freelance creators join the industry, and non-professional practitioners who use mobile phones to shoot short videos and sing on the street can be seen everywhere in daily life. After leaving the recording studio, there is no professional and unified recording equipment. Whether at home, on the roadside, in shopping malls, etc., it is inevitable that the recorded video will contain noise. So in post-production, how to deal with noise quickly and accurately is very important. HMS Core audio editing service (Audio Editor Kit) provides noise reduction function, one-click noise removal, helping creators to easily produce high-quality content.

The noise reduction function of the HMS Core audio editing service supports dual-mic and single-mic noise reduction. It can process some common quasi-steady-state noise or sudden noise in the input audio in real time, and repair and enhance the human voice. Voice signal quality. Developers can obtain high-quality audio noise reduction capabilities through a simple integration method, which can be widely used in audio and video editing, karaoke, live broadcast, instant messaging, online meetings and other scenarios.

Let's take a practical look at how to access Huawei's audio editing service to achieve noise reduction.

1 Development preparation

For detailed preparation steps, please refer to the official website of Huawei Developer Alliance

2Edit engineering integration

2.1 Set the authentication information of the application

Developers need to set application authentication information through api_key or Access Token.

Set the Access Token through the setAccessToken method, and initialize the settings when the application starts

HAEApplication.getInstance().setAccessToken("your access token");

The api_key is set by the setApiKey method, which can be initialized and set once when the application starts, and there is no need to set it multiple times.

HAEApplication.getInstance().setApiKey("your ApiKey");

2.2 File interface

To call the file interface to implement specific functions, the necessary conditions are: create a file interface callback.

private ChangeSoundCallback callBack = new ChangeSoundCallback() {
    @Override
    public void onSuccess(String outAudioPath) {
        // 处理成功
    }
    @Override
    public void onProgress(int progress) {
        // 进度回调处理
    }
    @Override
    public void onFail(int errorCode) {
        // 处理失败
    }
    @Override
    public void onCancel() {
        // 取消处理
    }
};

2.3 Implement noise reduction function

Call the applyAudioFile interface for noise reduction.

// 降噪
HAENoiseReductionFile haeNoiseReductionFile = new HAENoiseReductionFile();
// 调用接口
haeNoiseReductionFile.applyAudioFile(inAudioPath, outAudioDir, outAudioName, callBack);
// 取消降噪任务
haeNoiseReductionFile.cancel();

In addition to supporting noise reduction, HMS Core audio editing service also provides one-stop audio capabilities such as basic audio editing, format conversion, AI dubbing, audio source separation, spatial rendering, voice changing, and audio extraction. Complete the integration of audio functions.

Learn more details>>

Visit the official website of HUAWEI Developer Alliance
to obtain development guidance documents
HUAWEI Mobile Services Open Source Warehouse Address: GitHub , Gitee

Follow us to know the latest technical information of HMS Core for the first time~

{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/HMSCore/blog/5531970