sora-sdk 2025.4.0.dev2__cp313-cp313-macosx_14_0_arm64.whl → 2025.5.0.dev10__cp313-cp313-macosx_14_0_arm64.whl

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.
@@ -4,12 +4,16 @@ from .sora_sdk_ext import * # noqa: F401,F403
4
4
  # 開発環境の場合は VERSION ファイルから取得
5
5
  try:
6
6
  from importlib.metadata import version, PackageNotFoundError
7
+
7
8
  try:
8
9
  __version__ = version("sora_sdk")
9
10
  except PackageNotFoundError:
10
11
  # パッケージがインストールされていない場合(開発環境)
11
12
  import os
12
- _version_file = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "VERSION")
13
+
14
+ _version_file = os.path.join(
15
+ os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "VERSION"
16
+ )
13
17
  if os.path.exists(_version_file):
14
18
  with open(_version_file, "r") as f:
15
19
  __version__ = f.read().strip()
@@ -2,7 +2,8 @@ from collections.abc import Callable, Sequence
2
2
  import enum
3
3
  from typing import Annotated, overload
4
4
 
5
- from numpy.typing import ArrayLike
5
+ import numpy
6
+ from numpy.typing import NDArray
6
7
 
7
8
 
8
9
  class SoraSignalingErrorCode(enum.IntEnum):
@@ -92,20 +93,20 @@ class SoraAudioSource(SoraTrackInterface):
92
93
  def on_data(self, data: int, samples_per_channel: int) -> None: ...
93
94
 
94
95
  @overload
95
- def on_data(self, ndarray: Annotated[ArrayLike, dict(dtype='int16', shape=(None, None), order='C', device='cpu')], timestamp: float) -> None: ...
96
+ def on_data(self, ndarray: Annotated[NDArray[numpy.int16], dict(shape=(None, None), order='C', device='cpu')], timestamp: float) -> None: ...
96
97
 
97
98
  @overload
98
- def on_data(self, ndarray: Annotated[ArrayLike, dict(dtype='int16', shape=(None, None), order='C', device='cpu')]) -> None: ...
99
+ def on_data(self, ndarray: Annotated[NDArray[numpy.int16], dict(shape=(None, None), order='C', device='cpu')]) -> None: ...
99
100
 
100
101
  class SoraVideoSource(SoraTrackInterface):
101
102
  @overload
102
- def on_captured(self, ndarray: Annotated[ArrayLike, dict(dtype='uint8', shape=(None, None, 3), order='C', device='cpu')]) -> None: ...
103
+ def on_captured(self, ndarray: Annotated[NDArray[numpy.uint8], dict(shape=(None, None, 3), order='C', device='cpu')]) -> None: ...
103
104
 
104
105
  @overload
105
- def on_captured(self, ndarray: Annotated[ArrayLike, dict(dtype='uint8', shape=(None, None, 3), order='C', device='cpu')], timestamp: float) -> None: ...
106
+ def on_captured(self, ndarray: Annotated[NDArray[numpy.uint8], dict(shape=(None, None, 3), order='C', device='cpu')], timestamp: float) -> None: ...
106
107
 
107
108
  @overload
108
- def on_captured(self, ndarray: Annotated[ArrayLike, dict(dtype='uint8', shape=(None, None, 3), order='C', device='cpu')], timestamp_us: int) -> None: ...
109
+ def on_captured(self, ndarray: Annotated[NDArray[numpy.uint8], dict(shape=(None, None, 3), order='C', device='cpu')], timestamp_us: int) -> None: ...
109
110
 
110
111
  class SoraAudioSinkImpl:
111
112
  def __init__(self, track: SoraTrackInterface, output_frequency: int = -1, output_channels: int = 0) -> None: ...
@@ -115,10 +116,10 @@ class SoraAudioSinkImpl:
115
116
  def read(self, frames: int = 0, timeout: float = 1) -> tuple: ...
116
117
 
117
118
  @property
118
- def on_data(self) -> Callable[[Annotated[ArrayLike, dict(dtype='int16', shape=(None, None))]], None]: ...
119
+ def on_data(self) -> Callable[[Annotated[NDArray[numpy.int16], dict(shape=(None, None))]], None]: ...
119
120
 
120
121
  @on_data.setter
121
- def on_data(self, arg: Callable[[Annotated[ArrayLike, dict(dtype='int16', shape=(None, None))]], None], /) -> None: ...
122
+ def on_data(self, arg: Callable[[Annotated[NDArray[numpy.int16], dict(shape=(None, None))]], None], /) -> None: ...
122
123
 
