agora-python-server-sdk 2.2.3__tar.gz → 2.3.0__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.3/agora_python_server_sdk.egg-info → agora_python_server_sdk-2.3.0}/PKG-INFO +168 -6
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/README.md +167 -5
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/__init__.py +13 -6
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_ctypes_handle/_ctypes_data.py +129 -9
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_ctypes_handle/_local_user_observer.py +2 -2
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_ctypes_handle/_rtc_connection_observer.py +44 -1
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/agora_base.py +61 -13
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/agora_service.py +27 -21
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/audio_encoded_frame_sender.py +12 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/audio_pcm_data_sender.py +5 -3
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/local_user.py +27 -15
- agora_python_server_sdk-2.3.0/agora/rtc/rtc_connection.py +519 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/rtc_connection_observer.py +20 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/utils/audio_consumer.py +41 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/video_encoded_image_sender.py +8 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0/agora_python_server_sdk.egg-info}/PKG-INFO +168 -6
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/setup.py +27 -4
- agora_python_server_sdk-2.2.3/agora/rtc/rtc_connection.py +0 -164
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/MANIFEST.in +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_ctypes_handle/_audio_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_ctypes_handle/_video_encoded_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_ctypes_handle/_video_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/_utils/globals.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/agora_parameter.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/audio_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/audio_sessionctrl.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/audio_vad_manager.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/local_audio_track.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/local_user_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/local_video_track.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/media_node_factory.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/remote_audio_track.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/remote_video_track.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/utils/vad_dump.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/video_encoded_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/video_frame_observer.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/video_frame_sender.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora/rtc/voice_detection.py +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora_python_server_sdk.egg-info/SOURCES.txt +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora_python_server_sdk.egg-info/dependency_links.txt +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/agora_python_server_sdk.egg-info/top_level.txt +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/pyproject.toml +0 -0
- {agora_python_server_sdk-2.2.3 → agora_python_server_sdk-2.3.0}/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.0
|
|
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,159 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
50
60
|
```
|
|
51
61
|
|
|
52
62
|
# Change log
|
|
63
|
+
#2025.09.01 release 2.3.0
|
|
64
|
+
|
|
65
|
+
Overview
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
New Features
|
|
70
|
+
|
|
71
|
+
1. AudioScenarioAiServer Support
|
|
72
|
+
|
|
73
|
+
• Added support for the AudioScenarioAiServer scenario type, now set as the default AudioScenario.
|
|
74
|
+
|
|
75
|
+
• Enables configuration of different scenarios and profiles for connections within the same process.
|
|
76
|
+
|
|
77
|
+
• 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.
|
|
78
|
+
|
|
79
|
+
2. Enhanced Connection Configuration
|
|
80
|
+
|
|
81
|
+
• Introduced PublishConfigure parameter in connection creation for setting:
|
|
82
|
+
|
|
83
|
+
• Scenario and profile configurations
|
|
84
|
+
|
|
85
|
+
• Audio/Video publication settings
|
|
86
|
+
|
|
87
|
+
• Other publication parameters
|
|
88
|
+
|
|
89
|
+
• Added multiple observer registration methods to connections:
|
|
90
|
+
|
|
91
|
+
• RegisterLocalUserObserver
|
|
92
|
+
|
|
93
|
+
• RegisterAudioFrameObserver
|
|
94
|
+
|
|
95
|
+
• RegisterVideoFrameObserver
|
|
96
|
+
|
|
97
|
+
• RegisterVideoEncodedFrameObserver
|
|
98
|
+
|
|
99
|
+
3. Stream Management Improvements
|
|
100
|
+
|
|
101
|
+
• Added publication control methods:
|
|
102
|
+
|
|
103
|
+
• PublishAudio/UnpublishAudio
|
|
104
|
+
|
|
105
|
+
• PublishVideo/UnpublishVideo
|
|
106
|
+
|
|
107
|
+
• Added data pushing methods:
|
|
108
|
+
|
|
109
|
+
• PushAudioPcmData/PushAudioEncodedData
|
|
110
|
+
|
|
111
|
+
• PushVideoFrame/PushVideoEncodedData
|
|
112
|
+
|
|
113
|
+
• Added InterruptAudio method for supporting interruption functionality
|
|
114
|
+
|
|
115
|
+
• Added IsPushToRTCCompleted method for checking push status
|
|
116
|
+
|
|
117
|
+
• Added SendAudioMetaData method for audio metadata transmission
|
|
118
|
+
|
|
119
|
+
4. Automation Enhancements
|
|
120
|
+
|
|
121
|
+
• Eliminated manual CreateDataStream calls - now handled automatically
|
|
122
|
+
|
|
123
|
+
• Automatic observer unregistration on Release() instead of manual unregistering
|
|
124
|
+
|
|
125
|
+
• Internal handling of media node factory creation:
|
|
126
|
+
|
|
127
|
+
• No longer requires manual calls to newMediaNodeFactory
|
|
128
|
+
|
|
129
|
+
• Automatic handling of track creation (NewCustomAudioTrackPcm, NewCustomAudioTrackEncoded, NewCustomVideoTrack)
|
|
130
|
+
|
|
131
|
+
• Automatic management of audio data senders (NewAudioPcmDataSender)
|
|
132
|
+
|
|
133
|
+
Integration Process
|
|
134
|
+
|
|
135
|
+
The updated integration workflow is as follows:
|
|
136
|
+
|
|
137
|
+
1. Initialize Agora Service (once per process startup):
|
|
138
|
+
config = AgoraServiceConfig()
|
|
139
|
+
agora_service = AgoraService()
|
|
140
|
+
agora_service.initialize(config)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
2. Connection Management (can be looped for multiple connections):
|
|
144
|
+
# Create connection with configuration
|
|
145
|
+
con = agora_service.create_rtc_connection(con_config, publish_config)
|
|
146
|
+
|
|
147
|
+
# Register observers
|
|
148
|
+
con.register_observer(conHandler)
|
|
149
|
+
con.register_audio_frame_observer(audioFrameObserver)
|
|
150
|
+
con.register_local_user_observer(localUserObserver)
|
|
151
|
+
|
|
152
|
+
# Connect and publish
|
|
153
|
+
con.connect(token, channelName, userId)
|
|
154
|
+
con.publish_audio() # or con.publish_video()
|
|
155
|
+
|
|
156
|
+
# Push data
|
|
157
|
+
con.push_audio_pcm_data() # or push_audio_encoded_data()
|
|
158
|
+
# or con.push_video_frame()/push_video_encoded_data()
|
|
159
|
+
|
|
160
|
+
# Disconnect and release
|
|
161
|
+
con.disconnect()
|
|
162
|
+
con.release()
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
3. Release Agora Service (once during process termination):
|
|
166
|
+
agora_service.release()
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
Performance Recommendations
|
|
170
|
+
|
|
171
|
+
1. For AI Scenarios:
|
|
172
|
+
• Use AudioScenarioAIServer for server-side applications
|
|
173
|
+
|
|
174
|
+
• Provides optimized performance with lower latency (20-30ms reduction on iPhone compared to chorus)
|
|
175
|
+
|
|
176
|
+
• Enhanced experience in weak network conditions
|
|
177
|
+
|
|
178
|
+
• Mandatory: Client must use AIClient scenario
|
|
179
|
+
|
|
180
|
+
2. For Non-AI Scenarios:
|
|
181
|
+
• Consult Agora technical support for appropriate scenario configuration
|
|
182
|
+
|
|
183
|
+
• Ensure configuration matches specific business use cases
|
|
184
|
+
|
|
185
|
+
Bug Fixes
|
|
186
|
+
|
|
187
|
+
• Updated RTC SDK with 2 bug fixes
|
|
188
|
+
|
|
189
|
+
Important Notes
|
|
190
|
+
|
|
191
|
+
• Backward Compatibility: Review integration code for manual calls that are now automated
|
|
192
|
+
|
|
193
|
+
• Scenario Matching: Ensure client-server scenario compatibility (AIServer requires AIClient)
|
|
194
|
+
|
|
195
|
+
• Resource Management: Connection release now automatically handles observer unregistration
|
|
196
|
+
|
|
197
|
+
• Consult Support: For specific integration guidance and upgrade assistance, contact Agora SA
|
|
198
|
+
|
|
199
|
+
Summary of Core Changes
|
|
200
|
+
|
|
201
|
+
Before After 2.3.0
|
|
202
|
+
|
|
203
|
+
Manual CreateDataStream ✅ Automatic
|
|
204
|
+
|
|
205
|
+
Manual observer unregistration ✅ Automatic on Release()
|
|
206
|
+
|
|
207
|
+
Fixed per-process scenario ✅ Multi-scenario per process
|
|
208
|
+
|
|
209
|
+
Client/Server scenario mismatch ❗ AIClient mandatory for AI use
|
|
210
|
+
|
|
211
|
+
For detailed implementation guidance and version-specific support, please consult Agora technical support.
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## 2025.04.28 Release 2.2.4
|
|
215
|
+
-- Update: update rtc sdk from 4.4.31 to 4.4.32
|
|
53
216
|
## 2025.04.14 Release 2.2.3
|
|
54
217
|
-- Fix:
|
|
55
218
|
-- Fixed a bug in the salt processing in enable_encryption
|
|
@@ -67,6 +230,7 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
67
230
|
- Added connection::agora_rtc_conn_enable_encryption.
|
|
68
231
|
-- Additions:
|
|
69
232
|
- Added connectionObserver::on_encryption_error (but not working for now, need to fix in the next monthly version 4.4.32).
|
|
233
|
+
|
|
70
234
|
2025.02.26 Release 2.2.1
|
|
71
235
|
--Update:
|
|
72
236
|
- Reduced buffer size from 180ms to 100ms to minimize latency.
|
|
@@ -87,7 +251,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
87
251
|
- Add the AudioMetaData interface: localuser::send_audio_meta_data. Done.
|
|
88
252
|
- Add the OnAudioMetaDataReceived callback to localuserObserver::on_audio_meta_data_received. Done.
|
|
89
253
|
-- Sample modifications.
|
|
90
|
-
|
|
91
254
|
2024.12.17 Release 2.1.7
|
|
92
255
|
--Changes:
|
|
93
256
|
|
|
@@ -115,7 +278,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
115
278
|
-- Replaced the use of pacer with AudioConsumer for pushing PCM audio.
|
|
116
279
|
- Updates:
|
|
117
280
|
-- Updated the samples related to Pacer and VAD.
|
|
118
|
-
|
|
119
281
|
## 2024.12.03 release Version 2.1.5
|
|
120
282
|
- Modifications:
|
|
121
283
|
- LocalUser/audioTrack:
|
|
@@ -171,7 +333,6 @@ Fixed some bug.
|
|
|
171
333
|
- Handle business operations.
|
|
172
334
|
- 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.
|
|
173
335
|
- 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.
|
|
174
|
-
|
|
175
336
|
## Use of VAD
|
|
176
337
|
# Source code: voice_detection.py
|
|
177
338
|
# Sample code: example_audio_vad.py
|
|
@@ -202,7 +363,8 @@ Judge the value of state according to the returned state, and do corresponding p
|
|
|
202
363
|
### How to push the audio generated by TTS into the channel?
|
|
203
364
|
# Source code: audio_consumer.py
|
|
204
365
|
# Sample code: example_audio_consumer.py
|
|
205
|
-
|
|
366
|
+
|
|
367
|
+
### How to release resource?
|
|
206
368
|
## 如何释放资源?
|
|
207
369
|
localuser.unpublish_audio(audio_track)
|
|
208
370
|
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,159 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
35
45
|
```
|
|
36
46
|
|
|
37
47
|
# Change log
|
|
48
|
+
#2025.09.01 release 2.3.0
|
|
49
|
+
|
|
50
|
+
Overview
|
|
51
|
+
|
|
52
|
+
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.
|
|
53
|
+
|
|
54
|
+
New Features
|
|
55
|
+
|
|
56
|
+
1. AudioScenarioAiServer Support
|
|
57
|
+
|
|
58
|
+
• Added support for the AudioScenarioAiServer scenario type, now set as the default AudioScenario.
|
|
59
|
+
|
|
60
|
+
• Enables configuration of different scenarios and profiles for connections within the same process.
|
|
61
|
+
|
|
62
|
+
• 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.
|
|
63
|
+
|
|
64
|
+
2. Enhanced Connection Configuration
|
|
65
|
+
|
|
66
|
+
• Introduced PublishConfigure parameter in connection creation for setting:
|
|
67
|
+
|
|
68
|
+
• Scenario and profile configurations
|
|
69
|
+
|
|
70
|
+
• Audio/Video publication settings
|
|
71
|
+
|
|
72
|
+
• Other publication parameters
|
|
73
|
+
|
|
74
|
+
• Added multiple observer registration methods to connections:
|
|
75
|
+
|
|
76
|
+
• RegisterLocalUserObserver
|
|
77
|
+
|
|
78
|
+
• RegisterAudioFrameObserver
|
|
79
|
+
|
|
80
|
+
• RegisterVideoFrameObserver
|
|
81
|
+
|
|
82
|
+
• RegisterVideoEncodedFrameObserver
|
|
83
|
+
|
|
84
|
+
3. Stream Management Improvements
|
|
85
|
+
|
|
86
|
+
• Added publication control methods:
|
|
87
|
+
|
|
88
|
+
• PublishAudio/UnpublishAudio
|
|
89
|
+
|
|
90
|
+
• PublishVideo/UnpublishVideo
|
|
91
|
+
|
|
92
|
+
• Added data pushing methods:
|
|
93
|
+
|
|
94
|
+
• PushAudioPcmData/PushAudioEncodedData
|
|
95
|
+
|
|
96
|
+
• PushVideoFrame/PushVideoEncodedData
|
|
97
|
+
|
|
98
|
+
• Added InterruptAudio method for supporting interruption functionality
|
|
99
|
+
|
|
100
|
+
• Added IsPushToRTCCompleted method for checking push status
|
|
101
|
+
|
|
102
|
+
• Added SendAudioMetaData method for audio metadata transmission
|
|
103
|
+
|
|
104
|
+
4. Automation Enhancements
|
|
105
|
+
|
|
106
|
+
• Eliminated manual CreateDataStream calls - now handled automatically
|
|
107
|
+
|
|
108
|
+
• Automatic observer unregistration on Release() instead of manual unregistering
|
|
109
|
+
|
|
110
|
+
• Internal handling of media node factory creation:
|
|
111
|
+
|
|
112
|
+
• No longer requires manual calls to newMediaNodeFactory
|
|
113
|
+
|
|
114
|
+
• Automatic handling of track creation (NewCustomAudioTrackPcm, NewCustomAudioTrackEncoded, NewCustomVideoTrack)
|
|
115
|
+
|
|
116
|
+
• Automatic management of audio data senders (NewAudioPcmDataSender)
|
|
117
|
+
|
|
118
|
+
Integration Process
|
|
119
|
+
|
|
120
|
+
The updated integration workflow is as follows:
|
|
121
|
+
|
|
122
|
+
1. Initialize Agora Service (once per process startup):
|
|
123
|
+
config = AgoraServiceConfig()
|
|
124
|
+
agora_service = AgoraService()
|
|
125
|
+
agora_service.initialize(config)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
2. Connection Management (can be looped for multiple connections):
|
|
129
|
+
# Create connection with configuration
|
|
130
|
+
con = agora_service.create_rtc_connection(con_config, publish_config)
|
|
131
|
+
|
|
132
|
+
# Register observers
|
|
133
|
+
con.register_observer(conHandler)
|
|
134
|
+
con.register_audio_frame_observer(audioFrameObserver)
|
|
135
|
+
con.register_local_user_observer(localUserObserver)
|
|
136
|
+
|
|
137
|
+
# Connect and publish
|
|
138
|
+
con.connect(token, channelName, userId)
|
|
139
|
+
con.publish_audio() # or con.publish_video()
|
|
140
|
+
|
|
141
|
+
# Push data
|
|
142
|
+
con.push_audio_pcm_data() # or push_audio_encoded_data()
|
|
143
|
+
# or con.push_video_frame()/push_video_encoded_data()
|
|
144
|
+
|
|
145
|
+
# Disconnect and release
|
|
146
|
+
con.disconnect()
|
|
147
|
+
con.release()
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
3. Release Agora Service (once during process termination):
|
|
151
|
+
agora_service.release()
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
Performance Recommendations
|
|
155
|
+
|
|
156
|
+
1. For AI Scenarios:
|
|
157
|
+
• Use AudioScenarioAIServer for server-side applications
|
|
158
|
+
|
|
159
|
+
• Provides optimized performance with lower latency (20-30ms reduction on iPhone compared to chorus)
|
|
160
|
+
|
|
161
|
+
• Enhanced experience in weak network conditions
|
|
162
|
+
|
|
163
|
+
• Mandatory: Client must use AIClient scenario
|
|
164
|
+
|
|
165
|
+
2. For Non-AI Scenarios:
|
|
166
|
+
• Consult Agora technical support for appropriate scenario configuration
|
|
167
|
+
|
|
168
|
+
• Ensure configuration matches specific business use cases
|
|
169
|
+
|
|
170
|
+
Bug Fixes
|
|
171
|
+
|
|
172
|
+
• Updated RTC SDK with 2 bug fixes
|
|
173
|
+
|
|
174
|
+
Important Notes
|
|
175
|
+
|
|
176
|
+
• Backward Compatibility: Review integration code for manual calls that are now automated
|
|
177
|
+
|
|
178
|
+
• Scenario Matching: Ensure client-server scenario compatibility (AIServer requires AIClient)
|
|
179
|
+
|
|
180
|
+
• Resource Management: Connection release now automatically handles observer unregistration
|
|
181
|
+
|
|
182
|
+
• Consult Support: For specific integration guidance and upgrade assistance, contact Agora SA
|
|
183
|
+
|
|
184
|
+
Summary of Core Changes
|
|
185
|
+
|
|
186
|
+
Before After 2.3.0
|
|
187
|
+
|
|
188
|
+
Manual CreateDataStream ✅ Automatic
|
|
189
|
+
|
|
190
|
+
Manual observer unregistration ✅ Automatic on Release()
|
|
191
|
+
|
|
192
|
+
Fixed per-process scenario ✅ Multi-scenario per process
|
|
193
|
+
|
|
194
|
+
Client/Server scenario mismatch ❗ AIClient mandatory for AI use
|
|
195
|
+
|
|
196
|
+
For detailed implementation guidance and version-specific support, please consult Agora technical support.
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
## 2025.04.28 Release 2.2.4
|
|
200
|
+
-- Update: update rtc sdk from 4.4.31 to 4.4.32
|
|
38
201
|
## 2025.04.14 Release 2.2.3
|
|
39
202
|
-- Fix:
|
|
40
203
|
-- Fixed a bug in the salt processing in enable_encryption
|
|
@@ -52,6 +215,7 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
52
215
|
- Added connection::agora_rtc_conn_enable_encryption.
|
|
53
216
|
-- Additions:
|
|
54
217
|
- Added connectionObserver::on_encryption_error (but not working for now, need to fix in the next monthly version 4.4.32).
|
|
218
|
+
|
|
55
219
|
2025.02.26 Release 2.2.1
|
|
56
220
|
--Update:
|
|
57
221
|
- Reduced buffer size from 180ms to 100ms to minimize latency.
|
|
@@ -72,7 +236,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
72
236
|
- Add the AudioMetaData interface: localuser::send_audio_meta_data. Done.
|
|
73
237
|
- Add the OnAudioMetaDataReceived callback to localuserObserver::on_audio_meta_data_received. Done.
|
|
74
238
|
-- Sample modifications.
|
|
75
|
-
|
|
76
239
|
2024.12.17 Release 2.1.7
|
|
77
240
|
--Changes:
|
|
78
241
|
|
|
@@ -100,7 +263,6 @@ python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx
|
|
|
100
263
|
-- Replaced the use of pacer with AudioConsumer for pushing PCM audio.
|
|
101
264
|
- Updates:
|
|
102
265
|
-- Updated the samples related to Pacer and VAD.
|
|
103
|
-
|
|
104
266
|
## 2024.12.03 release Version 2.1.5
|
|
105
267
|
- Modifications:
|
|
106
268
|
- LocalUser/audioTrack:
|
|
@@ -156,7 +318,6 @@ Fixed some bug.
|
|
|
156
318
|
- Handle business operations.
|
|
157
319
|
- 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.
|
|
158
320
|
- 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.
|
|
159
|
-
|
|
160
321
|
## Use of VAD
|
|
161
322
|
# Source code: voice_detection.py
|
|
162
323
|
# Sample code: example_audio_vad.py
|
|
@@ -187,7 +348,8 @@ Judge the value of state according to the returned state, and do corresponding p
|
|
|
187
348
|
### How to push the audio generated by TTS into the channel?
|
|
188
349
|
# Source code: audio_consumer.py
|
|
189
350
|
# Sample code: example_audio_consumer.py
|
|
190
|
-
|
|
351
|
+
|
|
352
|
+
### How to release resource?
|
|
191
353
|
## 如何释放资源?
|
|
192
354
|
localuser.unpublish_audio(audio_track)
|
|
193
355
|
localuser.unpublish_video(video_track)
|
|
@@ -35,23 +35,30 @@ def _check_download_and_extract_sdk():
|
|
|
35
35
|
|
|
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
|
-
url = "https://download.agora.io/sdk/release/agora_rtc_sdk-x86_64-linux-gnu-v4.4.31-20241223_111509-491956.zip"
|
|
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-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
|
+
|
|
39
42
|
|
|
40
43
|
|
|
41
44
|
libagora_rtc_sdk_path = os.path.join(sdk_dir, "libagora_rtc_sdk.so")
|
|
42
45
|
#rtc_md5 = "7031dd10d1681cd88fd89d68c5b54282"
|
|
43
|
-
rtc_md5 = "
|
|
46
|
+
rtc_md5 = "7eb8042e43246f95f188549d8711d1bf"
|
|
44
47
|
if sys.platform == 'darwin':
|
|
45
48
|
#url = "https://download.agora.io/sdk/release/agora_rtc_sdk_mac_rel.v4.4.30_22472_FULL_20241024_1224_398653.zip"
|
|
46
49
|
# version 2.2.0 for mac
|
|
47
|
-
url = "https://download.agora.io/sdk/release/agora_sdk_mac_v4.4.31_23136_FULL_20241223_1245_492039.zip"
|
|
50
|
+
#url = "https://download.agora.io/sdk/release/agora_sdk_mac_v4.4.31_23136_FULL_20241223_1245_492039.zip"
|
|
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
|
+
|
|
48
54
|
|
|
49
55
|
libagora_rtc_sdk_path = os.path.join(sdk_dir, "libAgoraRtcKit.dylib")
|
|
50
56
|
#rtc_md5 = "ca3ca14f9e2b7d97eb2594d1f32dab9f"
|
|
51
|
-
rtc_md5 = "
|
|
57
|
+
rtc_md5 = "df0ec3b5073d17dee76cc4d97c13699a"
|
|
52
58
|
if arch == "aarch64" and sys.platform == 'linux':
|
|
53
|
-
url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.31-20250307_175457-603878.zip"
|
|
54
|
-
|
|
59
|
+
#url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.31-20250307_175457-603878.zip"
|
|
60
|
+
url = "https://download.agora.io/sdk/release/Agora-RTC-aarch64-linux-gnu-v4.4.32-20250425_150503-675674.zip"
|
|
61
|
+
rtc_md5 = "a217a8ed32c964843b120006511121cf"
|
|
55
62
|
|
|
56
63
|
|
|
57
64
|
if os.path.exists(libagora_rtc_sdk_path) and get_file_md5(libagora_rtc_sdk_path) == rtc_md5:
|