製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について
AudioEffectStore and DeviceStore modules from the AtomicXCore framework. These modules enable features such as microphone volume control, ear monitoring, and a variety of voice changing and reverb effects.
AudioEffectStore and DeviceStore, you can implement the following core features:Core Concept | Type | Core Responsibility & Description |
AudioChangerType | enum | Enumerates available voice effects, such as "child", "man", etc. |
AudioReverbType | enum | Enumerates available reverb effects, such as "ktv", "hall", etc. |
AudioEffectState | data | Represents the current state of the audio effect module, typically used for UI rendering. Includes voice effect state, reverb state, ear monitoring enabled state, and ear monitor volume. |
AudioEffectStore | abstract | Singleton data management class for audio effects. Use it to invoke audio effect APIs. After calling an API, the corresponding state property is automatically updated. Subscribe to this reactive state to receive and monitor updates. |
DeviceState | data | Represents the current state of the device module, typically used for UI rendering. Core properties include camera and microphone status. |
DeviceStore | abstract | Singleton data management class for device operations. Use it to control the camera and microphone. After calling an API, the corresponding state property is automatically updated. Subscribe to this reactive state to receive and monitor updates. |
AudioEffectStore and DeviceStore are singleton objects. Access their instances anywhere in your project via the shared property. For a complete implementation example, see AudioEffectPanel.kt in the TUILiveKit open-source UI demo.import io.trtc.tuikit.atomicxcore.api.device.AudioEffectStoreimport io.trtc.tuikit.atomicxcore.api.device.DeviceStoreval audioEffectStore = AudioEffectStore.shared()val deviceStore = DeviceStore.shared()
Switch control to enable or disable ear monitoring.SeekBar (or similar control) to adjust the ear monitor volume. Map the UI control's value to the [0, 150] range and call setVoiceEarMonitorVolume(volume).import io.trtc.tuikit.atomicxcore.api.device.AudioEffectStoreimport kotlinx.coroutines.CoroutineScopeimport kotlinx.coroutines.Dispatchersimport kotlinx.coroutines.launch// 1. Enable ear monitoring (prompt the user to connect headphones)audioEffectStore.setVoiceEarMonitorEnable(true)// 2. Set ear monitor volumeaudioEffectStore.setVoiceEarMonitorVolume(80)// 3. Disable ear monitoringaudioEffectStore.setVoiceEarMonitorEnable(false)// 4. Listen for state updatesCoroutineScope(Dispatchers.Main).launch {audioEffectStore.audioEffectState.earMonitorVolume.collect {print("Ear monitor volume: $it")// Update UI with the value}}
Parameter Name | Type | Description |
enable | Boolean | Whether to enable ear monitoring. - true: Enable - false: Disable |
Parameter Name | Type | Description |
volume | Int | Ear monitor volume. - Range: [0, 150] - Default: 100 |
setCaptureVolume(volume) on DeviceStore with the desired value.SeekBar or similar control to adjust the microphone volume. Map the UI control's value to the [0, 150] range and call setCaptureVolume(volume).import kotlinx.coroutines.CoroutineScopeimport kotlinx.coroutines.Dispatchersimport kotlinx.coroutines.launchimport io.trtc.tuikit.atomicxcore.api.device.DeviceStore// 1. Adjust microphone volumedeviceStore.setCaptureVolume(80)// 2. Listen for volume changesCoroutineScope(Dispatchers.Main).launch {deviceStore.deviceState.captureVolume.collect {print("Capture volume: $it")// Update UI with the value}}
Parameter Name | Type | Description |
volume | Int | Microphone (capture) volume. - Range: [0, 150] - Default: 100 |
setAudioChangerType(type) with the desired AudioChangerType enum value.import io.trtc.tuikit.atomicxcore.api.device.AudioEffectStoreimport io.trtc.tuikit.atomicxcore.api.device.AudioChangerType// Set voice effect to "Little Girl"audioEffectStore.setAudioChangerType(AudioChangerType.LITTLE_GIRL)// Disable voice effectaudioEffectStore.setAudioChangerType(AudioChangerType.NONE)
Parameter Name | Type | Description |
type | AudioChangerType | Voice effect enum value. |
setAudioReverbType(type) with the desired AudioReverbType enum value.import io.trtc.tuikit.atomicxcore.api.device.AudioEffectStoreimport io.trtc.tuikit.atomicxcore.api.device.AudioReverbType// Set reverb to "KTV"audioEffectStore.setAudioReverbType(AudioReverbType.KTV)// Disable reverbaudioEffectStore.setAudioReverbType(AudioReverbType.NONE)
Parameter Name | Type | Description |
type | AudioReverbType | Reverb effect enum value. |
AudioEffectStore and DeviceStore are singletons, so audio effect and device settings are globally applied. To prevent settings from one live room affecting others, reset audio effect and device settings when the current live room ends.reset()() method on each store.import io.trtc.tuikit.atomicxcore.api.device.AudioEffectStoreimport io.trtc.tuikit.atomicxcore.api.device.DeviceStore// One-click reset for all voice and reverb effectsAudioEffectStore.shared().reset()DeviceStore.shared().reset()
Store/Component | Feature Description | API Documentation |
AudioEffectStore | Manage audio effects: configure and retrieve real-time audio effect status. | |
DeviceStore | Manage devices: control camera and microphone, and retrieve real-time device status. |
AudioEffectStore and DeviceStore settings are globally effective. You can call relevant APIs (such as setting voice effects, reverb, or ear monitoring) at any time before or after entering a live room. Settings take effect immediately and persist.DeviceStore.setCaptureVolume(). Controls the volume your audience hears.AudioEffectStore.setVoiceEarMonitorVolume(). It only determines the volume level you hear in your in-ear monitor and does not affect the audience.AudioEffectStore and DeviceStore are singletons, audio effect and device settings are globally applied. If you previously set audio effects and did not reset them, those settings persist. Call the reset() method at the appropriate time to clear them.AudioChangerType and AudioReverbType can be enabled simultaneously. For example, you can set both AudioChangerType.LITTLE_GIRLand AudioReverbType.KTV at the same time.フィードバック