Skip to content

Commit 2c3bc45

Browse files
authored
Merge pull request #173 from GetStream/audio-more
More audio utils
2 parents 4b68c09 + abcc8c7 commit 2c3bc45

File tree

7 files changed

+1243
-559
lines changed

7 files changed

+1243
-559
lines changed

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Project setup
2+
3+
1. This project uses `uv`, `pyproject.toml` and venv to manage dependencies
4+
2. Never use pip directly, use `uv add` to add dependencies and `uv sync --dev --all-packages` to install the dependency
5+
3. Do not change code generated python code, `./generate.sh` is the script responsible of rebuilding all API endpoints and API models
6+
4. **WebRTC Dependencies**: All dependencies related to WebRTC, audio, video processing (like `aiortc`, `numpy`, `torch`, `torchaudio`, `soundfile`, `scipy`, `deepgram-sdk`, `elevenlabs`, etc.) are organized under the `webrtc` optional dependencies group. Plugins that work with audio, video, or WebRTC functionality should depend on `getstream[webrtc]` instead of just `getstream`.
7+
8+
## Python testing
9+
10+
1. pytest is used for testing
11+
2. use `uv run pytest` to run tests
12+
3. pytest preferences are stored in pytest.ini
13+
4. fixtures are used to inject objects in tests
14+
5. test using the Stream API client can use the fixture
15+
6. .env is used to load credentials, the client fixture will load credentials from there
16+
7. keep tests well organized and use test classes for similar tests
17+
8. tests that rely on file assets should always rely on files inside the `tests/assets/` folder, new files should be added there and existing ones used if possible. Do not use files larger than 256 kilobytes.
18+
9. do not use mocks or mock things in general unless you are asked to do that directly
19+
10. always run tests using `uv run pytest` from the root of the project, dont cd into folders to run tests

CLAUDE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Project setup
2+
3+
1. This project uses `uv`, `pyproject.toml` and venv to manage dependencies
4+
2. Never use pip directly, use `uv add` to add dependencies and `uv sync --dev --all-packages` to install the dependency
5+
3. Do not change code generated python code, `./generate.sh` is the script responsible of rebuilding all API endpoints and API models
6+
4. **WebRTC Dependencies**: All dependencies related to WebRTC, audio, video processing (like `aiortc`, `numpy`, `torch`, `torchaudio`, `soundfile`, `scipy`, `deepgram-sdk`, `elevenlabs`, etc.) are organized under the `webrtc` optional dependencies group. Plugins that work with audio, video, or WebRTC functionality should depend on `getstream[webrtc]` instead of just `getstream`.
7+
8+
## Python testing
9+
10+
1. pytest is used for testing
11+
2. use `uv run pytest` to run tests
12+
3. pytest preferences are stored in pytest.ini
13+
4. fixtures are used to inject objects in tests
14+
5. test using the Stream API client can use the fixture
15+
6. .env is used to load credentials, the client fixture will load credentials from there
16+
7. keep tests well organized and use test classes for similar tests
17+
8. tests that rely on file assets should always rely on files inside the `tests/assets/` folder, new files should be added there and existing ones used if possible. Do not use files larger than 256 kilobytes.
18+
9. do not use mocks or mock things in general unless you are asked to do that directly
19+
10. always run tests using `uv run pytest` from the root of the project, dont cd into folders to run tests

getstream/video/rtc/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
)
1717
from getstream.video.rtc.connection_utils import join_call_coordinator_request
1818
from getstream.video.rtc.connection_manager import ConnectionManager
19+
from getstream.video.rtc.audio_track import AudioStreamTrack
20+
from getstream.video.rtc.track_util import PcmData, Resampler, AudioFormat
1921

2022
logger = logging.getLogger(__name__)
2123

@@ -81,4 +83,8 @@ async def join(
8183
"Credentials",
8284
"join_call_coordinator_request",
8385
"discover_location",
86+
"PcmData",
87+
"Resampler",
88+
"AudioFormat",
89+
"AudioStreamTrack",
8490
]

0 commit comments

Comments
 (0)