123
124
  @property
124
125
  def on_format(self) -> Callable[[int, int], None]: ...
@@ -143,7 +144,7 @@ class SoraAudioFrame:
143
144
  @property
144
145
  def absolute_capture_timestamp_ms(self) -> int | None: ...
145
146
 
146
- def data(self) -> Annotated[ArrayLike, dict(dtype='int16', shape=(None, None))]: ...
147
+ def data(self) -> Annotated[NDArray[numpy.int16], dict(shape=(None, None))]: ...
147
148
 
148
149
  class SoraAudioStreamSinkImpl:
149
150
  def __init__(self, track: SoraTrackInterface, output_frequency: int = -1, output_channels: int = 0) -> None: ...
@@ -162,7 +163,7 @@ class SoraVAD:
162
163
  def analyze(self, frame: SoraAudioFrame) -> float: ...
163
164
 
164
165
  class SoraVideoFrame:
165
- def data(self) -> Annotated[ArrayLike, dict(dtype='uint8', shape=(None, None, 3))]: ...
166
+ def data(self) -> Annotated[NDArray[numpy.uint8], dict(shape=(None, None, 3))]: ...
166
167
 
167
168
  class SoraVideoSinkImpl:
168
169
  def __init__(self, arg: SoraTrackInterface, /) -> None: ...
@@ -258,9 +259,9 @@ class SoraTransformableFrameDirection(enum.IntEnum):
258
259
  SENDER = 2
259
260
 
260
261
  class SoraTransformableFrame:
261
- def get_data(self) -> Annotated[ArrayLike, dict(dtype='uint8', shape=(None), writable=False)]: ...
262
+ def get_data(self) -> Annotated[NDArray[numpy.uint8], dict(shape=(None,), writable=False)]: ...
262
263
 
263
- def set_data(self, arg: Annotated[ArrayLike, dict(dtype='uint8', shape=(None), order='C', device='cpu', writable=False)], /) -> None: ...
264
+ def set_data(self, arg: Annotated[NDArray[numpy.uint8], dict(shape=(None,), order='C', device='cpu', writable=False)], /) -> None: ...
264
265
 
265
266
  @property
266
267
  def payload_type(self) -> int: ...
@@ -289,7 +290,7 @@ class SoraTransformableAudioFrameType(enum.IntEnum):
289
290
 
290
291
  class SoraTransformableAudioFrame(SoraTransformableFrame):
291
292
  @property
292
- def contributing_sources(self) -> Annotated[ArrayLike, dict(dtype='uint32', shape=(None), writable=False)]: ...
293
+ def contributing_sources(self) -> Annotated[NDArray[numpy.uint32], dict(shape=(None,), writable=False)]: ...
293
294
 
294
295
  @property
295
296
  def sequence_number(self) -> int | None: ...
@@ -314,7 +315,7 @@ class SoraTransformableVideoFrame(SoraTransformableFrame):
314
315
  def frame_id(self) -> int | None: ...
315
316
 
316
317
  @property
317
- def frame_dependencies(self) -> Annotated[ArrayLike, dict(dtype='int64', shape=(None), writable=False)]: ...
318
+ def frame_dependencies(self) -> Annotated[NDArray[numpy.int64], dict(shape=(None,), writable=False)]: ...
318
319
 
319
320
  @property
320
321
  def width(self) -> int: ...
@@ -329,7 +330,7 @@ class SoraTransformableVideoFrame(SoraTransformableFrame):
329
330
  def temporal_index(self) -> int: ...
330
331
 
331
332
  @property
332
- def contributing_sources(self) -> Annotated[ArrayLike, dict(dtype='uint32', shape=(None), writable=False)]: ...
333
+ def contributing_sources(self) -> Annotated[NDArray[numpy.uint32], dict(shape=(None,), writable=False)]: ...
333
334
 
334
335
  class SoraFrameTransformer:
335
336
  def enqueue(self, arg: SoraTransformableFrame, /) -> None: ...
@@ -369,6 +370,8 @@ class SoraVideoCodecImplementation(enum.IntEnum):
369
370
 
370
371
  AMD_AMF = 4
371
372
 
373
+ RASPI_V4L2M2M = 5
374
+
372
375
  class SoraVideoCodecType(enum.IntEnum):
373
376
  VP8 = 1
374
377
 
@@ -489,10 +492,12 @@ class SoraVideoCodecPreference:
489
492
  def create_video_codec_preference_from_implementation(arg0: SoraVideoCodecCapability, arg1: SoraVideoCodecImplementation, /) -> SoraVideoCodecPreference: ...
