This topic describes how to configure extras parameters, scenarios, and how to implement them.

Description

The following table lists the features configured for extras characters.

Parameter Description Valid Values: Applicable platform
user_specified_aec Audio 3A: Echo Cancellation. TRUE: enabled, FALSE: disabled Android, iOS, Mac, Windows
user_specified_ans Audio 3A: Automatic noise reduction. TRUE: enabled, FALSE: disabled Android, iOS, Mac, Windows
user_specified_agc Audio 3A: automatic gain. TRUE: enabled, FALSE: disabled Android, iOS, Mac, Windows
user_specified_engine_mode Sound quality mode. Sound quality mode value Android, iOS, Mac, Windows
user_specified_scene_mode The scene mode. Scenario mode value Android, iOS, Mac, Windows
user_specified_video_preprocess Use three-way beautification to process videos. TRUE: enabled, FALSE: disabled Android, iOS
user_specified_groupid 1 to 1 mode. 1v1 Android, iOS, Mac, Windows

Audio 3A

Scenarios
  • If the hardware effect of mobile terminals (Android and iOS) does not meet the requirements, you can set all three switches to TRUE, indicating that the software audio processing algorithm provided by Alibaba Cloud RTC is enabled. It can achieve the same effect as music mode or media mode.
  • When the PC or mobile terminal has an external sound card device and the sound card device has its own audio signal processing function, it is recommended to manually set the relevant function to FALSE for fidelity sound quality.
  • If you do not set any 3A parameters, it means that the function of the 3A switch is not activated, and the system will run in accordance with the currently selected mode (default mode, music mode, etc.).
Implementation mode
JsonObject jsonObject = new JsonObject();

jsonObject.put("user_specified_aec","TRUE");
jsonObject.put("user_specified_ans","TRUE");
jsonObject.put("user_specified_agc","TRUE");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

Sound quality mode and scene mode

Description
  • In some more professional scenes, users have a high demand for sound effects. Alibaba Cloud RTC provides a variety of combination solutions.
  • Developers can customize different audio attributes according to different requirements for sound quality and scenes to obtain the best real-time interaction effect.
Mode description
  • Sound quality mode
    List of sound quality mode values Mode name Audio Channels Sampling Rate Encoding bit rate
    ENGINE_LOW_QUALITY_MODE Low sound quality mode 1 8 kHz 12 Kbps
    ENGINE_BASIC_QUALITY_MODE Standard sound quality mode 1 16 kHz 24 Kbps
    ENGINE_HIGH_QUALITY_MODE High sound quality mode 1 48 kHz 48 Kbps
  • Scene Mode
    List the scene mode values Scenario Feature
    SCENE_DEFAULT_MODE Default Scenario We recommend that you use it in general Real-Time Communication scenarios.
    SCENE_EDUCATION_MODE Educational Scenarios Priority is given to ensuring audio continuity and stability.
    SCENE_MEDIA_MODE Media Scenarios Fidelity vocals and music sound quality, recommended in Lianmai Live Room.
    SCENE_MUSIC_MODE Music scene High-fidelity music sound quality, musical instrument teaching and other scenes that require music sound quality are recommended.
Scenario collocation example
Scenario Sound quality mode Scene Mode Feature
General Voice Chat Room ENGINE_BASIC_QUALITY_MODE SCENE_DEFAULT_MODE Sound quality is good, priority is given to ensuring call quality and smooth transmission. It is suitable for scenes where there is no ultimate pursuit of sound quality.
Phonetic Teaching Small Class ENGINE_HIGH_QUALITY_MODE SCENE_DEFAULT_MODE High-definition sound quality, priority to ensure call quality, smooth transmission. It is suitable for scenarios that have the ultimate pursuit of voice quality.
Small class of musical instrument teaching ENGINE_HIGH_QUALITY_MODE SCENE_MUSIC_MODE Sound quality HD, priority music quality, smooth transmission. It is suitable for scenes that have the ultimate pursuit of music sound quality.
Live Streaming (chit-chat) ENGINE_HIGH_QUALITY_MODE SCENE_MEDIA_MODE Smooth transmission and high-definition sound quality ensure voice quality while taking into account music sound quality. It is suitable for chat scenarios with both voice and music.
Live broadcast of Lian Mai (singing) ENGINE_HIGH_QUALITY_MODE SCENE_MUSIC_MODE Smooth transmission, high-definition sound quality, priority music quality, and various sound effects provided. It is suitable for scenes where singing instruments are mainly played.
Small wearable devices (such as telephone watches) ENGINE_LOW_QUALITY_MODE SCENE_DEFAULT_MODE Smooth transmission, good sound quality, priority to ensure that the voice can be understood, low power consumption.
Implementation mode
JsonObject jsonObject = new JsonObject();
// Enable the high-quality mode in the music scene.
jsonObject.put("user_specified_engine_mode","ENGINE_HIGH_QUALITY_MODE");
jsonObject.put("user_specified_scene_mode","SCENE_MUSIC_MODE");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

Use three-way beautification to process videos

Description
  • Before connecting, we need to add the switch: user_specified_video_preprocess:TRUE to the extra field of the SDK instance.
  • Usually, after the integration of customers, they can see the beauty, but they can't see it because there is no setting.
Implementation mode
JsonObject jsonObject = new JsonObject();
jsonObject.put("user_specified_video_preprocess","TRUE");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

1 to 1 mode

1-to -1 mode automatic streaming, pushing only the camera stream, not the secondary camera stream.

Scenario

As the application of audio and video has become more and more extensive in recent years, various scenarios such as online education and real-time communication have been derived. 1-to -1 guidance is widely used in educational scenarios. Here are some typical 1-to -1 scenes. For example: 1-to -1 online extracurricular tutoring, 1-to -1 online language teaching, 1-to -1 online music sparring, and 1-to -1 online interview.

Implementation mode
JsonObject jsonObject = new JsonObject();
jsonObject.put("user_specified_groupid","1v1");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());