-
Notifications
You must be signed in to change notification settings - Fork 2.7k
add STT metrics for google #4599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds per-stream usage tracking to the Google STT plugin by introducing helper functions to extract audio duration and request IDs from streaming responses, then emits RECOGNITION_USAGE events. Also documents the audio_duration field in the STT base module. Changes
Sequence Diagram(s)sequenceDiagram
participant GCP as Google Cloud<br/>Speech API
participant Plugin as Google STT<br/>Plugin
participant Framework as Agent<br/>Framework
GCP->>Plugin: StreamingRecognizeResponse
Plugin->>Plugin: _get_audio_duration(response,<br/>last_usage_event_time)
Plugin->>Plugin: _get_request_id(response)
Plugin->>Plugin: Create SpeechEvent<br/>(type: RECOGNITION_USAGE)
Plugin->>Framework: Emit SpeechEvent<br/>(duration, request_id)
Plugin->>Plugin: Update last_usage_event_time
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2026-01-22T03:28:16.289ZApplied to files:
🧬 Code graph analysis (1)livekit-plugins/livekit-plugins-google/livekit/plugins/google/stt.py (1)
⏰ 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). (8)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting Comment |
This should close #4596
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.