Repository navigation
fix(room-setup): name voice services still to set up in the AI voice warning - #1447
KushalMohith18 wants to merge 2 commits into
Conversation
…warning The warning for a language no configured voice service can speak said that none of the event's voice services can speak it, which hides that a service without a key yet (for example ElevenLabs for Thai) can. The setup now knows which locked voice services speak each language and names them, with a pointer to add the key. Languages no known service speaks keep a plain message. Closes fossasia#1443
Reviewer's GuideData structuresExtend the engine catalog with the missing-key voice providers and their language support so setup can identify which service could enable a language.
Uses of the APIPass the locked-provider support data into the warning helper and use its result in room setup.
UIExpose the locked voice-provider support catalog to the room setup page as a data attribute.
ConfigurationAdd the new voice-fit module syntax check and test to the CI workflow.
TestsVerify that the catalog reports language support for locked voice providers and clears it when all relevant keys are configured.
Cover voice-warning behavior for configured, missing-key, and unsupported providers, including the no-service case.
Other changesFiles not grouped.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Hi @KushalMohith18, thanks for your contribution! Before we can review this PR, please add a short screencast video showing the change working (before/after where relevant). If no video is added within 72 hours, this PR will be closed automatically. You are welcome to reopen it or submit a new PR once you have the screencast. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Linked issuesChecked at commit 5a682db #1443 Incorrect AI Voice Availability Warning for Languages Supported by External Providers · 3 of 3 met
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="portal/static/js/room-setup.js" line_range="105" />
<code_context>
return `${chosen.label} can't speak ${name}. Choose AI captions, or switch the voice to ${others[0].label} under AI services in the review step.`;
}
- return `AI voice isn't supported for ${name} yet. None of this event's voice services can speak it. Choose AI captions so listeners can read ${name}, or Interpreter.`;
+ const addable = Object.keys(lockedVoiceSupport).filter((brand) => lockedVoiceSupport[brand].includes(code));
+ if (addable.length) {
+ return `AI voice for ${name} isn't supported by the voice services set up for this event. ${listNames(addable)} can speak ${name}: add ${addable.length > 1 ? 'a key' : 'its key'} on the event's API keys page. Until then, choose AI captions so listeners can read ${name}, or Interpreter.`;
</code_context>
<issue_to_address>
**Users get the wrong voice setup advice**
When no voice engines are available and the selected language is supported by a locked provider, `voiceProblem` returns from its no-engines branch before checking `lockedVoiceSupport`, so users are told to add a Deepgram key even when Deepgram cannot speak the selected language and another locked provider can. Users receive misleading setup instructions.
Check `lockedVoiceSupport` before returning from the no-engines branch and give the matching provider and API-key guidance.
</issue_to_address>
### Comment 2
<location path="portal/static/js/room-setup.js" line_range="107" />
<code_context>
- return `AI voice isn't supported for ${name} yet. None of this event's voice services can speak it. Choose AI captions so listeners can read ${name}, or Interpreter.`;
+ const addable = Object.keys(lockedVoiceSupport).filter((brand) => lockedVoiceSupport[brand].includes(code));
+ if (addable.length) {
+ return `AI voice for ${name} isn't supported by the voice services set up for this event. ${listNames(addable)} can speak ${name}: add ${addable.length > 1 ? 'a key' : 'its key'} on the event's API keys page. Until then, choose AI captions so listeners can read ${name}, or Interpreter.`;
+ }
+ return `AI voice isn't supported for ${name} yet. None of the voice services this server offers can speak it. Choose AI captions so listeners can read ${name}, or Interpreter.`;
</code_context>
<issue_to_address>
**New warning behavior goes untested**
When the warning's provider selection or message regresses, the new warning branch has no test exercising its provider selection or user-facing message, so a regression that omits the missing service or API-key guidance leaves the suite green and the feature broken.
Add a test that exercises the new warning behavior, including the missing-service name and API-key guidance.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: portal/static/js/room-setup.js:105, portal/static/js/room-setup.js:107
… test the warning With no voice service set up, the warning always told the owner to add a Deepgram key, even when only another service (for example ElevenLabs for Thai) speaks the language. The warning logic moves to voice-fit.js, which now names the services that speak the language in that case too, and tests/test_voice_fit.mjs covers each branch. CI runs the new test and a syntax check.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thank you @KushalMohith18 for adding a screencast! The |
|
CI note: The failure is in the floor-bot image build: I do not have permission to re-run workflows. Could a maintainer re-run the failed jobs? |
Description
The AI voice warning for a language that none of the event's configured voice services can speak said "None of this event's voice services can speak it". That hides the fact that a service the event has no key for yet (for example ElevenLabs for Thai) can speak it. The room setup now knows which voice services still need a key and which languages each speaks, and names them in the warning with a pointer to the API keys page. A language that no known service speaks keeps a plain message.
Related Issue
Closes #1443
Changes Made
EngineCatalogrecords the voice services the event has no key for (locked_voice) and exposeslocked_voice_support(languages per service, by brand name).room_setup.htmlpasses it to the page asdata-locked-voice-support.room-setup.jsuses it to name the services that can speak the language, e.g. "ElevenLabs can speak Thai: add its key on the event's API keys page".locked_voice_support.Testing
Reproduced on
devin a local run: with a Deepgram key set, choosing Thai + AI voice showed "None of this event's voice services can speak it". On this branch, Thai and Hindi now say that ElevenLabs can speak them and how to add it.uv run pytest tests/: 3797 passed, 18 skipped;ruff checkclean)Before (
dev): on a test event with one voice service set up, choosing Thai with AI voice says "None of this event's voice services can speak it". That hides that ElevenLabs can speak Thai once its key is added.1443-before.mp4
After: same steps, the warning says ElevenLabs can speak Thai and points to the API keys page.
1443-after.mp4
Checklist
Additional Notes
The case where no known service speaks a language is not reachable from the current language list, so it is covered by code only.
Created with Claude Sonnet 5.5 in Claude Code.
Summary by Sourcery
Tell room setup users which unconfigured voice services can support their selected language and how to enable them.
New Features:
Bug Fixes:
Enhancements:
CI:
Tests:
Summary by CodeRabbit