-
Notifications
You must be signed in to change notification settings - Fork 3
add text processor for data channel #15
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
Conversation
ea04dfa
to
4241b16
Compare
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.
Pull Request Overview
This pull request adds comprehensive text frame processing capabilities to the PyTrickle pipeline, enabling text data to be processed and published alongside audio and video streams. The changes implement text publishing functionality for processing workflows like transcription services.
- Introduces text frame processing infrastructure with
TextFrame
andTextOutput
classes - Adds text publishing capabilities to processing functions through a
publish_text
parameter - Implements robust frame caching and fallback mechanisms for improved reliability
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
pytrickle/frames.py | Adds import for time module (minor addition) |
pytrickle/frame_processor.py | Adds async text publishing method and timing reset hook |
pytrickle/stream_processor.py | Adds text publishing support and validation for processor functions |
pytrickle/client.py | Implements comprehensive frame caching and fallback logic with text publishing |
examples/requirements.txt | Adds scipy dependency for audio processing examples |
examples/process_video_with_text.py | New example demonstrating text publishing with passthrough processing |
examples/process_audio_example.py | New example showing advanced audio effects processing |
.vscode/launch.json | Adds debug configurations for new examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
0aa44de
to
3325d99
Compare
@@ -0,0 +1,121 @@ | |||
#!/usr/bin/env python3 |
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.
lets rename this example to video_to_text or something similar
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.
This example counts audio frames and publishes some basic stats to the data publisher to demonstrate text publishing. Should we name it text_output_example.py
?
pytrickle/frame_processor.py
Outdated
Args: | ||
text: Text data to publish (usually JSONL format) | ||
""" | ||
pass # Default implementation does nothing |
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.
planning to implement in this PR?
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.
Removed in version in favor of a shared text_queue for publishing outputs
d0669dd
to
54b7e8c
Compare
471179c
to
29c042f
Compare
ea8b41f
to
5b24aee
Compare
fc8d4ff
to
49f1736
Compare
This pull request adds support for text frame processing and publishing throughout the PyTrickle pipeline. It introduces new
TextFrame
andTextOutput
classes, enables text processing in the core client and stream processor, and ensures text data can be handled, processed, and published similarly to audio and video. The changes also include robust fallback and caching logic for frame processing, and update protocol and logging to handle the new text frame type.Text frame and output support:
TextFrame
andTextOutput
classes to represent and handle text data (e.g., for transcription workflows) inframes.py
. [1] [2]client.py
,protocol.py
, andstream_processor.py
to includeTextFrame
andTextOutput
. [1] [2] [3]Text processing pipeline integration:
FrameProcessor
and its async processing methods to support text frames, including a newprocess_text_with_fallback
method for robust text handling. [1] [2]StreamProcessor
to accept atext_processor
function, validate at least one processor is provided, and process text frames in the internal processor. [1] [2] [3] [4] [5]Client and protocol logic updates:
Frame caching and fallback improvements:
FrameProcessor
to improve robustness in case of processing failures.These changes collectively enable robust, efficient, and extensible support for text data in the PyTrickle streaming and processing pipeline.