-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(azure/stt): TrueText post processing option added to STTOptions #4557
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 a boolean Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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). (1)
✏️ Tip: You can disable this entire section by setting Comment |
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/stt.py (1)
407-413: Use the correct PropertyId enum:SpeechServiceResponse_PostProcessingOptioninstead ofPostProcessingOption.The enum
speechsdk.enums.PropertyId.PostProcessingOptiondoes not exist in the Azure Speech SDK (1.43.0+). The correct enum name isSpeechServiceResponse_PostProcessingOption(ID: 4003). The current code will raise anAttributeErrorat runtime.Fix
- speech_config.set_property(speechsdk.enums.PropertyId.PostProcessingOption, "TrueText") + speech_config.set_property( + speechsdk.enums.PropertyId.SpeechServiceResponse_PostProcessingOption, + "TrueText", + )
🧹 Nitpick comments (1)
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/stt.py (1)
83-102: Document the new option in the constructor docstring.The new public parameter isn’t described yet, which makes the API harder to discover.
📌 Suggested docstring update
@@ Args: phrase_list: List of words or phrases to boost recognition accuracy. Azure will give higher priority to these phrases during recognition. explicit_punctuation: Controls punctuation behavior. If True, enables explicit punctuation mode where punctuation marks are added explicitly. If False (default), uses Azure's default punctuation behavior. + true_text_post_processing: Enables Azure "TrueText" post-processing in the recognition result.As per coding guidelines, maintain Google-style docstrings for public APIs.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/stt.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings
Files:
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/stt.py
⏰ 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). (3)
- GitHub Check: type-check (3.13)
- GitHub Check: type-check (3.9)
- GitHub Check: unit-tests
🔇 Additional comments (2)
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/stt.py (2)
41-62: LGTM: default-off option is sensible.The new
true_text_post_processingfield is a safe, backward-compatible addition.
141-157: LGTM: option is correctly propagated into STTOptions.Wiring looks consistent with the other options.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
fcd3953 to
f4346aa
Compare
|
Hi @chenghao-mou , can you have a look at the MR? Thank you in advance :) |
https://learn.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/propertyid?view=azure-node-latest
SpeechServiceResponse_PostProcessingOption = 39 | A string value specifying which post processing option should be used by service. Allowed values are "TrueText". Added in version 1.7.0
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.