agora-python-server-sdk 2.2.4__tar.gz → 2.3.1__tar.gz
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.
Potentially problematic release.
This version of agora-python-server-sdk might be problematic. Click here for more details.
- {agora_python_server_sdk-2.2.4/agora_python_server_sdk.egg-info → agora_python_server_sdk-2.3.1}/PKG-INFO +170 -6
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/README.md +169 -5
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/__init__.py +11 -6
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_ctypes_handle/_ctypes_data.py +129 -9
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_ctypes_handle/_local_user_observer.py +2 -2
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_ctypes_handle/_rtc_connection_observer.py +44 -1
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/agora_base.py +61 -13
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/agora_service.py +33 -21
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/audio_encoded_frame_sender.py +12 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/audio_pcm_data_sender.py +5 -3
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/local_user.py +27 -15
- agora_python_server_sdk-2.3.1/agora/rtc/rtc_connection.py +519 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/rtc_connection_observer.py +20 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/utils/audio_consumer.py +41 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/video_encoded_image_sender.py +8 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1/agora_python_server_sdk.egg-info}/PKG-INFO +170 -6
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/setup.py +22 -2
- agora_python_server_sdk-2.2.4/agora/rtc/rtc_connection.py +0 -164
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/MANIFEST.in +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_ctypes_handle/_audio_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_ctypes_handle/_video_encoded_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_ctypes_handle/_video_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/_utils/globals.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/agora_parameter.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/audio_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/audio_sessionctrl.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/audio_vad_manager.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/local_audio_track.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/local_user_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/local_video_track.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/media_node_factory.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/remote_audio_track.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/remote_video_track.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/utils/vad_dump.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/video_encoded_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/video_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/video_frame_sender.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora/rtc/voice_detection.py +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora_python_server_sdk.egg-info/SOURCES.txt +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora_python_server_sdk.egg-info/dependency_links.txt +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/agora_python_server_sdk.egg-info/top_level.txt +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/pyproject.toml +0 -0
- {agora_python_server_sdk-2.2.4 → agora_python_server_sdk-2.3.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: agora_python_server_sdk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: A Python SDK for Agora Server
|
|
5
5
|
Home-page: https://github.com/AgoraIO-Extensions/Agora-Python-Server-SDK
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -19,9 +19,19 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
- The examples are provided as very simple demonstrations and are not recommended for use in production environments.
|
|
20
20
|
|
|
21
21
|
# Very Important Notice !!!
|
|
22
|
-
- A process can only have one instance.
|
|
22
|
+
- A process can only have one instance,and the instance created in process startup is the global instance,and released in process shutdown.
|
|
23
23
|
- An instance can have multiple connections.
|
|
24
24
|
- In all observers or callbacks, you must not call the SDK's own APIs, nor perform CPU-intensive tasks in the callbacks; data copying is allowed.
|
|
25
|
+
- supported video codec:
|
|
26
|
+
- H264: support both encoding and decoding
|
|
27
|
+
- VP8: support both encoding and decoding
|
|
28
|
+
- VP9: support both encoding and decoding
|
|
29
|
+
- H265: only decoding is supported, encoding willl support in the future
|
|
30
|
+
- AV1: both encoding and decoding are suported but if video image's solution is less than 360p, the codec will be changed to H264
|
|
31
|
+
- if you want to recive the encoded video data:
|
|
32
|
+
- set: video_subscription_options.encodedFrameOnly = 1
|
|
33
|
+
- and then register: set_encoded_video_frame_observer
|
|
34
|
+
|
|
25
35
|
|
|
26
36
|
# Required Operating Systems and Python Versions
|
|
27
37
|
- Supported Linux versions:
|
|
@@ -50,6 +60,161 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
50
60
|
```
|
|
51
61
|
|
|
52
62
|
# Change log
|
|
63
|
+
|
|
64
|
+
# 2025.10.09 release 2.3.1
|
|
65
|
+
-- update arm64 rtc sdk:Fixed a JNI referencing issue in the previous arm64 build. This issue only outputs logs to the console and does not affect functionality.
|
|
66
|
+
|
|
67
|
+
#2025.09.01 release 2.3.0
|
|
68
|
+
|
|
69
|
+
Overview
|
|
70
|
+
|
|
71
|
+
Agora Python SDK version 2.3.0 introduces significant enhancements for real-time audio and video communication, with particular optimizations for AI server scenarios. This release includes API improvements, automation of previously manual processes, and increased flexibility in connection configuration.
|
|
72
|
+
|
|
73
|
+
New Features
|
|
74
|
+
|
|
75
|
+
1. AudioScenarioAiServer Support
|
|
76
|
+
|
|
77
|
+
• Added support for the AudioScenarioAiServer scenario type, now set as the default AudioScenario.
|
|
78
|
+
|
|
79
|
+
• Enables configuration of different scenarios and profiles for connections within the same process.
|
|
80
|
+
|
|
81
|
+
• Important: When using AI server scenario, client-side must use AIClient scenario to avoid audio abnormalities. Please consult Agora support for SDK versions supporting AIClient scenario.
|
|
82
|
+
|
|
83
|
+
2. Enhanced Connection Configuration
|
|
84
|
+
|
|
85
|
+
• Introduced PublishConfigure parameter in connection creation for setting:
|
|
86
|
+
|
|
87
|
+
• Scenario and profile configurations
|
|
88
|
+
|
|
89
|
+
• Audio/Video publication settings
|
|
90
|
+
|
|
91
|
+
• Other publication parameters
|
|
92
|
+
|
|
93
|
+
• Added multiple observer registration methods to connections:
|
|
94
|
+
|
|
95
|
+
• RegisterLocalUserObserver
|
|
96
|
+
|
|
97
|
+
• RegisterAudioFrameObserver
|
|
98
|
+
|
|
99
|
+
• RegisterVideoFrameObserver
|
|
100
|
+
|
|
101
|
+
• RegisterVideoEncodedFrameObserver
|
|
102
|
+
|
|
103
|
+
3. Stream Management Improvements
|
|
104
|
+
|
|
105
|
+
• Added publication control methods:
|
|
106
|
+
|
|
107
|
+
• PublishAudio/UnpublishAudio
|
|
108
|
+
|
|
109
|
+
• PublishVideo/UnpublishVideo
|
|
110
|
+
|
|
111
|
+
• Added data pushing methods:
|
|
112
|
+
|
|
113
|
+
• PushAudioPcmData/PushAudioEncodedData
|
|
114
|
+
|
|
115
|
+
• PushVideoFrame/PushVideoEncodedData
|
|
116
|
+
|
|
117
|
+
• Added InterruptAudio method for supporting interruption functionality
|
|
118
|
+
|
|
119
|
+
• Added IsPushToRTCCompleted method for checking push status
|
|
120
|
+
|
|
121
|
+
• Added SendAudioMetaData method for audio metadata transmission
|
|
122
|
+
|
|
123
|
+
4. Automation Enhancements
|
|
124
|
+
|
|
125
|
+
• Eliminated manual CreateDataStream calls - now handled automatically
|
|
126
|
+
|
|
127
|
+
• Automatic observer unregistration on Release() instead of manual unregistering
|
|
128
|
+
|
|
129
|
+
• Internal handling of media node factory creation:
|
|
130
|
+
|
|
131
|
+
• No longer requires manual calls to newMediaNodeFactory
|
|
132
|
+
|
|
133
|
+
• Automatic handling of track creation (NewCustomAudioTrackPcm, NewCustomAudioTrackEncoded, NewCustomVideoTrack)
|
|
134
|
+
|
|
135
|
+
• Automatic management of audio data senders (NewAudioPcmDataSender)
|
|
136
|
+
|
|
137
|
+
Integration Process
|
|
138
|
+
|
|
139
|
+
The updated integration workflow is as follows:
|
|
140
|
+
|
|
141
|
+
1. Initialize Agora Service (once per process startup):
|
|
142
|
+
config = AgoraServiceConfig()
|
|
143
|
+
agora_service = AgoraService()
|
|
144
|
+
agora_service.initialize(config)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
2. Connection Management (can be looped for multiple connections):
|
|
148
|
+
# Create connection with configuration
|
|
149
|
+
con = agora_service.create_rtc_connection(con_config, publish_config)
|
|
150
|
+
|
|
151
|
+
# Register observers
|
|
152
|
+
con.register_observer(conHandler)
|
|
153
|
+
con.register_audio_frame_observer(audioFrameObserver)
|
|
154
|
+
con.register_local_user_observer(localUserObserver)
|
|
155
|
+
|
|
156
|
+
# Connect and publish
|
|
157
|
+
con.connect(token, channelName, userId)
|
|
158
|
+
con.publish_audio() # or con.publish_video()
|
|
159
|
+
|
|
160
|
+
# Push data
|
|
161
|
+
con.push_audio_pcm_data() # or push_audio_encoded_data()
|
|
162
|
+
# or con.push_video_frame()/push_video_encoded_data()
|
|
163
|
+
|
|
164
|
+
# Disconnect and release
|
|
165
|
+
con.disconnect()
|
|
166
|
+
con.release()
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
3. Release Agora Service (once during process termination):
|
|
170
|
+
agora_service.release()
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
Performance Recommendations
|
|
174
|
+
|
|
175
|
+
1. For AI Scenarios:
|
|
176
|
+
• Use AudioScenarioAIServer for server-side applications
|
|
177
|
+
|
|
178
|
+
• Provides optimized performance with lower latency (20-30ms reduction on iPhone compared to chorus)
|
|
179
|
+
|
|
180
|
+
• Enhanced experience in weak network conditions
|
|
181
|
+
|
|
182
|
+
• Mandatory: Client must use AIClient scenario
|
|
183
|
+
|
|
184
|
+
2. For Non-AI Scenarios:
|
|
185
|
+
• Consult Agora technical support for appropriate scenario configuration
|
|
186
|
+
|
|
187
|
+
• Ensure configuration matches specific business use cases
|
|
188
|
+
|
|
189
|
+
Bug Fixes
|
|
190
|
+
|
|
191
|
+
• Updated RTC SDK with 2 bug fixes
|
|
192
|
+
|
|
193
|
+
Important Notes
|
|
194
|
+
|
|
195
|
+
• Backward Compatibility: Review integration code for manual calls that are now automated
|
|
196
|
+
|
|
197
|
+
• Scenario Matching: Ensure client-server scenario compatibility (AIServer requires AIClient)
|
|
198
|
+
|
|
199
|
+
• Resource Management: Connection release now automatically handles observer unregistration
|
|
200
|
+
|
|
201
|
+
• Consult Support: For specific integration guidance and upgrade assistance, contact Agora SA
|
|
202
|
+
|
|
203
|
+
Summary of Core Changes
|
|
204
|
+
|
|
205
|
+
Before After 2.3.0
|
|
206
|
+
|
|
207
|
+
Manual CreateDataStream ✅ Automatic
|
|
208
|
+
|
|
209
|
+
Manual observer unregistration ✅ Automatic on Release()
|
|
210
|
+
|
|
211
|
+
Fixed per-process scenario ✅ Multi-scenario per process
|
|
212
|
+
|
|
213
|
+
Client/Server scenario mismatch ❗ AIClient mandatory for AI use
|
|
214
|
+
|
|
215
|
+
For detailed implementation guidance and version-specific support, please consult Agora technical support.
|
|
216
|
+
|
|
217
|
+
|
|
53
218
|
## 2025.04.28 Release 2.2.4
|
|
54
219
|
-- Update: update rtc sdk from 4.4.31 to 4.4.32
|
|
55
220
|
## 2025.04.14 Release 2.2.3
|
|
@@ -69,6 +234,7 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
69
234
|
- Added connection::agora_rtc_conn_enable_encryption.
|
|
70
235
|
-- Additions:
|
|
71
236
|
- Added connectionObserver::on_encryption_error (but not working for now, need to fix in the next monthly version 4.4.32).
|
|
237
|
+
|
|
72
238
|
2025.02.26 Release 2.2.1
|
|
73
239
|
--Update:
|
|
74
240
|
- Reduced buffer size from 180ms to 100ms to minimize latency.
|
|
@@ -89,7 +255,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
89
255
|
- Add the AudioMetaData interface: localuser::send_audio_meta_data. Done.
|
|
90
256
|
- Add the OnAudioMetaDataReceived callback to localuserObserver::on_audio_meta_data_received. Done.
|
|
91
257
|
-- Sample modifications.
|
|
92
|
-
|
|
93
258
|
2024.12.17 Release 2.1.7
|
|
94
259
|
--Changes:
|
|
95
260
|
|
|
@@ -117,7 +282,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
117
282
|
-- Replaced the use of pacer with AudioConsumer for pushing PCM audio.
|
|
118
283
|
- Updates:
|
|
119
284
|
-- Updated the samples related to Pacer and VAD.
|
|
120
|
-
|
|
121
285
|
## 2024.12.03 release Version 2.1.5
|
|
122
286
|
- Modifications:
|
|
123
287
|
- LocalUser/audioTrack:
|
|
@@ -173,7 +337,6 @@ Fixed some bug.
|
|
|
173
337
|
- Handle business operations.
|
|
174
338
|
- When a user logs out, execute con.disconnect() and release the audio/video tracks and observers associated with the connection, but do not call con.release(); then put the connection back into the connection pool.
|
|
175
339
|
- When the process exits, release the connection pool (release each con.release()), service/media_node_factory, and the connection pool (release each con.release()) to ensure resource release and optimal performance.
|
|
176
|
-
|
|
177
340
|
## Use of VAD
|
|
178
341
|
# Source code: voice_detection.py
|
|
179
342
|
# Sample code: example_audio_vad.py
|
|
@@ -204,7 +367,8 @@ Judge the value of state according to the returned state, and do corresponding p
|
|
|
204
367
|
### How to push the audio generated by TTS into the channel?
|
|
205
368
|
# Source code: audio_consumer.py
|
|
206
369
|
# Sample code: example_audio_consumer.py
|
|
207
|
-
|
|
370
|
+
|
|
371
|
+
### How to release resource?
|
|
208
372
|
## 如何释放资源?
|
|
209
373
|
localuser.unpublish_audio(audio_track)
|
|
210
374
|
localuser.unpublish_video(video_track)
|
|
@@ -4,9 +4,19 @@
|
|
|
4
4
|
- The examples are provided as very simple demonstrations and are not recommended for use in production environments.
|
|
5
5
|
|
|
6
6
|
# Very Important Notice !!!
|
|
7
|
-
- A process can only have one instance.
|
|
7
|
+
- A process can only have one instance,and the instance created in process startup is the global instance,and released in process shutdown.
|
|
8
8
|
- An instance can have multiple connections.
|
|
9
9
|
- In all observers or callbacks, you must not call the SDK's own APIs, nor perform CPU-intensive tasks in the callbacks; data copying is allowed.
|
|
10
|
+
- supported video codec:
|
|
11
|
+
- H264: support both encoding and decoding
|
|
12
|
+
- VP8: support both encoding and decoding
|
|
13
|
+
- VP9: support both encoding and decoding
|
|
14
|
+
- H265: only decoding is supported, encoding willl support in the future
|
|
15
|
+
- AV1: both encoding and decoding are suported but if video image's solution is less than 360p, the codec will be changed to H264
|
|
16
|
+
- if you want to recive the encoded video data:
|
|
17
|
+
- set: video_subscription_options.encodedFrameOnly = 1
|
|
18
|
+
- and then register: set_encoded_video_frame_observer
|
|
19
|
+
|
|
10
20
|
|
|
11
21
|
# Required Operating Systems and Python Versions
|
|
12
22
|
- Supported Linux versions:
|
|
@@ -35,6 +45,161 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
35
45
|
```
|
|
36
46
|
|
|
37
47
|
# Change log
|
|
48
|
+
|
|
49
|
+
# 2025.10.09 release 2.3.1
|
|
50
|
+
-- update arm64 rtc sdk:Fixed a JNI referencing issue in the previous arm64 build. This issue only outputs logs to the console and does not affect functionality.
|
|
51
|
+
|
|
52
|
+
#2025.09.01 release 2.3.0
|
|
53
|
+
|
|
54
|
+
Overview
|
|
55
|
+
|
|
56
|
+
Agora Python SDK version 2.3.0 introduces significant enhancements for real-time audio and video communication, with particular optimizations for AI server scenarios. This release includes API improvements, automation of previously manual processes, and increased flexibility in connection configuration.
|
|
57
|
+
|
|
58
|
+
New Features
|
|
59
|
+
|
|
60
|
+
1. AudioScenarioAiServer Support
|
|
61
|
+
|
|
62
|
+
• Added support for the AudioScenarioAiServer scenario type, now set as the default AudioScenario.
|
|
63
|
+
|
|
64
|
+
• Enables configuration of different scenarios and profiles for connections within the same process.
|
|
65
|
+
|
|
66
|
+
• Important: When using AI server scenario, client-side must use AIClient scenario to avoid audio abnormalities. Please consult Agora support for SDK versions supporting AIClient scenario.
|
|
67
|
+
|
|
68
|
+
2. Enhanced Connection Configuration
|
|
69
|
+
|
|
70
|
+
• Introduced PublishConfigure parameter in connection creation for setting:
|
|
71
|
+
|
|
72
|
+
• Scenario and profile configurations
|
|
73
|
+
|
|
74
|
+
• Audio/Video publication settings
|
|
75
|
+
|
|
76
|
+
• Other publication parameters
|
|
77
|
+
|
|
78
|
+
• Added multiple observer registration methods to connections:
|
|
79
|
+
|
|
80
|
+
• RegisterLocalUserObserver
|
|
81
|
+
|
|
82
|
+
• RegisterAudioFrameObserver
|
|
83
|
+
|
|
84
|
+
• RegisterVideoFrameObserver
|
|
85
|
+
|
|
86
|
+
• RegisterVideoEncodedFrameObserver
|
|
87
|
+
|
|
88
|
+
3. Stream Management Improvements
|
|
89
|
+
|
|
90
|
+
• Added publication control methods:
|
|
91
|
+
|
|
92
|
+
• PublishAudio/UnpublishAudio
|
|
93
|
+
|
|
94
|
+
• PublishVideo/UnpublishVideo
|
|
95
|
+
|
|
96
|
+
• Added data pushing methods:
|
|
97
|
+
|
|
98
|
+
• PushAudioPcmData/PushAudioEncodedData
|
|
99
|
+
|
|
100
|
+
• PushVideoFrame/PushVideoEncodedData
|
|
101
|
+
|
|
102
|
+
• Added InterruptAudio method for supporting interruption functionality
|
|
103
|
+
|
|
104
|
+
• Added IsPushToRTCCompleted method for checking push status
|
|
105
|
+
|
|
106
|
+
• Added SendAudioMetaData method for audio metadata transmission
|
|
107
|
+
|
|
108
|
+
4. Automation Enhancements
|
|
109
|
+
|
|
110
|
+
• Eliminated manual CreateDataStream calls - now handled automatically
|
|
111
|
+
|
|
112
|
+
• Automatic observer unregistration on Release() instead of manual unregistering
|
|
113
|
+
|
|
114
|
+
• Internal handling of media node factory creation:
|
|
115
|
+
|
|
116
|
+
• No longer requires manual calls to newMediaNodeFactory
|
|
117
|
+
|
|
118
|
+
• Automatic handling of track creation (NewCustomAudioTrackPcm, NewCustomAudioTrackEncoded, NewCustomVideoTrack)
|
|
119
|
+
|
|
120
|
+
• Automatic management of audio data senders (NewAudioPcmDataSender)
|
|
121
|
+
|
|
122
|
+
Integration Process
|
|
123
|
+
|
|
124
|
+
The updated integration workflow is as follows:
|
|
125
|
+
|
|
126
|
+
1. Initialize Agora Service (once per process startup):
|
|
127
|
+
config = AgoraServiceConfig()
|
|
128
|
+
agora_service = AgoraService()
|
|
129
|
+
agora_service.initialize(config)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
2. Connection Management (can be looped for multiple connections):
|
|
133
|
+
# Create connection with configuration
|
|
134
|
+
con = agora_service.create_rtc_connection(con_config, publish_config)
|
|
135
|
+
|
|
136
|
+
# Register observers
|
|
137
|
+
con.register_observer(conHandler)
|
|
138
|
+
con.register_audio_frame_observer(audioFrameObserver)
|
|
139
|
+
con.register_local_user_observer(localUserObserver)
|
|
140
|
+
|
|
141
|
+
# Connect and publish
|
|
142
|
+
con.connect(token, channelName, userId)
|
|
143
|
+
con.publish_audio() # or con.publish_video()
|
|
144
|
+
|
|
145
|
+
# Push data
|
|
146
|
+
con.push_audio_pcm_data() # or push_audio_encoded_data()
|
|
147
|
+
# or con.push_video_frame()/push_video_encoded_data()
|
|
148
|
+
|
|
149
|
+
# Disconnect and release
|
|
150
|
+
con.disconnect()
|
|
151
|
+
con.release()
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
3. Release Agora Service (once during process termination):
|
|
155
|
+
agora_service.release()
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
Performance Recommendations
|
|
159
|
+
|
|
160
|
+
1. For AI Scenarios:
|
|
161
|
+
• Use AudioScenarioAIServer for server-side applications
|
|
162
|
+
|
|
163
|
+
• Provides optimized performance with lower latency (20-30ms reduction on iPhone compared to chorus)
|
|
164
|
+
|
|
165
|
+
• Enhanced experience in weak network conditions
|
|
166
|
+
|
|
167
|
+
• Mandatory: Client must use AIClient scenario
|
|
168
|
+
|
|
169
|
+
2. For Non-AI Scenarios:
|
|
170
|
+
• Consult Agora technical support for appropriate scenario configuration
|
|
171
|
+
|
|
172
|
+
• Ensure configuration matches specific business use cases
|
|
173
|
+
|
|
174
|
+
Bug Fixes
|
|
175
|
+
|
|
176
|
+
• Updated RTC SDK with 2 bug fixes
|
|
177
|
+
|
|
178
|
+
Important Notes
|
|
179
|
+
|
|
180
|
+
• Backward Compatibility: Review integration code for manual calls that are now automated
|
|
181
|
+
|
|
182
|
+
• Scenario Matching: Ensure client-server scenario compatibility (AIServer requires AIClient)
|
|
183
|
+
|
|
184
|
+
• Resource Management: Connection release now automatically handles observer unregistration
|
|
185
|
+
|
|
186
|
+
• Consult Support: For specific integration guidance and upgrade assistance, contact Agora SA
|
|
187
|
+
|
|
188
|
+
Summary of Core Changes
|
|
189
|
+
|
|
190
|
+
Before After 2.3.0
|
|
191
|
+
|
|
192
|
+
Manual CreateDataStream ✅ Automatic
|
|
193
|
+
|
|
194
|
+
Manual observer unregistration ✅ Automatic on Release()
|
|
195
|
+
|
|
196
|
+
Fixed per-process scenario ✅ Multi-scenario per process
|
|
197
|
+
|
|
198
|
+
Client/Server scenario mismatch ❗ AIClient mandatory for AI use
|
|
199
|
+
|
|
200
|
+
For detailed implementation guidance and version-specific support, please consult Agora technical support.
|
|
201
|
+
|
|
202
|
+
|
|
38
203
|
## 2025.04.28 Release 2.2.4
|
|
39
204
|
-- Update: update rtc sdk from 4.4.31 to 4.4.32
|
|
40
205
|
## 2025.04.14 Release 2.2.3
|
|
@@ -54,6 +219,7 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
54
219
|
- Added connection::agora_rtc_conn_enable_encryption.
|
|
55
220
|
-- Additions:
|
|
56
221
|
- Added connectionObserver::on_encryption_error (but not working for now, need to fix in the next monthly version 4.4.32).
|
|
222
|
+
|
|
57
223
|
2025.02.26 Release 2.2.1
|
|
58
224
|
--Update:
|
|
59
225
|
- Reduced buffer size from 180ms to 100ms to minimize latency.
|
|
@@ -74,7 +240,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
74
240
|
- Add the AudioMetaData interface: localuser::send_audio_meta_data. Done.
|
|
75
241
|
- Add the OnAudioMetaDataReceived callback to localuserObserver::on_audio_meta_data_received. Done.
|
|
76
242
|
-- Sample modifications.
|
|
77
|
-
|
|
78
243
|
2024.12.17 Release 2.1.7
|
|
79
244
|
--Changes:
|
|
80
245
|
|
|
@@ -102,7 +267,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
102
267
|
-- Replaced the use of pacer with AudioConsumer for pushing PCM audio.
|
|
103
268
|
- Updates:
|
|
104
269
|
-- Updated the samples related to Pacer and VAD.
|
|
105
|
-
|
|
106
270
|
## 2024.12.03 release Version 2.1.5
|
|
107
271
|
- Modifications:
|
|
108
272
|
- LocalUser/audioTrack:
|
|
@@ -158,7 +322,6 @@ Fixed some bug.
|
|
|
158
322
|
- Handle business operations.
|
|
159
323
|
- When a user logs out, execute con.disconnect() and release the audio/video tracks and observers associated with the connection, but do not call con.release(); then put the connection back into the connection pool.
|
|
160
324
|
- When the process exits, release the connection pool (release each con.release()), service/media_node_factory, and the connection pool (release each con.release()) to ensure resource release and optimal performance.
|
|
161
|
-
|
|
162
325
|
## Use of VAD
|
|
163
326
|
# Source code: voice_detection.py
|
|
164
327
|
# Sample code: example_audio_vad.py
|
|
@@ -189,7 +352,8 @@ Judge the value of state according to the returned state, and do corresponding p
|
|
|
189
352
|
### How to push the audio generated by TTS into the channel?
|
|
190
353
|
# Source code: audio_consumer.py
|
|
191
354
|
# Sample code: example_audio_consumer.py
|
|
192
|
-
|
|
355
|
+
|
|
356
|
+
### How to release resource?
|
|
193
357
|
## 如何释放资源?
|
|
194
358
|
localuser.unpublish_audio(audio_track)
|
|
195
359
|
localuser.unpublish_video(video_track)
|
|
@@ -36,25 +36,30 @@ def _check_download_and_extract_sdk():
|
|
|
36
36
|
#url = "https://download.agora.io/sdk/release/agora_rtc_sdk-x86_64-linux-gnu-v4.4.30-20241024_101940-398537.zip"
|
|
37
37
|
# version 2.2.0 for linux
|
|
38
38
|
#url = "https://download.agora.io/sdk/release/agora_rtc_sdk-x86_64-linux-gnu-v4.4.31-20241223_111509-491956.zip"
|
|
39
|
-
url = "https://download.agora.io/sdk/release/agora_rtc_sdk-x86_64-linux-gnu-v4.4.32-
|
|
39
|
+
#url = "https://download.agora.io/sdk/release/agora_rtc_sdk-x86_64-linux-gnu-v4.4.32-20250715_161625-791246.zip"
|
|
40
|
+
url = "https://download.agora.io/sdk/release/agora_rtc_sdk-x86_64-linux-gnu-v4.4.32-20250829_160340-860733.zip"
|
|
41
|
+
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
libagora_rtc_sdk_path = os.path.join(sdk_dir, "libagora_rtc_sdk.so")
|
|
43
45
|
#rtc_md5 = "7031dd10d1681cd88fd89d68c5b54282"
|
|
44
|
-
rtc_md5 = "
|
|
46
|
+
rtc_md5 = "7eb8042e43246f95f188549d8711d1bf"
|
|
45
47
|
if sys.platform == 'darwin':
|
|
46
48
|
#url = "https://download.agora.io/sdk/release/agora_rtc_sdk_mac_rel.v4.4.30_22472_FULL_20241024_1224_398653.zip"
|
|
47
49
|
# version 2.2.0 for mac
|
|
48
50
|
#url = "https://download.agora.io/sdk/release/agora_sdk_mac_v4.4.31_23136_FULL_20241223_1245_492039.zip"
|
|
49
|
-
url = "https://download.agora.io/sdk/release/agora_sdk_mac_v4.4.
|
|
51
|
+
#url = "https://download.agora.io/sdk/release/agora_sdk_mac_v4.4.32_24915_FULL_20250715_1710_791284.zip"
|
|
52
|
+
url = "https://download.agora.io/sdk/release/agora_sdk_mac_v4.4.32_25418_FULL_20250829_1647_860754.zip"
|
|
53
|
+
|
|
50
54
|
|
|
51
55
|
libagora_rtc_sdk_path = os.path.join(sdk_dir, "libAgoraRtcKit.dylib")
|
|
52
56
|
#rtc_md5 = "ca3ca14f9e2b7d97eb2594d1f32dab9f"
|
|
53
|
-
rtc_md5 = "
|
|
57
|
+
rtc_md5 = "df0ec3b5073d17dee76cc4d97c13699a"
|
|
54
58
|
if arch == "aarch64" and sys.platform == 'linux':
|
|
55
59
|
#url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.31-20250307_175457-603878.zip"
|
|
56
|
-
url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.32-20250425_150503-675674.zip"
|
|
57
|
-
|
|
60
|
+
#url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.32-20250425_150503-675674.zip"
|
|
61
|
+
url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.32-20251009_145437-921455.zip"
|
|
62
|
+
rtc_md5 = "5c002f25d2b381e353082da4f835b4f2"
|
|
58
63
|
|
|
59
64
|
|
|
60
65
|
if os.path.exists(libagora_rtc_sdk_path) and get_file_md5(libagora_rtc_sdk_path) == rtc_md5:
|