Skip to content

feat(speech): generate bidi streaming methods and add integration test - #6477

Merged
suzmue merged 7 commits into
googleapis:mainfrom
suzmue:speech-v2-bidi
Aug 27, 2026
Merged

feat(speech): generate bidi streaming methods and add integration test#6477
suzmue merged 7 commits into
googleapis:mainfrom
suzmue:speech-v2-bidi

Conversation

@suzmue

@suzmue suzmue commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Enable bidirectional streaming support for Google Cloud Speech v2 by setting include_bidi_streaming_methods: true in librarian.yaml 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".

@product-auto-label product-auto-label Bot added the api: speech Issues related to the Speech-to-Text API. label Aug 19, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tests/integration/src/speech.rs Outdated
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.51%. Comparing base (5940a1b) to head (552fbec).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6477      +/-   ##
==========================================
- Coverage   96.51%   96.51%   -0.01%     
==========================================
  Files         304      304              
  Lines       87943    87943              
==========================================
- Hits        84881    84875       -6     
- Misses       3062     3068       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suzmue
suzmue force-pushed the speech-v2-bidi branch 3 times, most recently from ed1a2a9 to 83fc6d9 Compare August 20, 2026 18:15

@coryan coryan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by


<!-- Code generated by sidekick. DO NOT EDIT. -->

**WARNING:** some RPCs have no corresponding Rust function to call them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Comment thread tests/integration/src/lib.rs Outdated
// limitations under the License.

pub mod error_details;
#[cfg(google_cloud_unstable_gapic_streaming)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in the README and using a #[cfg()] to get all the features is slightly odd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Release went out, preparing to submit this and then have a follow up with removing #[cfg()]

Comment thread tests/integration/tests/driver.rs Outdated
suzmue added 2 commits August 26, 2026 22:04
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".
@suzmue
suzmue marked this pull request as ready for review August 27, 2026 17:01
@suzmue
suzmue requested review from a team as code owners August 27, 2026 17:01
@suzmue
suzmue enabled auto-merge (squash) August 27, 2026 17:18
@suzmue
suzmue merged commit 1feb484 into googleapis:main Aug 27, 2026
42 checks passed
@suzmue
suzmue deleted the speech-v2-bidi branch August 27, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: speech Issues related to the Speech-to-Text API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants