tencent cloud

Feedback

Audio Effect Settings

Last updated: 2025-01-09 17:41:21
    This document mainly introduces how to use the RTC Room Engine SDK to implement audio effect settings.

    Prerequisites

    Before using the beauty settings features provided by the RTC Room Engine SDK, you need to complete the SDK login.

    User Guide

    Setting the Background Music Volume

    You can set the background music volume by calling the setAllMusicVolume API and passing an Int value.
    The passed Int value represents the volume level, ranging from 0 to 100. Here is an example of calling setAllMusicVolume to set the background music volume:
    iOS
    Android
    import RTCRoomEngine
    import TXLiteAVSDK_Professional
    
    let audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager()
    
    let volume = 60
    audioEffectManager.setAllMusicVolume(volume)
    TXAudioEffectManager audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager();
    
    int volume = 60;
    audioEffectManager.setAllMusicVolume(volume);

    Set speech volume

    You can set the background music volume by calling the setVoiceVolume API and passing an Int value.
    The passed Int value represents the volume level, ranging from 0 to 100. Here is an example of calling setVoiceVolume to set the voice volume to 60:
    iOS
    Android
    import RTCRoomEngine
    import TXLiteAVSDK_Professional
    
    let audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager()
    
    let volume = 60
    audioEffectManager.setVoiceVolume(volume)
    TXAudioEffectManager audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager();
    
    int volume = 60;
    audioEffectManager.setVoiceCaptureVolume(volume);

    Enabling/Disabling IEMs

    You can set whether to enable IEMs by calling the enableVoiceEarMonitor API and passing a Bool value.
    The passed Bool value represents whether to enable IEMs, with true for enabling and false for disabling. Here is an example of calling the enableVoiceEarMonitor API to enable IEMs:
    iOS
    Android
    import RTCRoomEngine
    import TXLiteAVSDK_Professional
    
    let audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager()
    
    let enable = true
    audioEffectManager.enableVoiceEarMonitor(enable)
    TXAudioEffectManager audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager();
    
    boolean enable = true;
    audioEffectManager.enableVoiceEarMonitor(enable);

    Set ear monitoring volume

    You can set the ear monitoring volume by calling the setVoiceEarMonitorVolume API and passing an Int value.
    The passed Int value represents the volume level, ranging from 0 to 100. Here is an example of calling the setVoiceEarMonitorVolume API to set the ear monitoring volume to 60:
    iOS
    Android
    import RTCRoomEngine
    import TXLiteAVSDK_Professional
    
    let audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager()
    
    let volume = 60
    audioEffectManager.setVoiceEarMonitorVolume(volume)
    TXAudioEffectManager audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager();
    
    int volume = 60;
    audioEffectManager.setVoiceEarMonitorVolume(volume);

    Setting Voice Changing Effect

    You can set the voice changing effect by calling the setVoiceChangerType API and passing a TXVoiceChangeType value.
    TXVoiceChangeType is an enumeration that includes the following types:
    Enumeration
    Value
    Description
    TXVoiceChangeType_0
    0
    Off
    TXVoiceChangeType_1
    1
    Naughty kid
    TXVoiceChangeType_2
    2
    Lolita
    TXVoiceChangeType_3
    3
    Uncle
    TXVoiceChangeType_4
    4
    Heavy metal
    TXVoiceChangeType_5
    5
    Cold
    TXVoiceChangeType_6
    6
    Foreign accent
    TXVoiceChangeType_7
    7
    Trapped beast
    TXVoiceChangeType_8
    8
    Otaku
    TXVoiceChangeType_9
    9
    Strong electric current
    TXVoiceChangeType_10
    10
    Heavy Machinery
    TXVoiceChangeType_11
    11
    Ethereal voice
    Below is an example of calling the setVoiceChangerType API to set the voice changing effect to Naughty Kid:
    iOS
    Android
    import RTCRoomEngine
    import TXLiteAVSDK_Professional
    
    let audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager()
    
    let type: TXVoiceChangeType = ._1
    audioEffectManager.setVoiceChangerType(type)
    TXAudioEffectManager audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager();
    
    TXAudioEffectManager.TXVoiceChangerType type = TXAudioEffectManager.TXVoiceChangerType.TXLiveVoiceChangerType_1;
    audioEffectManager.setVoiceChangerType(type);

    Set reverb effect

    You can set the reverb effect by calling the setVoiceReverbType API and passing a TXVoiceReverbType value.
    TXVoiceReverbType is an enumeration that includes the following types:
    Enumeration
    Value
    Description
    TXVoiceReverbType_0
    0
    Turn off effects
    TXVoiceReverbType_1
    1
    KTV
    TXVoiceReverbType_2
    2
    Small Room
    TXVoiceReverbType_3
    3
    Hall
    TXVoiceReverbType_4
    4
    Low-pitched
    TXVoiceReverbType_5
    5
    Loud
    TXVoiceReverbType_6
    6
    Metallic sound
    TXVoiceReverbType_7
    7
    Magnetic
    TXVoiceReverbType_8
    8
    Ethereal voice
    TXVoiceReverbType_9
    9
    Recording studio
    TXVoiceReverbType_10
    10
    Melodious
    TXVoiceReverbType_11
    11
    Recording studio 2
    Below is an example of calling the setVoiceReverbType API to set the reverb effect to KTV:
    iOS
    Android
    import RTCRoomEngine
    import TXLiteAVSDK_Professional
    
    let audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager()
    
    let type: TXVoiceReverbType = ._1
    audioEffectManager.setVoiceReverbType(type)
    TXAudioEffectManager audioEffectManager = TUIRoomEngine.sharedInstance().getTRTCCloud().getAudioEffectManager();
    
    TXAudioEffectManager.TXVoiceReverbType type = TXAudioEffectManager.TXVoiceReverbType.TXLiveVoiceReverbType_1;
    audioEffectManager.setVoiceReverbType(type);
    Note:
    If you need to use more audio effect settings, refer to TXAudioEffectManager.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support