490
493
 
491
494
  class Sora:
492
- def __init__(self, openh264: str | None = None, video_codec_preference: SoraVideoCodecPreference | None = None) -> None: ...
495
+ def __init__(self, openh264: str | None = None, video_codec_preference: SoraVideoCodecPreference | None = None, force_i420_conversion: bool | None = None) -> None: ...
493
496
 
494
497
  def create_connection(self, signaling_urls: list[str], role: str, channel_id: str, client_id: Optional[str] = None, bundle_id: Optional[str] = None, metadata: Optional[dict] = None, signaling_notify_metadata: Optional[dict] = None, audio_source: Optional[SoraTrackInterface] = None, video_source: Optional[SoraTrackInterface] = None, audio_frame_transformer: Optional[SoraAudioFrameTransformer] = None, video_frame_transformer: Optional[SoraVideoFrameTransformer] = None, audio: Optional[bool] = None, video: Optional[bool] = None, audio_codec_type: Optional[str] = None, video_codec_type: Optional[str] = None, video_bit_rate: Optional[int] = None, audio_bit_rate: Optional[int] = None, video_vp9_params: Optional[dict] = None, video_av1_params: Optional[dict] = None, video_h264_params: Optional[dict] = None, audio_opus_params: Optional[dict] = None, simulcast: Optional[bool] = None, spotlight: Optional[bool] = None, spotlight_number: Optional[int] = None, simulcast_rid: Optional[str] = None, spotlight_focus_rid: Optional[str] = None, spotlight_unfocus_rid: Optional[str] = None, forwarding_filter: Optional[dict] = None, forwarding_filters: Optional[list[dict]] = None, data_channels: Optional[list[dict]] = None, data_channel_signaling: Optional[bool] = None, ignore_disconnect_websocket: Optional[bool] = None, data_channel_signaling_timeout: Optional[int] = None, disconnect_wait_timeout: Optional[int] = None, websocket_close_timeout: Optional[int] = None, websocket_connection_timeout: Optional[int] = None, audio_streaming_language_code: Optional[str] = None, insecure: Optional[bool] = None, client_cert: Optional[bytes] = None, client_key: Optional[bytes] = None, ca_cert: Optional[bytes] = None, proxy_url: Optional[str] = None, proxy_username: Optional[str] = None, proxy_password: Optional[str] = None, proxy_agent: Optional[str] = None, degradation_preference: Optional[SoraDegradationPreference] = None, user_agent: Optional[str] = None) -> SoraConnection: ...
495
498
 
496
499
  def create_audio_source(self, channels: int, sample_rate: int) -> SoraAudioSource: ...
497
500
 
498
501
  def create_video_source(self) -> SoraVideoSource: ...
502
+
503
+ def create_libcamera_source(self, width: int, height: int, fps: int, native_frame_output: bool, controls: Optional[list[tuple[str, str]]] = None) -> SoraTrackInterface: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sora_sdk
3
- Version: 2025.4.0.dev2
3
+ Version: 2025.5.0.dev10
4
4
  Summary: WebRTC SFU Sora Python SDK
5
5
  Home-page: https://github.com/shiguredo/sora-python-sdk
6
6
  Author-email: "Shiguredo Inc." <contact+pypi@shiguredo.jp>
@@ -12,6 +12,11 @@ Classifier: Programming Language :: Python :: 3 :: Only
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: C++
17
+ Classifier: Operating System :: MacOS :: MacOS X
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Operating System :: Microsoft :: Windows
15
20
  Requires-Python: >=3.11
16
21
  Description-Content-Type: text/markdown
17
22
  License-File: LICENSE
