diff options
author | Vendicated <vendicated@riseup.net> | 2023-01-25 21:08:45 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-01-25 21:08:45 +0100 |
commit | 0c030a3a27e4c34409143261975fb3bd0e481fcb (patch) | |
tree | a942cc935f794bdc17d60014eadc2b76c87f89f2 /src | |
parent | 49aacccc1955f5e15aadec2242000384b3fe499d (diff) | |
download | Vencord-0c030a3a27e4c34409143261975fb3bd0e481fcb.tar.gz Vencord-0c030a3a27e4c34409143261975fb3bd0e481fcb.tar.bz2 Vencord-0c030a3a27e4c34409143261975fb3bd0e481fcb.zip |
VcNarrator: Show all voices, better defaults
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/vcNarrator.tsx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/vcNarrator.tsx b/src/plugins/vcNarrator.tsx index a855872..b2904ac 100644 --- a/src/plugins/vcNarrator.tsx +++ b/src/plugins/vcNarrator.tsx @@ -41,12 +41,6 @@ const VoiceStateStore = findByPropsLazy("getVoiceStatesForChannel", "getCurrentC // Filtering out events is not as simple as just dropping duplicates, as otherwise mute, unmute, mute would // not say the second mute, which would lead you to believe they're unmuted -function getEnglishVoices() { - const voices = speechSynthesis.getVoices(); - const englishVoices = voices.filter(v => v.lang.startsWith("en")); - return !englishVoices.length ? voices : englishVoices; -} - function speak(text: string, settings: any = Settings.plugins.VcNarrator) { if (!text) return; @@ -219,7 +213,7 @@ export default definePlugin({ voice: { type: OptionType.SELECT, description: "Narrator Voice", - options: getEnglishVoices().map(v => ({ + options: speechSynthesis.getVoices().map(v => ({ label: v.name, value: v.voiceURI, default: v.default @@ -242,12 +236,12 @@ export default definePlugin({ joinMessage: { type: OptionType.STRING, description: "Join Message", - default: "{{USER}} joined {{CHANNEL}}" + default: "{{USER}} joined" }, leaveMessage: { type: OptionType.STRING, description: "Leave Message", - default: "{{USER}} left {{CHANNEL}}" + default: "{{USER}} left" }, moveMessage: { type: OptionType.STRING, |