-
Notifications
You must be signed in to change notification settings - Fork 226
WebRTC - python sdk #1701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WebRTC - python sdk #1701
Conversation
inference_sdk/webrtc/client.py
Outdated
| # Workflow specification mode | ||
| return {"workflow_specification": workflow} | ||
| else: | ||
| raise ValueError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe sdk-specific exceptions could be introduced?
| from aiortc import RTCDataChannel, RTCPeerConnection | ||
|
|
||
|
|
||
| def _check_webrtc_dependencies(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
inference_sdk/webrtc/session.py
Outdated
|
|
||
|
|
||
| # Configuration constants | ||
| DEFAULT_INITIAL_FRAME_TIMEOUT = 30.0 # seconds to wait for first video frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe env-configurable?
|
|
||
| source = VideoFileSource(str(test_video_path)) | ||
|
|
||
| with WebRTCSession( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not really see enter(...) - does it work?
| -r requirements/requirements.sdk.http.txt \ | ||
| -r requirements/requirements.test.unit.txt | ||
| - name: 🧪 E2E Tests - WebRTC SDK (real server) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I was working on it, the tests felt empty without talking with the real api. Kind of not testing much.
With this, it is validating much more on terms of compability.
PawelPeczek-Roboflow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix CI
Also - seems like the session object meant to be used in contextmanager lacks enter / exit
Description
This creates a specific python sdk for webrtc.
The objective is to make it easy to use the inference webrtc API and consume it using python.
It has samples on how the code looks for the dev for webcam, local file, rtsp.
Type of change
How has this change been tested, please provide a testcase or example of how you tested the change?
locally
Any specific deployment considerations
it's a inferecen-sdk only change
Docs