-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,207 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["charliermarsh.ruff", "ms-python.mypy-type-checker"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# コマンドライン引数 もしくは 環境変数での指定が必須なパラメーター | ||
# SORA_SIGNALING_URLS カンマ区切りで複数指定可能 | ||
SORA_SIGNALING_URLS=wss://1.example.com./signaling,wss://2.example.com/signaling | ||
SORA_CHANNEL_ID=sora | ||
SORA_METADATA='{"access_token": "secret"}' | ||
|
||
# オプション設定 | ||
# SORA_VIDEO_CODEC_TYPE=vp9 | ||
# SORA_VIDEO_BIT_RATE=500 | ||
# SORA_CAMERA_ID=0 | ||
# SORA_VIDEO_WIDTH=640 | ||
# SORA_VIDEO_HEIGHT=480 | ||
# SORA_MESSAGING_LABEL=#sora-devtools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.venv | ||
.ruff_cache | ||
.mypy_cache | ||
*.pyc | ||
__pycache__ | ||
.env* | ||
!.env.template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.8.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Python Sora 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 をお読みください。 | ||
|
||
## サンプルコードの実行方法 | ||
|
||
[Rye](https://github.com/mitsuhiko/rye) というパッケージマネージャーを利用しています。 | ||
|
||
Linux と macOS の場合は `curl -sSf https://rye-up.com/get | bash` でインストール可能です。 | ||
Windows は https://rye-up.com/ の Installation Instructions を確認してください。 | ||
|
||
### 依存パッケージのビルド | ||
|
||
```console | ||
$ rye sync | ||
``` | ||
|
||
### サンプルコードの実行 | ||
|
||
```console | ||
$ rye run media_recvonly --signaling-urls wss://1.example.com/signaling wss://2.example.com/signaling --channel-id sora | ||
``` | ||
|
||
### コマンドラインの代わりに環境変数を利用する | ||
|
||
```console | ||
$ cp .env.template .env | ||
# .env に必要な変数を設定してください。 | ||
$ rye run media_recvonly | ||
``` | ||
|
||
## ライセンス | ||
|
||
Apache License 2.0 | ||
|
||
``` | ||
Copyright 2023-2024, tnoho (Original Author) | ||
Copyright 2023-2024, 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. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[project] | ||
name = "sora-sdk-samples" | ||
version = "2024.1.0" | ||
description = "Sora Python SDK Samples" | ||
authors = [{ name = "Shiguredo Inc." }] | ||
dependencies = [ | ||
"opencv-python~=4.9.0.80", | ||
"opencv-python-headless~=4.9.0.80", | ||
"sounddevice~=0.4.6", | ||
"sora-sdk>=2024.1.0", | ||
"mediapipe~=0.10.1", | ||
"python-dotenv>=1.0.1", | ||
] | ||
readme = "README.md" | ||
requires-python = ">= 3.8" | ||
|
||
[project.scripts] | ||
media_sendonly = "media.sendonly:sendonly" | ||
media_recvonly = "media.recvonly:recvonly" | ||
messaging_sendrecv = "messaging.sendrecv:sendrecv" | ||
messaging_sendonly = "messaging.sendonly:sendonly" | ||
messaging_recvonly = "messaging.recvonly:recvonly" | ||
hideface_sender = "ml.hideface_sender:hideface_sender" | ||
|
||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.rye] | ||
managed = true | ||
dev-dependencies = ["ruff>=0.3.0", "mypy>=1.8.0"] | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/media", "src/messaging", "src/ml"] | ||
|
||
[tool.ruff] | ||
line-length = 100 | ||
indent-width = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: false | ||
# with-sources: false | ||
|
||
-e file:. | ||
absl-py==1.4.0 | ||
# via mediapipe | ||
attrs==23.1.0 | ||
# via mediapipe | ||
cffi==1.15.1 | ||
# via sounddevice | ||
contourpy==1.1.0 | ||
# via matplotlib | ||
cycler==0.11.0 | ||
# via matplotlib | ||
flatbuffers==23.5.26 | ||
# via mediapipe | ||
fonttools==4.40.0 | ||
# via matplotlib | ||
importlib-resources==5.12.0 | ||
# via matplotlib | ||
kiwisolver==1.4.4 | ||
# via matplotlib | ||
matplotlib==3.7.2 | ||
# via mediapipe | ||
mediapipe==0.10.1 | ||
# via sora-sdk-samples | ||
mypy==1.8.0 | ||
mypy-extensions==1.0.0 | ||
# via mypy | ||
numpy==1.24.4 | ||
# via contourpy | ||
# via matplotlib | ||
# via mediapipe | ||
# via opencv-contrib-python | ||
# via opencv-python | ||
# via opencv-python-headless | ||
opencv-contrib-python==4.8.0.74 | ||
# via mediapipe | ||
opencv-python==4.9.0.80 | ||
# via sora-sdk-samples | ||
opencv-python-headless==4.9.0.80 | ||
# via sora-sdk-samples | ||
packaging==23.1 | ||
# via matplotlib | ||
pillow==10.0.0 | ||
# via matplotlib | ||
protobuf==3.20.3 | ||
# via mediapipe | ||
pycparser==2.21 | ||
# via cffi | ||
pyparsing==3.0.9 | ||
# via matplotlib | ||
python-dateutil==2.8.2 | ||
# via matplotlib | ||
python-dotenv==1.0.1 | ||
# via sora-sdk-samples | ||
ruff==0.3.0 | ||
six==1.16.0 | ||
# via python-dateutil | ||
sora-sdk==2024.1.0 | ||
# via sora-sdk-samples | ||
sounddevice==0.4.6 | ||
# via mediapipe | ||
# via sora-sdk-samples | ||
tomli==2.0.1 | ||
# via mypy | ||
typing-extensions==4.10.0 | ||
# via mypy | ||
zipp==3.17.0 | ||
# via importlib-resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# generated by rye | ||
# use `rye lock` or `rye sync` to update this lockfile | ||
# | ||
# last locked with the following flags: | ||
# pre: false | ||
# features: [] | ||
# all-features: false | ||
# with-sources: false | ||
|
||
-e file:. | ||
absl-py==1.4.0 | ||
# via mediapipe | ||
attrs==23.1.0 | ||
# via mediapipe | ||
cffi==1.15.1 | ||
# via sounddevice | ||
contourpy==1.1.0 | ||
# via matplotlib | ||
cycler==0.11.0 | ||
# via matplotlib | ||
flatbuffers==23.5.26 | ||
# via mediapipe | ||
fonttools==4.40.0 | ||
# via matplotlib | ||
importlib-resources==5.12.0 | ||
# via matplotlib | ||
kiwisolver==1.4.4 | ||
# via matplotlib | ||
matplotlib==3.7.2 | ||
# via mediapipe | ||
mediapipe==0.10.1 | ||
# via sora-sdk-samples | ||
numpy==1.24.4 | ||
# via contourpy | ||
# via matplotlib | ||
# via mediapipe | ||
# via opencv-contrib-python | ||
# via opencv-python | ||
# via opencv-python-headless | ||
opencv-contrib-python==4.8.0.74 | ||
# via mediapipe | ||
opencv-python==4.9.0.80 | ||
# via sora-sdk-samples | ||
opencv-python-headless==4.9.0.80 | ||
# via sora-sdk-samples | ||
packaging==23.1 | ||
# via matplotlib | ||
pillow==10.0.0 | ||
# via matplotlib | ||
protobuf==3.20.3 | ||
# via mediapipe | ||
pycparser==2.21 | ||
# via cffi | ||
pyparsing==3.0.9 | ||
# via matplotlib | ||
python-dateutil==2.8.2 | ||
# via matplotlib | ||
python-dotenv==1.0.1 | ||
# via sora-sdk-samples | ||
six==1.16.0 | ||
# via python-dateutil | ||
sora-sdk==2024.1.0 | ||
# via sora-sdk-samples | ||
sounddevice==0.4.6 | ||
# via mediapipe | ||
# via sora-sdk-samples | ||
zipp==3.17.0 | ||
# via importlib-resources |
Empty file.
Oops, something went wrong.