-
Notifications
You must be signed in to change notification settings - Fork 11
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
add sweden and norway #179
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThe changes in this pull request include the addition of a new language mapping entry for Norwegian in the Changes
Possibly related PRs
Suggested labels
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #179 +/- ##
=====================================
Coverage ? 0.00%
=====================================
Files ? 10
Lines ? 877
Branches ? 0
=====================================
Hits ? 0
Misses ? 877
Partials ? 0 ☔ View full report in Codecov by Sentry. |
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: 3
🧹 Outside diff range and nitpick comments (6)
ovos_config/recommends/online_stt/da-dk.conf (1)
4-4
: Consider configuring a fallback STT module.The empty fallback module configuration might lead to degraded user experience if the primary STT module fails. Consider setting up a fallback module to ensure continuous operation.
Example configuration with a fallback:
"stt": { "module": "ovos-stt-plugin-server", - "fallback_module": "" + "fallback_module": "ovos-stt-plugin-vosk" }ovos_config/recommends/offline_male/da-dk.conf (1)
1-8
: Note: PR title doesn't reflect Danish configuration.The PR title mentions adding Sweden and Norway, but this file adds Danish (da-dk) configuration. Consider updating the PR title to accurately reflect all language additions.
ovos_config/recommends/offline_stt/da-dk.conf (1)
1-9
: Consider using a larger model and adding a fallback module for better reliability.While the configuration is well-structured, consider the following suggestions:
- The "small" model might not provide optimal accuracy for Danish speech recognition. Consider using "medium" or "large" if memory constraints allow.
- Having no fallback module (
"fallback_module": ""
) could impact reliability if the primary module fails.Consider updating the configuration:
{ "stt": { "module": "ovos-stt-plugin-fasterwhisper", - "fallback_module": "", + "fallback_module": "ovos-stt-plugin-vosk", "ovos-stt-plugin-fasterwhisper": { - "model": "small" + "model": "medium" } } }ovos_config/recommends/offline_stt/no-no.conf (2)
3-4
: Consider adding a fallback STT module for improved reliability.While the primary STT module is correctly specified, having no fallback module (
"fallback_module": ""
) might impact service reliability if the primary module fails.Consider adding a fallback module:
"stt": { "module": "ovos-stt-plugin-fasterwhisper", - "fallback_module": "", + "fallback_module": "ovos-stt-plugin-vosk",
5-7
: Consider specifying language code and reviewing model size for Norwegian.Two suggestions to enhance the FasterWhisper configuration:
- Add explicit language code to improve recognition accuracy
- Consider using a larger model for better accuracy with Norwegian language
Consider updating the configuration:
"ovos-stt-plugin-fasterwhisper": { - "model": "small" + "model": "medium", + "language": "no" }The "medium" model provides a better balance between accuracy and resource usage, especially important for languages like Norwegian that might not be as well-represented in the training data as English.
ovos_config/recommends/offline_stt/sv-se.conf (1)
4-4
: Consider adding a fallback STT module.Having no fallback module (
"fallback_module": ""
) could impact system reliability if the primary module fails. Consider adding a fallback module to ensure continuous operation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (15)
ovos_config/locale.py
(1 hunks)ovos_config/recommends/base/da-dk.conf
(1 hunks)ovos_config/recommends/base/no-no.conf
(1 hunks)ovos_config/recommends/base/sv-se.conf
(1 hunks)ovos_config/recommends/offline_male/da-dk.conf
(1 hunks)ovos_config/recommends/offline_male/no-no.conf
(1 hunks)ovos_config/recommends/offline_male/se-sv.conf
(1 hunks)ovos_config/recommends/offline_stt/da-dk.conf
(1 hunks)ovos_config/recommends/offline_stt/no-no.conf
(1 hunks)ovos_config/recommends/offline_stt/sv-se.conf
(1 hunks)ovos_config/recommends/online_male/da-dk.conf
(1 hunks)ovos_config/recommends/online_male/no-no.conf
(1 hunks)ovos_config/recommends/online_male/sv-se.conf
(1 hunks)ovos_config/recommends/online_stt/da-dk.conf
(1 hunks)ovos_config/recommends/online_stt/no-no.conf
(1 hunks)
✅ Files skipped from review due to trivial changes (8)
- ovos_config/recommends/base/da-dk.conf
- ovos_config/recommends/base/no-no.conf
- ovos_config/recommends/base/sv-se.conf
- ovos_config/recommends/offline_male/no-no.conf
- ovos_config/recommends/online_male/da-dk.conf
- ovos_config/recommends/online_male/no-no.conf
- ovos_config/recommends/online_male/sv-se.conf
- ovos_config/recommends/online_stt/no-no.conf
🔇 Additional comments (9)
ovos_config/recommends/online_stt/da-dk.conf (2)
1-6
: LGTM! The configuration structure is valid and well-formatted.
The JSON structure follows the expected format for STT configuration.
3-3
: Verify compatibility with Danish language.
Let's verify that the specified STT module supports Danish (da-dk) language processing.
ovos_config/recommends/offline_male/da-dk.conf (2)
1-8
: LGTM! Configuration structure is valid.
The JSON configuration follows the expected structure for TTS settings.
5-5
: Verify voice model compatibility with Danish language.
Please confirm that the nst_talesyntese-medium
voice model is appropriate for Danish TTS and provides good quality output.
ovos_config/recommends/offline_male/se-sv.conf (1)
1-8
: JSON structure looks good.
The configuration structure follows the expected pattern for TTS settings.
ovos_config/recommends/offline_stt/da-dk.conf (1)
1-9
: Verify the scope of this PR.
The PR title mentions adding support for Sweden and Norway, but this file configures Danish (da-dk) STT. Please clarify if Danish support is intentionally part of this PR's scope.
✅ Verification successful
Let me check the content of the Norwegian and Swedish config files to ensure they are similar to the Danish one and part of the same PR changes.
Danish STT config was added in a separate commit, but is related to the Nordic languages support
The git history shows that Danish support was added first in commit 1d5f22b
, followed by Norwegian and Swedish support in commit 2a42ade
. While the PR title only mentions Sweden and Norway, the Danish config is closely related as part of the Nordic languages support. All three configs use the same STT configuration with the FasterWhisper plugin.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if other Nordic language configs are present
# Expected: Should find no-no.conf and sv-se.conf
echo "Checking for Norwegian and Swedish configs..."
fd -e conf "no-no|sv-se" ovos_config/recommends/offline_stt/
echo -e "\nChecking commit message for context..."
git log -1 --pretty=%B
Length of output: 401
Script:
#!/bin/bash
# Check contents of Nordic language config files
echo "=== Content of Norwegian config ==="
cat ovos_config/recommends/offline_stt/no-no.conf
echo -e "\n=== Content of Swedish config ==="
cat ovos_config/recommends/offline_stt/sv-se.conf
# Check git changes to see if all three files were added in this PR
echo -e "\n=== Git changes for these files ==="
git log --oneline --stat -- ovos_config/recommends/offline_stt/da-dk.conf ovos_config/recommends/offline_stt/no-no.conf ovos_config/recommends/offline_stt/sv-se.conf
Length of output: 1155
ovos_config/recommends/offline_stt/no-no.conf (1)
1-9
: LGTM! Valid JSON structure and configuration hierarchy.
The configuration follows the expected format for OVOS STT settings.
ovos_config/recommends/offline_stt/sv-se.conf (2)
5-7
: Evaluate if "small" model is optimal for Swedish.
The "small" model might not provide the best accuracy for Swedish language processing. Consider testing with larger models (base, medium, or large) to find the optimal balance between performance and accuracy for Swedish language support.
#!/bin/bash
# Description: Check if other language configs use different model sizes
# Test: Search for model size configurations in other language configs
rg -A 2 '"model":' ovos_config/recommends/offline_stt/
3-3
: Verify Swedish language support in the plugin.
Let's confirm that ovos-stt-plugin-fasterwhisper
supports Swedish language processing.
{ | ||
"tts": { | ||
"module": "ovos-tts-plugin-piper", | ||
"ovos-tts-plugin-piper": { | ||
"voice": "nst_talesyntese-medium" | ||
} | ||
} | ||
} |
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.
Incorrect language code in filename.
The filename uses "se-sv" which is incorrect for Swedish. The ISO 639-1/ISO 3166-1 language code for Swedish (Sweden) should be "sv-SE". The file should be renamed accordingly.
Rename the file from se-sv.conf
to sv-SE.conf
.
"ovos-tts-plugin-piper": { | ||
"voice": "nst_talesyntese-medium" | ||
} |
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.
Inappropriate voice model for Swedish TTS.
The configuration uses "nst_talesyntese-medium" which appears to be a Norwegian voice model (NST = Norsk Språkteknologi). This is inappropriate for Swedish text-to-speech.
Please use an appropriate Swedish voice model. Common Swedish voices available in Piper include:
- "talesyntese_sv_se_nst-medium"
- "sv_se_nst_medium"
Example configuration:
"ovos-tts-plugin-piper": {
- "voice": "nst_talesyntese-medium"
+ "voice": "talesyntese_sv_se_nst-medium"
}
📝 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.
"ovos-tts-plugin-piper": { | |
"voice": "nst_talesyntese-medium" | |
} | |
"ovos-tts-plugin-piper": { | |
"voice": "talesyntese_sv_se_nst-medium" | |
} |
Summary by CodeRabbit
New Features
Chores