How to achieve audio change and interesting sound effect in 3 minutes?

Time:2021-6-10

In the pan Entertainment Social and interactive game scene, users are no longer satisfied with the high-definition sound quality experience and real-time interactive effect. They also want to increase the sense of interest and immersion, so that the sound becomes fun and interesting. Paileyun pano has launched an audio voice changing interface. Developers can set different voice changing effects through pano SDK, such as Uncle sound, Miss sister sound, Lori sound, valley sound, horror sound, trapped animal sound, etc., to enhance the fun of conversation. This article will introduce how to realize the audio sound changing function based on pano SDK in 3 minutes.

preparation:

  • Paileyun developer account (registered through paileyun official website)
  • Pano SDK v1.3.4 +

Windows and Android

Optiontype: audiovoicechangermode is configured in setoption method of rtcengine object. By setting the enumeration value of audiovoicechangeoption through setoption, the sound change effect of windows can be realized.

How to achieve audio change and interesting sound effect in 3 minutes?

Windows interface code:

/*!

  • @~english
  • @brief Set option and paramters
  • @paramoption option
  • @paramparam paramter defined with option
  • @paramsize the size of parameters
  • @return
    • OK: Success
    • others: Failure
  • @~chinese
  • @Brief setting parameters
  • @Paramotion parameter category
  • @The paramparamparam parameter is defined according to the parameter structure defined by different options
  • @The size of the paramsize parameter
  • @return
    • OK: success
    • Others: failure

*/

virtualQResultsetOption(OptionTypeoption, void * param, uint32_tsize) = 0;

Example code:

AudioVoiceChangerOptionvcOption = AudioVoiceChangerOption::Male;

rtcEngine_->setOption(OptionType::AudioVoiceChangerMode, & vcOption,sizeof (vcOption));

Andorid interface code:

/**

  • @~english
  • @brief Set option object to PANO SDK
  • @paramtype PanoOptionType enum type
  • @paramvalue The parameter of the option, the actual type of value is option-specific * @return
    • OK: Success
    • others: Failure
  • @~chinese
  • @Brief setting options
  • @Paramtype optional type panooptiontype
  • @Paramvalue parameters should be defined according to the parameters defined by different objects
  • @return
    • OK: success
    • Others: failure

*/

publicabstractQResultsetOption(PanoOptionTypetype, Objectvalue);

Example code:

Constants.AudioVoiceChangerOptionvcOption = Constants.AudioVoiceChangerOption.Male;mRtcEngine.setOption(Constants.PanoOptionType.AudioVoiceChangerMode, vcOption);

Mac OS and IOS

Seto of the panortcenginekit object ption:forType : method to configure panooptiontype: kpanooptionaudiovoicechangermode.

By setting the enumeration value of panoaudiovoicechangeoption through setoption, the sound change effect of MacOS and IOS can be realized.

How to achieve audio change and interesting sound effect in 3 minutes?

Mac OS, IOS interface code:

/**

  • @~english
  • @brief Set option object to PANO SDK.
  • @param option The Option object.
  • @param type PanoOptionType enum type.
  • @return
    • kPanoResultOK: Success
    • others: Failure
  • @~chinese
  • @Brief sets the option object to the pano SDK.
  • @Param option object.
  • @Param type panooptiontype enumeration type.
  • @return
    • Kpanoresultok: success
    • Others: failure

*/

  • (PanoResult)setOption:(NSObject * _Nullable)option

forType:(PanoOptionType)type;

Example code:

PanoAudioVoiceChangerOption vcOption = kPanoVoiceChangerMale;NSNumber * option = [NSNumber numberWithInteger:vcOption];[panoEngineKit setOption:option forType:kPanoOptionAudioVoiceChangerMode];

The above is a detailed introduction to the access of audio voice change. In addition to voice change, paileyun also supports the access of audioStereo, bel canto, ear echo, accompaniment, reverberationAnd so on, make the sound more pleasant, more magnetic and energetic, and make the whole process of conversation more interesting.

About paileyun

Established in 2019, paileyun is the first real-time interactive communication cloud service provider with video conference background in China, bringing together a large number of senior technical experts focusing on audio, video, network, AI and other fields. Through the pano SDK, enterprise developers can quickly realize interactive classroom, voice chat room, video social interaction, live broadcast Lianmai, game voice, video customer service, telemedicine, office cooperation and other scenes around the world.