@@ -24,6 +29,7 @@ Dynamic: license-file
24
29
  [![image](https://img.shields.io/pypi/pyversions/sora_sdk.svg)](https://pypi.python.org/pypi/sora_sdk)
25
30
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
26
31
  [![Actions status](https://github.com/shiguredo/sora-python-sdk/workflows/build/badge.svg)](https://github.com/shiguredo/sora-python-sdk/actions)
32
+ [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?logo=discord&logoColor=white)](https://discord.gg/shiguredo)
27
33
 
28
34
  Sora Python SDK は [WebRTC SFU Sora](https://sora.shiguredo.jp/) の Python クライアントアプリケーションを開発するためのライブラリです。[Sora C++ SDK](https://github.com/shiguredo/sora-cpp-sdk) をベースにしています。
29
35
 
@@ -45,15 +51,19 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
45
51
 
46
52
  ## 特徴
47
53
 
54
+ - PyPI 経由で `uv add sora-sdk` や `pip install sora-sdk` でインストールできる
55
+ - Raspberry Pi 向けパッケージ `sora-sdk-rpi` の提供
56
+ - `uv add sora-sdk-rpi` でインストールできる
57
+ - Raspberry Pi 向けに libcamera 用の `create_libcamera_source` を提供
48
58
  - [Sora C++ SDK](https://github.com/shiguredo/sora-cpp-sdk) ベース
49
59
  - WebRTC 部分の機能は [libwebrtc](https://webrtc.googlesource.com/src/) を採用
50
- - Windows / macOS / Linux (Ubuntu) プラットフォームに対応
60
+ - Windows / macOS / Linux (Ubuntu / Raspberry Pi OS) プラットフォームに対応
51
61
  - [WebRTC 統計情報](https://www.w3.org/TR/webrtc-stats/) の取得が可能
52
62
  - [WebRTC Encoded Transform](https://www.w3.org/TR/webrtc-encoded-transform/) に対応
53
63
  - 回線が不安定になった際、解像度とフレームレートどちらを維持するかの設定をする [DegradationPreference](https://w3c.github.io/mst-content-hint/#degradation-preference-when-encoding) に対応
54
- - MAINTAIN_FRAMERATE / MAINTAIN_RESOLUTION / BALANCED が指定できる
64
+ - `MAINTAIN_FRAMERATE` / `MAINTAIN_RESOLUTION` / `BALANCED` が指定できる
55
65
  - 発話区間の検出が可能な VAD (Voice Activity Detection) に対応
56
- - Intel / Apple / NVIDIA のハードウェアデコーダー/エンコーダーに対応
66
+ - Intel / Apple / NVIDIA / Raspberry Pi のハードウェアデコーダー/エンコーダーに対応
57
67
  - Apple Video Toolbox (H.264 / H.265)
58
68
  - macOS arm64 で利用できる
59
69
  - Intel VPL (AV1 / H.264 / H.265)
@@ -62,10 +72,13 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
62
72
  - Ubuntu x86_64 / Windows x86_64 で利用できる
63
73
  - AV1 エンコードは Windows x86_64 でのみ利用できる
64
74
  - VP9 はデコードのみ利用できる
65
- - NVIDIA Video Codec SDK (VP8 / VP9 / AV1 / H.264 / H.265)
75
+ - NVIDIA Video Codec (VP8 / VP9 / AV1 / H.264 / H.265)
66
76
  - Ubuntu x86_64 / Windows x86_64 で利用できる
67
77
  - VP8 と VP9 はデコードのみ利用できる
68
78
  - NVIDIA Jetson JetPack SDK (AV1 / H.264 / H.265)
79
+ - Raspberry Pi (H.264)
80
+ - Raspberry Pi 4 / Raspberry Pi 3 / Raspberry Pi 2 Model B v1.2 / Raspberry Pi Zero 2 W で利用できる
81
+ - V4L2-M2M API を利用している
69
82
  - [各プラットフォームで利用可能な HWA への対応](https://github.com/shiguredo/sora-cpp-sdk?tab=readme-ov-file#%E7%89%B9%E5%BE%B4)
70
83
  - [OpenH264](https://github.com/cisco/openh264) を利用した H.264 のソフトウェアエンコーダー/デコーダーに対応
71
84
  - Ubuntu x86_64 / Ubuntu arm64 / Windows x86_64 / macOS arm64 で利用できる
@@ -73,7 +86,6 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
73
86
  - 映像デバイス処理に [opencv-python](https://pypi.org/project/opencv-python/) などが利用できる
74
87
  - 音声認識などの入力に受信した音声を利用できる
75
88
  - 物体検出などの入力に受信した映像を利用できる
76
- - `uv add sora_sdk` や `pip install sora_sdk` でインストール可能
77
89
  - [NVIDIA Jetson JetPack SDK](https://developer.nvidia.com/embedded/jetpack) に対応
78
90
 
79
91
  ## 利用イメージ
@@ -99,6 +111,12 @@ Please read <https://github.com/shiguredo/oss/blob/master/README.en.md> before u
99
111
  uv add sora_sdk
100
112
  ```
101
113
 
114
+ ### Raspberry Pi OS 向けパッケージ
115
+
116
+ ```bash
117
+ uv add sora_sdk_rpi
118
+ ```
119
+
102
120
  ### NVIDIA Jetson 向けパッケージ
103
121
 
104
122
  PyPI 経由ではインストールできません。
@@ -125,8 +143,23 @@ PyPI 経由ではインストールできません。
125
143
  - macOS Ventura 14 arm64
126
144
  - Windows 11 x86_64
127
145
  - Windows Server 2025 x86_64
146
+ - Raspberry Pi OS armv8
147
+
148
+ ### Raspberry Pi OS 向け
149
+
150
+ - Raspberry Pi OS bookworm (64bit)
151
+ - Raspberry Pi 5
152
+ - Raspberry Pi 4
153
+ - Raspberry Pi 3
154
+ - Raspberry Pi 2 Model B v1.2
155
+ - Raspberry Pi Zero 2 W
156
+
157
+ > [!CAUTION]
158
+ >
159
+ > - Raspberry Pi 5 は H.264 ハードウェアエンコーダーが搭載されていません
160
+ > - Raspberry Pi 5 の H.265 ハードウェアデコーダーに対応していません
128
161
 
129
- ### Jetson 向け
162
+ ### NVIDIA Jetson 向け
130
163
 
131
164
  - Ubuntu 22.04 LTS arm64 (NVIDIA Jetson JetPack SDK 6)
132
165
  - PyPI からではなくパッケージファイルを利用してください
@@ -0,0 +1,9 @@
1
+ sora_sdk-2025.5.0.dev10.data/purelib/sora_sdk/__init__.py,sha256=oIPJZylpxilyawkPEH8yjPEZ5wV-wdFnwL1DWH5Ksm0,2004
2
+ sora_sdk-2025.5.0.dev10.data/purelib/sora_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ sora_sdk-2025.5.0.dev10.data/purelib/sora_sdk/sora_sdk_ext.cpython-313-darwin.so,sha256=4T8m-Z5cDNoDvG-ccmG3bqeMMSgpiMykkKgvjPJmw1U,15578320
4
+ sora_sdk-2025.5.0.dev10.data/purelib/sora_sdk/sora_sdk_ext.pyi,sha256=_vSuS0PNtNbqGtVCtYEAPeAqziYMn0vWWJJ1RGISVL0,15785
5
+ sora_sdk-2025.5.0.dev10.dist-info/licenses/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
6
+ sora_sdk-2025.5.0.dev10.dist-info/METADATA,sha256=hgwpdxPAAVHtBH5ZUxuk56L-psQ-ueuogqs3aLbp7zU,10975
7
+ sora_sdk-2025.5.0.dev10.dist-info/WHEEL,sha256=Onw47UEeGv7DGzYSNjFwOJcXCqgdT35azkpS3HKVq7A,109
8
+ sora_sdk-2025.5.0.dev10.dist-info/top_level.txt,sha256=edTg20cFFAjWfRrB0APD_SXho5Qq24PwLESbyPoCVko,9
9
+ sora_sdk-2025.5.0.dev10.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- sora_sdk-2025.4.0.dev2.data/purelib/sora_sdk/__init__.py,sha256=giBkmLzMIZEVHV8_0Yuh_zqBR80ZRu2ZhOkjrtx1aeM,1980
2
- sora_sdk-2025.4.0.dev2.data/purelib/sora_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- sora_sdk-2025.4.0.dev2.data/purelib/sora_sdk/sora_sdk_ext.cpython-313-darwin.so,sha256=WY4HxqrF-UZct220xEH9R9WATgt7M3K7ICwkxM0M1Y0,15516080
4
- sora_sdk-2025.4.0.dev2.data/purelib/sora_sdk/sora_sdk_ext.pyi,sha256=vmEPy2J0PDUz4LP378pQc1-Az6BnE-mqOCL5PhEQTnE,15581
5
- sora_sdk-2025.4.0.dev2.dist-info/licenses/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
6
- sora_sdk-2025.4.0.dev2.dist-info/METADATA,sha256=JY0wVHBpPW-SxvwwzU48KFTOaApP0Jmm5asCuRYoxLs,9695
7
- sora_sdk-2025.4.0.dev2.dist-info/WHEEL,sha256=Onw47UEeGv7DGzYSNjFwOJcXCqgdT35azkpS3HKVq7A,109
8
- sora_sdk-2025.4.0.dev2.dist-info/top_level.txt,sha256=edTg20cFFAjWfRrB0APD_SXho5Qq24PwLESbyPoCVko,9
9
- sora_sdk-2025.4.0.dev2.dist-info/RECORD,,