Modernization 202603: Update rodio to the official crate, update cpal and most dependencies#54
Merged
pragmatrix merged 9 commits intomasterfrom Mar 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Rust workspace by switching to the official rodio crate and updating cpal and a broad set of other dependencies, with accompanying code updates to match newer APIs (notably around audio playback and WebSocket message types).
Changes:
- Update audio stack dependencies (notably
rodio,cpal) and adapt playback code to newerNonZero*-based APIs. - Update WebSocket server code for newer
axumAPIs (listener tapping, message payload types) and minor protocol parsing refactors. - Bump crate versions to
2.0.0and refresh several dependency versions across services/examples.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/playback/src/lib.rs | Update rodio conversion/resampling call sites to NonZeroU16/NonZeroU32 and enforce non-zero output format fields. |
| services/playback/Cargo.toml | Bump bytes dependency. |
| services/openai-dialog/src/lib.rs | Import ordering cleanup and comment typo fix. |
| services/openai-dialog/Cargo.toml | Bump tokio-tungstenite version. |
| services/google-transcribe/src/lib.rs | Replace boxed interceptor closure with a tonic::service::Interceptor implementation. |
| filter-test/Cargo.toml | Bump fundsp version. |
| examples/openai-dialog.rs | Update rodio playback API usage and adjust format/sample-rate handling for newer cpal/rodio types. |
| examples/azure-translate.rs | Update rodio playback API usage; keep an output sink alive for Bluetooth headset profile switching; split input/output formats. |
| examples/azure-transcribe.rs | Keep output sink alive for Bluetooth headsets; improve error context for default input device; adjust sample rate handling. |
| examples/azure-synthesize.rs | Update rodio playback API usage and Source trait signature changes. |
| examples/azure-container.rs | Keep output sink alive for Bluetooth headsets; adjust sample rate handling. |
| examples/aristech-transcribe.rs | Keep output sink alive for Bluetooth headsets; adjust stream config/sample rate handling for newer cpal. |
| examples/aristech-synthesize.rs | Update rodio playback API usage and Source trait signature changes. |
| core/Cargo.toml | Bump context-switch-core version to 2.0.0. |
| audio-test/Cargo.toml | Bump tracing-subscriber and indicatif versions. |
| audio-knife/src/mod_audio_fork.rs | Adjust WebSocket message construction to new Message payload types. |
| audio-knife/src/main.rs | Update axum routing and server setup (per-connection TCP_NODELAY via listener tap); adjust WS ping/pong payload type handling; JSON decoding refactor. |
| audio-knife/Cargo.toml | Bump audio-knife version and update axum dependency. |
| Cargo.toml | Bump workspace crate version, rust-version, and many dependency versions; switch from local rodio submodule to crates.io. |
| .gitmodules | Remove rodio submodule and update openai submodule branch value. |
| .github/copilot-instructions.md | Add repository-specific coding/style instructions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Manual tests:
Google TranscribeNot Needed for now.