Huawei audio editing service changes voice in real time, uncle voice and monster voice at will


Voice change is a function often used by users in live broadcast and chat applications. For example, many anchors choose to use sound transformers to drive the atmosphere of the live broadcast room; When chatting with friends, choose to become Lori tone to make the chat more interesting. HMS core audio editing service provides sound change capability to help developers build sound change function in applications. Users can change the sound through the preset sound changing style to improve the audio playability and effectively protect users’ privacy, so that you can change as you want.

At present, HMS core audio editing service can provide 7 sound changing effects, including uncle, Lori, boy, girl, monster, cartoon and robot. Unlimited languages, real-time processing, simple and convenient application in audio and video communication or mutual entertainment live broadcast scenes, providing real-time sound changing effects for the anchor, making the live broadcast sound more pleasant and interesting.

Sound changing effect

Now let’s practice how to access Huawei audio editing service to achieve sound change effect.

1. Development preparation

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

2 Edit engineering integration

2.1 setting the authentication information of the application

Developers need to use APIs_ Key or access token to set application authentication information.

Set the access token through setaccesstoken method and initialize the setting when the application starts

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

Set API through setapikey method_ Key, which can be initialized and set once when the application starts, without multiple settings.

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

2.2 document interface

Call the file interface to realize specific functions. Necessary conditions: create a file interface callback.

private ChangeSoundCallback callBack = new ChangeSoundCallback() {
    public void onSuccess(String outAudioPath) {
        //Successful processing
    public void onProgress(int progress) {
        //Progress callback processing
    public void onFail(int errorCode) {
        //Processing failed
    public void onCancel() {
        //Cancel processing

2.3 realize sound change function

Call the applyaudiofile interface to change the sound.

//Sound change
HAEChangeVoiceFile haeChangeVoiceFile = new HAEChangeVoiceFile();
ChangeVoiceOption changeVoiceOption = new ChangeVoiceOption();
//Call interface
haeChangeVoiceFile.applyAudioFile(inAudioPath, outAudioDir, outAudioName, callBack);
//Cancel voice change task

In addition to voice change, Huawei audio editing service also provides developers with one-stop audio editing services, covering dozens of professional capabilities required for audio / music processing. Developers only need to obtain strong audio processing capabilities through simple integration, which can greatly help customers improve the processing efficiency of audio / music.

Learn more > >

visitOfficial website of Huawei developer Alliance
obtainDevelopment guidance document
Huawei mobile service open source warehouse address:GitHubGitee

Follow us and learn the latest technical information of HMS core at the first time~