feat(flet-audio-recorder): Add streaming and upload support to AudioRecorder#6423
Open
ndonkoHenri wants to merge 7 commits intorelease/v0.85.0from
Open
feat(flet-audio-recorder): Add streaming and upload support to AudioRecorder#6423ndonkoHenri wants to merge 7 commits intorelease/v0.85.0from
flet-audio-recorder): Add streaming and upload support to AudioRecorder#6423ndonkoHenri wants to merge 7 commits intorelease/v0.85.0from
Conversation
Deploying flet-website-v2 with
|
| Latest commit: |
dcbf3c6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cb95eebb.flet-website-v2.pages.dev |
| Branch Preview URL: | https://audiorec-stream-upload.flet-website-v2.pages.dev |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds PCM16 streaming and direct upload capabilities to the flet-audio-recorder service so web (and other) apps can access recorded audio bytes during recording instead of relying on Blob URLs returned by stop_recording().
Changes:
- Implemented streaming recording path in the Flutter service, with optional chunk forwarding to Python and/or chunked HTTP upload.
- Added new Python types/events (
AudioRecorderStreamEvent,AudioRecorderUploadEvent,AudioRecorderUploadSettings) and extendedAudioRecorder.start_recording()to support streaming/upload. - Expanded docs and examples to cover basic recording, streaming-to-Python, and streaming upload workflows.
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/sidebars.yml | Adds new AudioRecorder type docs to the YAML sidebar navigation. |
| website/sidebars.js | Adds new AudioRecorder type docs to the JS sidebar navigation. |
| website/docs/services/audiorecorder/types/audiorecorderuploadsettings.md | New API doc stub for AudioRecorderUploadSettings. |
| website/docs/services/audiorecorder/types/audiorecorderuploadevent.md | New API doc stub for AudioRecorderUploadEvent. |
| website/docs/services/audiorecorder/types/audiorecorderstreamevent.md | New API doc stub for AudioRecorderStreamEvent. |
| website/docs/services/audiorecorder/index.md | Updates service docs to include multiple examples and explain streaming/upload behavior on web. |
| sdk/python/packages/flet/src/flet/controls/material/snack_bar.py | Minor docstring formatting update for SnackBar example. |
| sdk/python/packages/flet-audio-recorder/src/flutter/flet_audio_recorder/pubspec.yaml | Adds http dependency required for chunked upload implementation. |
| sdk/python/packages/flet-audio-recorder/src/flutter/flet_audio_recorder/lib/src/audio_recorder.dart | Implements streaming recording session management, Python stream events, and chunked HTTP upload with progress/error events. |
| sdk/python/packages/flet-audio-recorder/src/flet_audio_recorder/types.py | Adds new stream/upload event dataclasses and AudioRecorderUploadSettings value type. |
| sdk/python/packages/flet-audio-recorder/src/flet_audio_recorder/audio_recorder.py | Extends Python API: new handlers, streaming/upload argument, PCM16 enforcement, updated docstrings. |
| sdk/python/packages/flet-audio-recorder/src/flet_audio_recorder/init.py | Exposes the new types/events from the package top-level. |
| sdk/python/packages/flet-audio-recorder/CHANGELOG.md | Documents the new streaming + upload features under 0.85.0. |
| sdk/python/examples/services/audio_recorder/upload/pyproject.toml | New example project metadata for streaming upload. |
| sdk/python/examples/services/audio_recorder/upload/main.py | New example demonstrating upload while recording with progress events. |
| sdk/python/examples/services/audio_recorder/stream/pyproject.toml | New example project metadata for streaming chunks to Python. |
| sdk/python/examples/services/audio_recorder/stream/main.py | New example demonstrating receiving PCM16 chunks and wrapping into WAV. |
| sdk/python/examples/services/audio_recorder/basic/pyproject.toml | Renames/retitles the “basic” example metadata to match updated docs. |
| sdk/python/examples/services/audio_recorder/basic/main.py | Adds/updates the basic recording example code referenced by docs. |
| client/pubspec.lock | Updates Flutter client lockfile (including flet version and transitive deps). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying flet-examples with
|
| Latest commit: |
dcbf3c6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9f4b86f3.flet-examples.pages.dev |
| Branch Preview URL: | https://audiorec-stream-upload.flet-examples.pages.dev |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5858
Adds PCM16 streaming support to
flet-audio-recorder.Will help web apps access recorded audio bytes directly instead of relying on browser-local Blob URLs.
Test Code
Summary by Sourcery
Add PCM16-based streaming and upload capabilities to AudioRecorder, enabling direct access to raw audio bytes and live HTTP uploads alongside traditional file recording.
New Features:
Enhancements:
Documentation:
Tests: