feat(speech): generate bidi streaming methods and add integration test - #6477
feat(speech): generate bidi streaming methods and add integration test#6477suzmue wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables bidirectional streaming for the google-cloud-speech-v2 crate, adding generated prost models, conversion helpers, and the streaming_recognize client method. It also introduces an integration test to verify the streaming functionality. The feedback recommends optimizing the integration test by using Bytes::slice to stream audio chunks without copying data, thereby avoiding unnecessary allocations.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6477 +/- ##
==========================================
- Coverage 96.38% 96.38% -0.01%
==========================================
Files 298 298
Lines 84328 84328
==========================================
- Hits 81283 81281 -2
- Misses 3045 3047 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ffda18b to
9a1b9da
Compare
Enable bidirectional streaming support for Google Cloud Speech v2 by setting include_bidi_streaming_methods: true in librarian.yaml, updating the librarian version, and regenerating the crate. Add a live integration test for Speech::streaming_recognize() that streams 4KB chunks from the public hello.wav sample, verifies bidirectional streaming lifecycle and half-closing, and validates that the transcribed text contains "hello".
|
|
||
| <!-- Code generated by sidekick. DO NOT EDIT. --> | ||
|
|
||
| **WARNING:** some RPCs have no corresponding Rust function to call them. |
| // limitations under the License. | ||
|
|
||
| pub mod error_details; | ||
| #[cfg(google_cloud_unstable_gapic_streaming)] |
There was a problem hiding this comment.
The changes in the README and using a #[cfg()] to get all the features is slightly odd.
There was a problem hiding this comment.
I agree 100%.
I plan to hold onto this change until after the release, so we don't make the README updates and will then have the config flags removed before the release that makes those updates.
| .await | ||
| .inspect_err(anydump) | ||
| } | ||
|
|
There was a problem hiding this comment.
Please create a separate tests/* directory for the bidi streaming tests? I would rather not pile up the dependencies even more.
Enable bidirectional streaming support for Google Cloud Speech v2 by setting
include_bidi_streaming_methods: trueinlibrarian.yamland regenerating the crate.Add a live integration test for
Speech::streaming_recognize()that streams 4KB chunks from the publichello.wavsample, verifies bidirectional streaming lifecycle and half-closing, and validates that the transcribed text contains "hello".