From 0c030a3a27e4c34409143261975fb3bd0e481fcb Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 25 Jan 2023 21:08:45 +0100 Subject: [PATCH] VcNarrator: Show all voices, better defaults --- src/plugins/vcNarrator.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugins/vcNarrator.tsx b/src/plugins/vcNarrator.tsx index a8558727..b2904ac8 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,