Conversation
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adjusts TTS configuration defaults from 165 to 150 and enhances audio preprocessing: adding sentence-silence control to Piper arguments, enforcing trailing punctuation on all text, and implementing long-number expansion for English voices. ChangesTTS Configuration & Preprocessing Enhancement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Web/Resgrid.Web.Tts/Services/AudioProcessingService.cs`:
- Around line 166-167: Update the three unit tests
(create_piper_start_info_should_build_correct_arguments,
create_piper_start_info_should_fallback_to_default_model_for_unmapped_languages,
create_piper_start_info_should_adjust_length_scale_for_speed) to reflect the new
Piper argument list by adding the two expected entries "--sentence-silence" and
"0.0" to the expected sequence used in the ArgumentList.Should().Equal(...)
assertions; ensure the new entries are inserted in the same relative position as
produced by AudioProcessingService.BuildPiperStartInfo (so the expected list now
includes --model, modelPath, --output_file, outPath, --length-scale, value,
--sentence-silence, "0.0").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3647835e-d7eb-4d28-935e-f270c96a50b7
📒 Files selected for processing (4)
Core/Resgrid.Config/TtsConfig.csWeb/Resgrid.Web.Tts/Configuration/TtsOptions.csWeb/Resgrid.Web.Tts/Services/AudioProcessingService.csWeb/Resgrid.Web.Tts/Services/TextPreprocessor.cs
| if (!string.Equals(original, result, StringComparison.Ordinal)) | ||
| { | ||
| _logger.LogDebug( | ||
| "TextPreprocessor normalised \"{OriginalText}\" to \"{NormalisedText}\"", | ||
| original, | ||
| result); | ||
| } |
There was a problem hiding this comment.
Avoid logging raw dispatch text in normalization debug logs.
This logs full pre/post message content, which can leak sensitive incident/person/location data into logs. Log only metadata (e.g., changed=true, lengths, hash) and use the project logging standard.
Proposed safe logging change
- if (!string.Equals(original, result, StringComparison.Ordinal))
- {
- _logger.LogDebug(
- "TextPreprocessor normalised \"{OriginalText}\" to \"{NormalisedText}\"",
- original,
- result);
- }
+ if (!string.Equals(original, result, StringComparison.Ordinal))
+ {
+ _logger.LogDebug(
+ "TextPreprocessor normalized text. OriginalLength={OriginalLength}, NormalizedLength={NormalizedLength}",
+ original.Length,
+ result.Length);
+ }As per coding guidelines: "Use Resgrid.Framework.Logging.LogException(), LogError(), LogInfo(), or LogDebug() for all logging throughout the codebase".
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (!string.Equals(original, result, StringComparison.Ordinal)) | |
| { | |
| _logger.LogDebug( | |
| "TextPreprocessor normalised \"{OriginalText}\" to \"{NormalisedText}\"", | |
| original, | |
| result); | |
| } | |
| if (!string.Equals(original, result, StringComparison.Ordinal)) | |
| { | |
| _logger.LogDebug( | |
| "TextPreprocessor normalized text. OriginalLength={OriginalLength}, NormalizedLength={NormalizedLength}", | |
| original.Length, | |
| result.Length); | |
| } |
| { | ||
| _logger.LogDebug( | ||
| "TextPreprocessor normalised \"{OriginalText}\" to \"{NormalisedText}\"", | ||
| original, |
|
Approve |
Summary by CodeRabbit