Skip to main content

WebRTC SFU Sora Python SDK

Project description

Sora Python SDK

License

Sora Python SDK は WebRTC SFU Sora の Python クライアントアプリケーションを開発するためのライブラリです。Sora C++ SDK をベースにしています。

About Shiguredo's open source software

We will not respond to PRs or issues that have not been discussed on Discord. Also, Discord is only available in Japanese.

Please read https://github.com/shiguredo/oss/blob/master/README.en.md before use.

時雨堂のオープンソースソフトウェアについて

利用前に https://github.com/shiguredo/oss をお読みください。

Sora Python SDK について

様々なプラットフォームに対応した WebRTC SFU Sora 向けの Python SDK です。

特徴

  • Sora C++ SDK ベース
  • WebRTC 部分の機能は libwebrtc を採用
  • 物体検出などの入力に Sora 経由で受信した映像が利用できる
  • 音声認識などの入力に Sora 経由で受信した音声を利用できる

利用イメージ

  • データチャンネルを利用して Python において映像、音声を解析した結果を Sora 経由で配信する
  • Text to Speech の音声を Sora 経由で配信する
  • 映像入力に対して Pillow などで加工した映像を Sora を経由で配信する
  • A チャンネルの参加者からの映像と音声を B チャンネルに対して加工した上で Sora 経由で配信する

ドキュメント

TBD

ビルド

Linux のみ以下のインストールが必要です。

sudo apt install libdrm-dev libva-dev

Rye

Rye というパッケージマネージャーを利用しています。

Linux と macOS の場合は curl -sSf https://rye-up.com/get | bash でインストール可能です。 Windows は https://rye-up.com/ の Installation Instructions を確認してください。

$ rye sync
$ rye run python run.py
$ rye run python -m build

これで dist/ 以下に *.whl ファイルが作成されます。

サンプルの実行

$ pip install dist/sora_sdk-<さっき生成したwhlファイル>.whl
# signaling_url  channel_id などの情報を書き換える
$ vim test/recvonly.py
$ rye run python test/recvonly.py

Ubuntu の場合は追加で以下の準備が必要:

$ sudo apt install libportaudio2
$ pip install opencv-python opencv-python-headless sounddevice

Jetson の場合は以下の準備が必要:

$ sudo apt install libopencv libopencv-python libportaudio2
$ pip install sounddevice

Python は Ubuntu 20.04 標準の Python (Python 3.8) を利用して下さい。 また、venv は利用せずに実行して下さい。

システム条件

  • WebRTC SFU Sora 2022.2.0 以降
  • Python 3.10 以上

対応プラットフォーム

  • macOS 12.4 arm64 以降
  • Ubuntu 20.04 x86_64
  • Ubuntu 22.04 x86_64
  • Windows 10 1809 x86_64 以降

未検証

  • Ubuntu 20.04 arm64 (NVIDIA Jetson シリーズ)

対応機能

TBD

優先実装

優先実装とは Sora のライセンスを契約頂いているお客様限定で Sora Python SDK の実装予定機能を有償にて前倒しで実装することです。

優先実装が可能な機能一覧

詳細は Discord やメールなどでお気軽にお問い合わせください

TBD

サポートについて

Discord

  • サポートしません
  • アドバイスします
  • フィードバック歓迎します

最新の状況などは Discord で共有しています。質問や相談も Discord でのみ受け付けています。

https://discord.gg/shiguredo

バグ報告

Discord へお願いします。

ライセンス

Apache License 2.0


Copyright 2023-2023, tnoho (Original Author)
Copyright 2023-2023, Shiguredo Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

このリポジトリに含まれる shiguremaru.png ファイルのライセンスは CC BY-NC-ND 4.0 です。


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sora_sdk-2023.1.0.dev0.tar.gz (11.3 MB view hashes)

Uploaded Source

Built Distribution

sora_sdk-2023.1.0.dev0-cp38-cp38-macosx_13_0_arm64.whl (11.3 MB view hashes)

Uploaded CPython 3.8 macOS 13.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page