Skip to content

Refactor STT adapters#2059

Merged
yujonglee merged 3 commits intomainfrom
refactor-adapters
Dec 2, 2025
Merged

Refactor STT adapters#2059
yujonglee merged 3 commits intomainfrom
refactor-adapters

Conversation

@yujonglee
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 1959d97
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692e7d5637e8630008a92e22
😎 Deploy Preview https://deploy-preview-2059--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

📝 Walkthrough

Walkthrough

Refactors STT adapter surface by separating realtime and batch concerns: renames SttAdapterRealtimeSttAdapter, adds BatchSttAdapter, splits adapters into module subfiles (deepgram, argmax, soniox), and updates clients/builders and plugin generics to use the new traits.

Changes

Cohort / File(s) Summary
Adapter core
owhisper/owhisper-client/src/adapter/mod.rs
Renamed SttAdapter to RealtimeSttAdapter, added methods (build_auth_header, keep_alive_message, finalize_message, initial_message, parse_response), and introduced new BatchSttAdapter trait with transcribe_file.
Deepgram adapter (split)
owhisper/owhisper-client/src/adapter/deepgram/mod.rs, .../deepgram/batch.rs, .../deepgram/live.rs, removed .../deepgram.rs
Replaced monolithic Deepgram file with module: mod.rs (adapter struct, URL/helpers, language/keyword query helpers), batch.rs (BatchSttAdapter impl, build_batch_url, do_transcribe_file, decode_audio_to_linear16), and live.rs (RealtimeSttAdapter impl, WS URL/auth/control messages, parse_response).
Argmax adapter
owhisper/owhisper-client/src/adapter/argmax/mod.rs, .../argmax/batch.rs, .../argmax/live.rs
Added ArgmaxAdapter (derive Clone, Default), PARAKEET_V3_LANGS, and adapt_params; implemented BatchSttAdapter in batch.rs delegating to inner adapter; live.rs implements realtime trait and had removal/adjustment of prior struct in that file.
Soniox adapter
owhisper/owhisper-client/src/adapter/soniox/mod.rs, .../soniox/batch.rs, .../soniox/live.rs
Added SonioxAdapter, default host constants, api_host/ws_host helpers; implemented BatchSttAdapter in batch.rs (file upload / transcription flow) and RealtimeSttAdapter in live.rs (WS handshake, parsing, transcript assembly).
Batch client & builders
owhisper/owhisper-client/src/batch.rs, .../lib.rs
BatchClient generic bound changed from SttAdapterBatchSttAdapter; ListenClientBuilder and builder APIs updated to use RealtimeSttAdapter, added conditional impl impl<A: RealtimeSttAdapter + BatchSttAdapter> exposing build_batch only when adapter supports both traits; public exports updated.
Live clients & usages
owhisper/owhisper-client/src/live.rs, plugins/listener/src/actors/listener.rs
Replaced generic bounds from SttAdapterRealtimeSttAdapter across ListenClient(s), websocket helpers, and plugin spawn functions; no core runtime logic changes beyond trait surface updates.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • Consistency of new trait method signatures and where they are required (clients, builders, plugins)
    • Batch audio decoding/resampling and error mapping in deepgram/batch.rs
    • Language/keyword query assembly across deepgram/argmax/soniox helpers
    • WebSocket URL, auth header, and control-message semantics in all live.rs implementations
    • Conditional builder impl (multi-trait) correctness and public exports

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.85% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the refactoring objectives, key changes (trait separation, new adapters), and migration notes for users.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Refactor STT adapters' directly describes the main change: a comprehensive refactor of speech-to-text adapter architecture, separating realtime and batch capabilities into distinct trait implementations.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor-adapters

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Dec 2, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 1959d97
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692e7d56559a710008f39375
😎 Deploy Preview https://deploy-preview-2059--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
owhisper/owhisper-client/src/adapter/soniox/mod.rs (1)

10-18: Consider returning Result instead of panicking on invalid URL.

Line 16 uses .expect("invalid_api_base") which will panic if the URL fails to parse. While empty strings are handled gracefully, a malformed non-empty URL will cause a runtime panic. Consider propagating the error or using a fallback.

