-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
๐๏ธ fix: Improve Frontend Practices for Audio Settings #3624
Conversation
@berry-13 it's a mistake how we are currently managing speech on the frontend. The current design is trying to account for all providers along with speech-to-text AND text-to-speech into singular logic, and through many abstracted values/hooks. It's very unclear what's what and leads to many unexpected behaviors. Ideally, each setting, STT and TTS, has their own components, and each provider (external, edge, browser) also has their own components for audio, and from there they use their own respective hooks. |
I've patched up some of the bugs between this PR and #3627 created from managing tts/tts/edge/browser/external this way, but then it should not create this many warnings (firefox only) This is indicative of bad design, and I'd rather remove msedge completely to avoid these issues, not to mention the npm vulnerabilities it creates npm audit
# npm audit report
axios >=1.3.2
Severity: high
Server-Side Request Forgery in axios - https://github.com/advisories/GHSA-8hc4-vh64-cxmj
fix available via `npm audit fix --force`
Will install axios@1.3.1, which is a breaking change
node_modules/axios
msedge-tts >=1.2.0
Depends on vulnerable versions of axios
Depends on vulnerable versions of crypto-browserify
node_modules/msedge-tts |
I'm also starting to see these errors on chrome:
|
* refactor: do not call await inside useCallbacks, rely on updates for dropdown * fix: remember last selected voice * refactor: Update Speech component to use TypeScript in useCallback * refactor: Update Dropdown component styles to match header theme
* refactor: do not call await inside useCallbacks, rely on updates for dropdown * fix: remember last selected voice * refactor: Update Speech component to use TypeScript in useCallback * refactor: Update Dropdown component styles to match header theme
Summary
Closes #3622
Testing:
I thoroughly tested the changes by manually interacting with the audio settings in the application. I verified that voice selection, speech generation, and playback work as expected across different browsers and scenarios. Additionally, I ensured that the UI updates correctly when changing audio settings.
To test these changes: