11/24/2021 | News release | Distributed by Public on 11/24/2021 11:55
Boemo is a software developer who embraces innovative approaches. He likes diving deep into complex concepts in order to learn and write articles that can help the reader understand complex methodologies in a simple and fun way.
Not everyone likes the sound of their voice. Many people feel nervous or don't join video calls because they feel that their voices are horrible. Fortunately, Agora has a solution for those users. Agora gives you the ability to alter your voice by converting it to a voice you like or by beautifying the voice. This is a fun feature that can make your video calls more enjoyable.
In this tutorial, we will learn how to alter (voice conversion) and beautify the voice using the Agora Android SDK.
Add the following dependencies in your build.gradle in the app module, and sync to download the Agora third-party library. Ensure that you always use the latest Agora library version:
Go ahead and add the following permissions in the Manifest.xml file:
Now, let's create an RtcEngine instance by initializing the RtcEngine, and pass the IRtcEngineEventHandler and your App ID to the create method. IRtcEngineEventHandler is an abstract class that provides the default implementation:
Next, we will set the channel profile as CHANNEL_PROFILE_LIVE_BROADCASTING and set the client role as CLIENT_ROLE_BROADCASTER. We do this because the user has to send and receive streams. You can set the channel profile as an audience if you want the user to receive streams only:
The setVoiceBeautifierPreset takes in the beautifying value. The function then alters and sets the voice of the user as beautiful based on the beautifying value chosen. By default, the beautifying value will be off, VOICE_BEAUTIFIER_OFF. The voice beautifier makes the user's voice beautiful without changing the original voice:
Converting the voice of the user completely alters the voice of the speaker. Listeners will not be able to recognize the broadcaster's voice. This is a great feature for users who want to remain anonymous or who don't have confidence in their voice.
The setVoiceConversionPreset function takes in the voice conversion value. We will use this function to convert the voice of the user:
In the demo below, we will test our source code by changing the voice of the user speaking to a bass voice.
In this tutorial we have learned how to:
Cheers, you now know how to change and beautify the user's voice!
Thank you for reading. You can learn more on how to alter the user's voice here and also check out more Agora features on GitHub here. If you want to copy or reference the SDK I was using, check it on GitHub here.
If you are getting confused in the process, you can check out Agora's documentation. You can also join Agora's Slack channel here.
Want to build Real-Time Engagement apps?
Get started with 10,000 free minutes today!
If you have questions, please call us at 408-879-5885. We'd be happy to help you add voice or video chat, streaming and messaging into your apps.