-    pub(crate) fn api_host(api_base: &str) -> String {
+    pub(crate) fn api_host(api_base: &str) -> Result<String, url::ParseError> {
         if api_base.is_empty() {
-            return DEFAULT_API_HOST.to_string();
+            return Ok(DEFAULT_API_HOST.to_string());
         }
 
-        let url: url::Url = api_base.parse().expect("invalid_api_base");
-        url.host_str().unwrap_or(DEFAULT_API_HOST).to_string()
+        let url: url::Url = api_base.parse()?;
+        Ok(url.host_str().unwrap_or(DEFAULT_API_HOST).to_string())
     }

This would require updating callers to handle the Result, but provides better error handling than panicking.

owhisper/owhisper-client/src/adapter/argmax/live.rs (1)

45-75: Test relies on a local server and may be skipped in CI.

The test connects to ws://localhost:50060/v1 which requires a local Argmax server to be running. Consider adding #[ignore] attribute or gating behind a feature flag to prevent CI failures when the server is unavailable.

     #[tokio::test]
+    #[ignore] // Requires local Argmax server
     async fn test_client() {
owhisper/owhisper-client/src/adapter/deepgram/mod.rs (1)

14-27: Consider returning Result instead of panicking on invalid URL.

The expect("invalid_api_base") on line 16 will panic if api_base is not a valid URL. While this is a configuration error, panicking may be undesirable in library code. Consider returning a Result or validating earlier in the builder.

If changing the return type is not feasible now, this is acceptable for internal use where the caller controls the input.

owhisper/owhisper-client/src/lib.rs (1)

119-125: Consider consistent validation for api_key.

get_api_base() (line 60) panics if missing, but api_key silently defaults to an empty string here. For batch API calls, an empty API key will likely produce a cryptic authentication error from the remote service.

Consider adding a get_api_key() helper that panics (like get_api_base) or returns Result:

+    fn get_api_key(&self) -> &str {
+        self.api_key.as_ref().expect("api_key is required")
+    }
+}
+
 impl<A: RealtimeSttAdapter + BatchSttAdapter> ListenClientBuilder<A> {
     pub fn build_batch(self) -> BatchClient<A> {
         let params = self.get_params();
         let api_base = self.get_api_base().to_string();
-        BatchClient::new(api_base, self.api_key.unwrap_or_default(), params)
+        BatchClient::new(api_base, self.get_api_key().to_string(), params)
     }
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e837b16 and f421aa8.

📒 Files selected for processing (15)
  • owhisper/owhisper-client/src/adapter/argmax/batch.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/argmax/live.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/argmax/mod.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/deepgram.rs (0 hunks)
  • owhisper/owhisper-client/src/adapter/deepgram/batch.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/deepgram/live.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/deepgram/mod.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/mod.rs (2 hunks)
  • owhisper/owhisper-client/src/adapter/soniox/batch.rs (6 hunks)
  • owhisper/owhisper-client/src/adapter/soniox/live.rs (1 hunks)
  • owhisper/owhisper-client/src/adapter/soniox/mod.rs (1 hunks)
  • owhisper/owhisper-client/src/batch.rs (1 hunks)
  • owhisper/owhisper-client/src/lib.rs (4 hunks)
  • owhisper/owhisper-client/src/live.rs (5 hunks)
  • plugins/listener/src/actors/listener.rs (3 hunks)
💤 Files with no reviewable changes (1)
  • owhisper/owhisper-client/src/adapter/deepgram.rs
🧰 Additional context used
🧬 Code graph analysis (12)
owhisper/owhisper-client/src/adapter/argmax/batch.rs (6)
owhisper/owhisper-client/src/lib.rs (4)
  • adapter (50-57)
  • api_base (35-38)
  • api_key (40-43)
  • params (45-48)
owhisper/owhisper-client/src/adapter/soniox/batch.rs (1)
  • transcribe_file (329-341)
owhisper/owhisper-client/src/adapter/deepgram/batch.rs (1)
  • transcribe_file (12-24)
owhisper/owhisper-client/src/adapter/mod.rs (1)
  • transcribe_file (47-54)
owhisper/owhisper-client/src/batch.rs (1)
  • transcribe_file (31-45)
owhisper/owhisper-client/src/adapter/argmax.rs (1)
  • transcribe_file (39-49)
owhisper/owhisper-client/src/adapter/soniox/mod.rs (1)
owhisper/owhisper-client/src/lib.rs (1)
  • api_base (35-38)
owhisper/owhisper-client/src/batch.rs (1)
owhisper/owhisper-client/src/lib.rs (1)
  • adapter (50-57)
owhisper/owhisper-client/src/adapter/deepgram/batch.rs (1)
crates/audio-utils/src/lib.rs (3)
  • f32_to_i16_bytes (66-76)
  • resample_audio (171-220)
  • source_from_path (129-135)
owhisper/owhisper-client/src/live.rs (2)
owhisper/owhisper-client/src/adapter/argmax/live.rs (1)
  • ListenClientBuilder (58-66)
owhisper/owhisper-client/src/lib.rs (1)
  • adapter (50-57)
plugins/listener/src/actors/listener.rs (1)
plugins/listener2/src/ext.rs (1)
  • owhisper_client (156-157)
owhisper/owhisper-client/src/adapter/deepgram/mod.rs (2)
owhisper/owhisper-client/src/lib.rs (2)
  • api_base (35-38)
  • params (45-48)
crates/whisper-local/src/model/mod.rs (1)
  • language (26-28)
owhisper/owhisper-client/src/adapter/soniox/batch.rs (2)
owhisper/owhisper-client/src/lib.rs (3)
  • adapter (50-57)
  • api_base (35-38)
  • params (45-48)
owhisper/owhisper-client/src/adapter/soniox/mod.rs (1)
  • api_host (11-18)
owhisper/owhisper-client/src/adapter/argmax/live.rs (1)
owhisper/owhisper-client/src/lib.rs (1)
  • adapter (50-57)
owhisper/owhisper-client/src/adapter/deepgram/live.rs (2)
owhisper/owhisper-client/src/adapter/deepgram/mod.rs (3)
  • append_keyword_query (47-66)
  • append_language_query (68-100)
  • listen_endpoint_url (15-26)
owhisper/owhisper-client/src/adapter/mod.rs (6)
  • supports_native_multichannel (24-24)
  • build_ws_url (26-26)
  • build_auth_header (28-28)
  • keep_alive_message (30-30)
  • finalize_message (32-32)
  • parse_response (43-43)
owhisper/owhisper-client/src/adapter/soniox/live.rs (2)
owhisper/owhisper-client/src/adapter/mod.rs (7)
  • supports_native_multichannel (24-24)
  • build_ws_url (26-26)
  • build_auth_header (28-28)
  • keep_alive_message (30-30)
  • initial_message (34-41)
  • parse_response (43-43)
  • finalize_message (32-32)
owhisper/owhisper-client/src/adapter/soniox/mod.rs (1)
  • ws_host (20-28)
owhisper/owhisper-client/src/lib.rs (2)
owhisper/owhisper-client/src/adapter/argmax/live.rs (1)
  • ListenClientBuilder (58-66)
owhisper/owhisper-client/src/batch.rs (1)
  • new (21-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
  • GitHub Check: desktop_ci (macos, depot-macos-14)
🔇 Additional comments (39)
plugins/listener/src/actors/listener.rs (3)

7-9: Imports correctly aligned with new realtime STT adapter API

The import set (including RealtimeSttAdapter and the concrete adapters) matches the refactor away from SttAdapter and is consistent with how the adapters are used below.

Please ensure owhisper-client is updated in lockfile/Cargo.toml so that RealtimeSttAdapter and these adapters are available in the referenced version.


270-327: Generic bound change to RealtimeSttAdapter for single‑channel path looks correct

Switching the generic from the old adapter trait to RealtimeSttAdapter keeps the function’s behavior intact while matching the new ListenClient::builder().adapter::<A>() API; the rest of the connect/timeout/error‑handling logic is unchanged.

After updating the dependency, run cargo check to confirm all realtime adapters (Argmax/Deepgram/Soniox) implement RealtimeSttAdapter and this generic still infers cleanly from call sites.


329-386: Dual‑channel helper correctly updated to use RealtimeSttAdapter

The dual‑channel spawn helper now also constrains A by RealtimeSttAdapter, matching the single‑channel path and the builder().adapter::<A>().build_dual() usage; no functional changes to connection or stream processing.

Same as above, confirm via cargo check/tests that all dual‑capable adapters implement RealtimeSttAdapter and that build_dual() remains compatible with this trait.

owhisper/owhisper-client/src/adapter/argmax/batch.rs (1)

1-20: LGTM!

The BatchSttAdapter implementation for ArgmaxAdapter follows the delegation pattern consistently with other adapters in the codebase. The method signature matches the trait definition, and forwarding to self.inner.transcribe_file is appropriate for a wrapper adapter.

owhisper/owhisper-client/src/batch.rs (2)

7-20: LGTM!

The trait bound update from SttAdapter to BatchSttAdapter is consistent with the refactoring goals. The generic parameter correctly constrains the adapter type for batch operations.


31-45: The BatchSttAdapter trait includes Default as a supertrait (pub trait BatchSttAdapter: Clone + Default + Send + Sync + 'static). The code at line 35 correctly calls A::default() and will compile without issues.

owhisper/owhisper-client/src/adapter/soniox/mod.rs (1)

20-28: LGTM!

The ws_host derivation logic correctly transforms api.{domain} to stt-rt.{domain} with appropriate fallback to DEFAULT_WS_HOST when the pattern doesn't match.

owhisper/owhisper-client/src/adapter/soniox/batch.rs (6)

11-12: LGTM!

The import changes correctly reference the new module structure with SonioxAdapter from the parent module and BatchSttAdapter from the crate-level adapter module.


42-42: URL construction updated consistently.

The URL format now uses Self::api_host(api_base) which aligns with the new helper method pattern. Note that if the api_host method is refactored to return Result (as suggested in mod.rs), this and other URL constructions will need error propagation.


100-109: LGTM!

The inline derivation of language_hints from params.languages is clean and straightforward. The ISO639 code extraction correctly maps the language objects to their string representations.


151-154: LGTM!

URL construction pattern is consistent with other methods in this file.


251-254: LGTM!

URL construction pattern is consistent.


328-341: LGTM!

The BatchSttAdapter implementation correctly converts the generic path to PathBuf to satisfy lifetime requirements, and uses Box::pin with an async block to create the BatchFuture. This pattern is consistent with other adapter implementations like DeepgramAdapter.

owhisper/owhisper-client/src/live.rs (5)

12-12: LGTM!

Import correctly updated to use RealtimeSttAdapter from the crate root.


17-29: LGTM!

Both ListenClient and ListenClientDual struct definitions correctly updated to use RealtimeSttAdapter trait bound, maintaining consistency with the refactored adapter architecture.


184-184: LGTM!

The impl block bound correctly updated to RealtimeSttAdapter.


222-222: LGTM!

The ListenClientDual impl block bound correctly updated to RealtimeSttAdapter.


369-387: LGTM!

Both helper functions websocket_client_with_keep_alive and extract_finalize_text correctly updated to use RealtimeSttAdapter bound. The logic remains unchanged, only the trait constraint is updated to match the renamed trait.

owhisper/owhisper-client/src/adapter/argmax/live.rs (1)

5-33: LGTM!

The RealtimeSttAdapter implementation cleanly delegates to the inner DeepgramAdapter while applying argmax-specific parameter adaptation via Self::adapt_params. The delegation pattern is appropriate for this wrapper adapter.

owhisper/owhisper-client/src/adapter/argmax/mod.rs (3)

8-11: LGTM!

The language constant is well-organized and covers the documented Parakeet v3 supported languages.


13-16: LGTM!

Clean struct definition with appropriate derives. The inner DeepgramAdapter composition enables delegation while allowing Argmax-specific behavior.


18-43: LGTM!

The adapt_params logic correctly handles model-specific language selection:

  • Parakeet v2: English-only
  • Parakeet v3: First supported language or English fallback
  • Other models: First language or English fallback

The function always returns a single-language vector, which aligns with the adapter's purpose.

owhisper/owhisper-client/src/adapter/soniox/live.rs (4)

11-20: LGTM!

The WebSocket URL construction correctly uses the ws_host helper and builds a valid wss URL for the Soniox transcription endpoint.


30-74: LGTM!

The initial_message implementation properly constructs the Soniox configuration with appropriate defaults and optional fields. The early return with a warning for missing API keys is a reasonable approach.


76-101: Good error handling and token filtering.

The response parsing correctly handles error messages, filters out control tokens (<fin>, <end>), and returns None for empty non-final responses. The logging for parse failures and errors is helpful for debugging.


204-221: LGTM!

The SpeakerId enum with #[serde(untagged)] elegantly handles both numeric and string speaker IDs from the Soniox API. The as_i32 helper correctly extracts numeric values from either variant.

owhisper/owhisper-client/src/adapter/deepgram/live.rs (2)

8-55: LGTM!

The WebSocket URL construction is comprehensive, properly handling:

  • Language and keyword query parameters via helper functions
  • Multiple transcription options (diarization, punctuation, smart format, etc.)
  • Scheme selection (ws vs wss) based on host for local development

57-80: LGTM!

The auth header, keep-alive, finalize, and parse methods are correctly implemented. Using owhisper_interface::ControlMessage for serialization ensures consistency with the protocol.

owhisper/owhisper-client/src/adapter/deepgram/mod.rs (4)

8-12: LGTM!

The language constants and adapter struct are cleanly defined. The multi-language arrays match Deepgram's documented capabilities for Nova-2 and Nova-3 models.


29-45: LGTM!

The can_use_multi logic correctly validates that:

  1. At least 2 languages are provided
  2. The model supports multi-language (nova-2 or nova-3)
  3. All requested languages are in the model's supported set

47-66: LGTM!

The keyword query construction correctly distinguishes between keyterm (for nova-3/parakeet) and keywords (for other models) based on Deepgram's API requirements.


68-100: LGTM!

The language query construction handles all cases appropriately:

  • 0 languages: enable auto-detection
  • 1 language: set explicit language
  • Multiple languages: use multi-language mode if supported, otherwise auto-detection with hints
owhisper/owhisper-client/src/adapter/deepgram/batch.rs (4)

1-9: LGTM!

Imports are well-organized and appropriately scoped for the batch transcription functionality.


11-25: LGTM!

Clean trait implementation that delegates to the internal async method while properly converting the file path to owned PathBuf.


83-100: LGTM!

HTTP request construction with proper auth header, content-type negotiation, and error handling is well-implemented.


104-141: LGTM!

The audio decoding logic correctly handles:

  • Blocking I/O via spawn_blocking
  • Multi-channel to mono conversion with proper averaging
  • Empty samples validation
  • Error propagation with descriptive messages

Note: resample_audio(decoder, sample_rate) with matching input/output rates is a no-op per the implementation, which is fine for format conversion purposes.

owhisper/owhisper-client/src/adapter/mod.rs (1)

21-55: Clean trait separation.

Good refactoring that clearly separates realtime streaming (RealtimeSttAdapter) from batch transcription (BatchSttAdapter) capabilities. The consistent trait bounds (Clone + Default + Send + Sync + 'static) and the BatchFuture type alias make the API ergonomic.

owhisper/owhisper-client/src/lib.rs (2)

8-10: LGTM!

Clean public API surface exposing both adapter traits alongside the concrete adapter implementations.


16-16: LGTM!

Trait bound updates from SttAdapter to RealtimeSttAdapter are consistent across the builder struct and impl blocks.

Also applies to: 34-34, 50-50

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
owhisper/owhisper-client/src/adapter/deepgram/live.rs (1)

90-91: Add #[ignore] attribute for CI compatibility.

The test requires DEEPGRAM_API_KEY environment variable and external API access. It will panic in CI environments where the key isn't set. This was suggested in a previous review.

     #[tokio::test]
+    #[ignore] // Requires DEEPGRAM_API_KEY environment variable
     async fn test_client() {
🧹 Nitpick comments (2)
owhisper/owhisper-client/src/adapter/deepgram/live.rs (2)

27-37: Consider making configurable query parameters part of ListenParams.

Several query parameters are hardcoded (e.g., filler_words, interim_results, diarize, punctuate). If these need to be customizable per-client, consider adding them to ListenParams. This is fine as-is if these defaults are intentional for all use cases.


130-132: Consider explicit handling or logging for non-transcript responses.

Empty match arms silently discard errors and other response types. If debugging is needed later, consider at minimum a debug log statement.

-                    _ => {}
+                    other => {
+                        tracing::debug!("Received non-transcript response: {:?}", other);
+                    }
                 },
-                _ => {}
+                Err(e) => {
+                    tracing::warn!("Stream error: {:?}", e);
+                }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f421aa8 and 1959d97.

📒 Files selected for processing (1)
  • owhisper/owhisper-client/src/adapter/deepgram/live.rs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
owhisper/owhisper-client/src/adapter/deepgram/live.rs (2)
owhisper/owhisper-client/src/adapter/deepgram/mod.rs (1)
  • listen_endpoint_url (15-26)
owhisper/owhisper-client/src/adapter/mod.rs (6)
  • supports_native_multichannel (24-24)
  • build_ws_url (26-26)
  • build_auth_header (28-28)
  • keep_alive_message (30-30)
  • finalize_message (32-32)
  • parse_response (43-43)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: desktop_ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: desktop_ci (macos, depot-macos-14)
  • GitHub Check: desktop_ci (linux, depot-ubuntu-22.04-8)
  • GitHub Check: fmt
  • GitHub Check: Pages changed - hyprnote
🔇 Additional comments (3)
owhisper/owhisper-client/src/adapter/deepgram/live.rs (3)

57-59: LGTM!

The Deepgram authentication header format is correct.


61-75: LGTM!

The keep-alive and finalize message implementations correctly serialize control messages. The unwrap() calls are safe since these are simple, infallible enum serializations.


77-79: LGTM!

Using .ok() appropriately handles non-transcript WebSocket messages that won't parse as StreamResponse.

@yujonglee yujonglee merged commit 2d7101e into main Dec 2, 2025
16 checks passed
@yujonglee yujonglee deleted the refactor-adapters branch December 2, 2025 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments