agora-rte-sdk 3.7.8-rc.4-alpha → 3.7.9-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -237,7 +237,11 @@ var AgoraRtcCaptureEnhancementImpl = exports.AgoraRtcCaptureEnhancementImpl = /*
237
237
  key: "disableAiDenoiser",
238
238
  value: function disableAiDenoiser(_) {
239
239
  this.logger.debug('Disabling RTC AI denoiser');
240
- return this._rtcEngine.setAINSMode(false, 0);
240
+ var config = _constants.DISABLE_AI_DENOISE_CONFIG;
241
+ this._rtcEngine.setParameters(JSON.stringify(config));
242
+ return 0;
243
+
244
+ // return this._rtcEngine.setAINSMode(false, 0 as AudioAinsMode.AinsModeBalanced);
241
245
  }
242
246
  }, {
243
247
  key: "setAiDenoiseLevel",
@@ -27,6 +27,13 @@ export declare const AUDIO_CHANNELS = 8;
27
27
  export declare const DEVICE_SCORE_THRESHOLD = 65;
28
28
  export declare const HIFI_BITRATE = 128000;
29
29
  export declare const STANDARD_BITRATE = 64000;
30
+ export declare const DISABLE_AI_DENOISE_CONFIG: {
31
+ 'che.audio.ans.enable': boolean;
32
+ 'che.audio.sf.enabled': boolean;
33
+ 'che.audio.bgns_config': {
34
+ bgNSpreset: number;
35
+ };
36
+ };
30
37
  export declare const AI_DENOISE_CONFIGS: Record<AgoraRtcAiDenoiseLevel, Record<string, any> | undefined>;
31
38
  export declare const IMAGE_PATTERNS: readonly [".png", ".jpg"];
32
39
  export declare const VIDEO_PATTERNS: readonly [".mp4", ".avi", ".mkv", ".flv"];
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.VIDEO_PATTERNS = exports.VALID_BACKGROUND_TYPES = exports.STATS_INTERVAL = exports.STANDARD_BITRATE = exports.RTC_PARAMS = exports.RENDER_CONSTANTS = exports.REDUCE_LOOPBACK_VOLUME_MICROPHONE = exports.REDUCE_LOOPBACK_VOLUME = exports.MEDIA_DEVICE_TYPE = exports.MEDIA_DEVICE_STATE = exports.IMAGE_PATTERNS = exports.HIFI_BITRATE = exports.DISCONNECTED_TIMEOUT = exports.DEVICE_SCORE_THRESHOLD = exports.DEFAULT_VOLUME = exports.DEFAULT_SPEAKER_DEVICE_ID = exports.DEFAULT_RENDERING_FPS = exports.DEFAULT_MICROPHONE_DEVICE_ID = exports.DEFAULT_LOG_LEVEL = exports.DEFAULT_LOG_FILE_SIZE = exports.AUDIO_PROFILES = exports.AUDIO_CHANNELS = exports.AI_DENOISE_CONFIGS = exports.AGORA_ALD_LOOPBACK_DEVICE = void 0;
8
+ exports.VIDEO_PATTERNS = exports.VALID_BACKGROUND_TYPES = exports.STATS_INTERVAL = exports.STANDARD_BITRATE = exports.RTC_PARAMS = exports.RENDER_CONSTANTS = exports.REDUCE_LOOPBACK_VOLUME_MICROPHONE = exports.REDUCE_LOOPBACK_VOLUME = exports.MEDIA_DEVICE_TYPE = exports.MEDIA_DEVICE_STATE = exports.IMAGE_PATTERNS = exports.HIFI_BITRATE = exports.DISCONNECTED_TIMEOUT = exports.DISABLE_AI_DENOISE_CONFIG = exports.DEVICE_SCORE_THRESHOLD = exports.DEFAULT_VOLUME = exports.DEFAULT_SPEAKER_DEVICE_ID = exports.DEFAULT_RENDERING_FPS = exports.DEFAULT_MICROPHONE_DEVICE_ID = exports.DEFAULT_LOG_LEVEL = exports.DEFAULT_LOG_FILE_SIZE = exports.AUDIO_PROFILES = exports.AUDIO_CHANNELS = exports.AI_DENOISE_CONFIGS = exports.AGORA_ALD_LOOPBACK_DEVICE = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _type = require("../../../core/rtc/type");
11
11
  var DEFAULT_LOG_FILE_SIZE = exports.DEFAULT_LOG_FILE_SIZE = 512;
@@ -43,32 +43,96 @@ var AUDIO_CHANNELS = exports.AUDIO_CHANNELS = 8;
43
43
  var DEVICE_SCORE_THRESHOLD = exports.DEVICE_SCORE_THRESHOLD = 65;
44
44
  var HIFI_BITRATE = exports.HIFI_BITRATE = 128000;
45
45
  var STANDARD_BITRATE = exports.STANDARD_BITRATE = 64000;
46
+ var DISABLE_AI_DENOISE_CONFIG = exports.DISABLE_AI_DENOISE_CONFIG = {
47
+ 'che.audio.ans.enable': false,
48
+ 'che.audio.sf.enabled': false,
49
+ 'che.audio.bgns_config': {
50
+ bgNSpreset: 0
51
+ }
52
+ };
46
53
 
47
54
  // AI降噪配置映射
48
55
  var AI_DENOISE_CONFIGS = exports.AI_DENOISE_CONFIGS = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _type.AgoraRtcAiDenoiseLevel.AUTO, undefined), _type.AgoraRtcAiDenoiseLevel.LOW, {
49
- 'che.audio.enable.nsng': true,
50
- 'che.audio.ains_mode': 0,
51
- 'che.audio.ns.mode': 0,
52
- 'che.audio.nsng.lowerBound': 80,
53
- 'che.audio.nsng.lowerMask': 50,
54
- 'che.audio.nsng.statisticalbound': 5,
55
- 'che.audio.nsng.finallowermask': 30
56
+ // 'che.audio.enable.nsng': true,
57
+ // 'che.audio.ains_mode': 0,
58
+ // 'che.audio.ns.mode': 0,
59
+ // 'che.audio.nsng.lowerBound': 80,
60
+ // 'che.audio.nsng.lowerMask': 50,
61
+ // 'che.audio.nsng.statisticalbound': 5,
62
+ // 'che.audio.nsng.finallowermask': 30,
63
+
64
+ 'che.audio.aec.split_srate_for_48k': 16000,
65
+ 'che.audio.sf.enabled': true,
66
+ 'che.audio.sf.delayMode': 1,
67
+ 'che.audio.sf.ainsModelPref': 10,
68
+ 'che.audio.sf.nsngAlgRoute': 10,
69
+ 'che.audio.sf.statNsEnhFactor': 200,
70
+ 'che.audio.sf.ainsKillHEBandFlag': 0,
71
+ 'che.audio.sf.statNsLowerBound': 30,
72
+ 'che.audio.sf.nsngMapInMaskMin': 150,
73
+ 'che.audio.sf.nsngMapOutMaskMin': 0,
74
+ 'che.audio.sf.nsngFinalMaskLowerBound': 0,
75
+ 'che.audio.bgns_config': {
76
+ bgNSpreset: 0
77
+ }
56
78
  }), _type.AgoraRtcAiDenoiseLevel.MEDIUM, {
57
- 'che.audio.enable.nsng': true,
58
- 'che.audio.ains_mode': 2,
59
- 'che.audio.ns.mode': 2,
60
- 'che.audio.nsng.lowerBound': 80,
61
- 'che.audio.nsng.lowerMask': 50,
62
- 'che.audio.nsng.statisticalbound': 5,
63
- 'che.audio.nsng.finallowermask': 30
79
+ // 'che.audio.enable.nsng': true,
80
+ // 'che.audio.ains_mode': 2,
81
+ // 'che.audio.ns.mode': 2,
82
+ // 'che.audio.nsng.lowerBound': 80,
83
+ // 'che.audio.nsng.lowerMask': 50,
84
+ // 'che.audio.nsng.statisticalbound': 5,
85
+ // 'che.audio.nsng.finallowermask': 30,
86
+
87
+ 'che.audio.aec.split_srate_for_48k': 16000,
88
+ 'che.audio.sf.enabled': true,
89
+ 'che.audio.sf.delayMode': 1,
90
+ 'che.audio.sf.ainsModelPref': 10,
91
+ 'che.audio.sf.nsngAlgRoute': 12,
92
+ 'che.audio.sf.statNsOverDrive': 90,
93
+ 'che.audio.sf.statNsEnhFactor': 400,
94
+ 'che.audio.sf.ainsKillHEBandFlag': 0,
95
+ 'che.audio.sf.statNsLowerBound': 100,
96
+ 'che.audio.sf.nsngMapInMaskMin': 150,
97
+ 'che.audio.sf.nsngMapOutMaskMin': 0,
98
+ 'che.audio.sf.nsngFinalMaskLowerBound': 0,
99
+ 'che.audio.bgns_config': {
100
+ bgNSpreset: 1,
101
+ bgNSmode: 0,
102
+ bgNSThreshold: 25,
103
+ bgNSAttackTime: 400,
104
+ bgNSAttackHoldTime: 150,
105
+ bgNSReleaseTime: 80,
106
+ bgNSReleaseHoldTime: 10,
107
+ bgNSThreshold_releaselevel: 18,
108
+ bgNSThreshold_releasetime: 5000,
109
+ bgNSMiniThreshold: 0,
110
+ bgNSThreshold_startuptime: 30
111
+ }
64
112
  }), _type.AgoraRtcAiDenoiseLevel.HIGH, {
65
- 'che.audio.enable.nsng': true,
66
- 'che.audio.ains_mode': 2,
67
- 'che.audio.ns.mode': 2,
68
- 'che.audio.nsng.lowerBound': 10,
69
- 'che.audio.nsng.lowerMask': 10,
70
- 'che.audio.nsng.statisticalbound': 0,
71
- 'che.audio.nsng.finallowermask': 8
113
+ // 'che.audio.enable.nsng': true,
114
+ // 'che.audio.ains_mode': 2,
115
+ // 'che.audio.ns.mode': 2,
116
+ // 'che.audio.nsng.lowerBound': 10,
117
+ // 'che.audio.nsng.lowerMask': 10,
118
+ // 'che.audio.nsng.statisticalbound': 0,
119
+ // 'che.audio.nsng.finallowermask': 8,
120
+ 'che.audio.aec.split_srate_for_48k': 16000,
121
+ 'che.audio.sf.enabled': true,
122
+ 'che.audio.sf.delayMode': 1,
123
+ 'che.audio.sf.ainsModelPref': 10,
124
+ 'che.audio.sf.nsngAlgRoute': 12,
125
+ 'che.audio.sf.statNsOverDrive': 110,
126
+ 'che.audio.sf.statNsEnhFactor': 200,
127
+ 'che.audio.sf.ainsKillHEBandFlag': 0,
128
+ 'che.audio.sf.statNsLowerBound': 30,
129
+ 'che.audio.sf.nsngMapInMaskMin': 150,
130
+ 'che.audio.sf.nsngMapOutMaskMin': 0,
131
+ 'che.audio.sf.nsngFinalMaskLowerBound': 0,
132
+ 'che.audio.bgns_config': {
133
+ bgNSpreset: 3,
134
+ bgNSmode: 3
135
+ }
72
136
  });
73
137
 
74
138
  // 文件模式常量
@@ -302,14 +302,11 @@ var AgoraRtmClientImpl = exports.AgoraRtmClientImpl = /*#__PURE__*/function (_Ag
302
302
  return _regenerator["default"].wrap(function (_context5) {
303
303
  while (1) switch (_context5.prev = _context5.next) {
304
304
  case 0:
305
- if (this._isLogin) {
306
- _context5.next = 1;
305
+ this._token = token;
306
+ if (!this._isLogin) {
307
+ _context5.next = 4;
307
308
  break;
308
309
  }
309
- this._token = token;
310
- _context5.next = 4;
311
- break;
312
- case 1:
313
310
  _context5.prev = 1;
314
311
  _context5.next = 2;
315
312
  return this._client.renewToken(this._token);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-rte-sdk",
3
- "version": "3.7.8-rc.4-alpha",
3
+ "version": "3.7.9-alpha",
4
4
  "description": "SDK for building interactive scenarios",
5
5
  "author": "agora.io",
6
6
  "license": "ISC",
@@ -28,7 +28,7 @@
28
28
  "@types/sinon": "^17.0.2",
29
29
  "@types/ua-parser-js": "^0.7.35",
30
30
  "agora-token": "^2.0.3",
31
- "agora-toolchain": "3.7.8-rc.4-alpha",
31
+ "agora-toolchain": "3.7.9-alpha",
32
32
  "core-js": "^3.33.3",
33
33
  "electron": "22.3.27",
34
34
  "husky": "^9.0.11",
@@ -39,11 +39,11 @@
39
39
  "typescript": "^5.3.2"
40
40
  },
41
41
  "dependencies": {
42
- "agora-electron-sdk": "4.3.2-build.156-rc.1",
42
+ "agora-electron-sdk": "4.3.2-build.201-rc.1",
43
43
  "agora-extension-ai-denoiser": "^1.0.0",
44
44
  "agora-extension-beauty-effect": "^1.0.1-beta",
45
45
  "agora-extension-virtual-background": "^2.1.0",
46
- "agora-foundation": "3.7.8-rc.4-alpha",
46
+ "agora-foundation": "3.7.9-alpha",
47
47
  "agora-rtc-sdk-ng": "4.23.3",
48
48
  "agora-rtm": "2.2.2-3",
49
49
  "await-to-js": "^3.0.0",