From 33a704981e110b5ec5a2ea6098f298dca1afe636 Mon Sep 17 00:00:00 2001 From: Lucas Fialho Zawacki Date: Wed, 10 Apr 2024 11:33:10 -0300 Subject: [PATCH 1/4] feat(captions): Remove speechVoices check before transcription --- .../audio/captions/button/component.jsx | 2 +- .../audio/captions/select/component.jsx | 2 +- .../components/audio/captions/speech/service.js | 15 +-------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx index 65c1a0fc1a..beff71abe2 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx @@ -133,7 +133,7 @@ const CaptionsButton = ({ availableVoices.map((availableVoice) => ( { icon: '', - label: intl.formatMessage(intlMessages[availableVoice]), + label: intlMessages[availableVoice] ? intl.formatMessage(intlMessages[availableVoice]) : availableVoice, key: availableVoice, iconRight: selectedLocale.current === availableVoice ? 'check' : null, customStyles: (selectedLocale.current === availableVoice) && Styled.SelectedLabel, diff --git a/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx index 0d92090653..0ac175f3de 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx @@ -122,7 +122,7 @@ const Select = ({ key={v} value={v} > - {intl.formatMessage(intlMessages[v])} + {intlMessages[v] ? intl.formatMessage(intlMessages[v]) : v} ))} diff --git a/bigbluebutton-html5/imports/ui/components/audio/captions/speech/service.js b/bigbluebutton-html5/imports/ui/components/audio/captions/speech/service.js index 66750d1078..ac9e948774 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/captions/speech/service.js +++ b/bigbluebutton-html5/imports/ui/components/audio/captions/speech/service.js @@ -23,20 +23,8 @@ const hasSpeechRecognitionSupport = () => typeof SpeechRecognitionAPI !== 'undef && typeof window.speechSynthesis !== 'undefined' && VALID_ENVIRONMENT; -const setSpeechVoices = () => { - if (!hasSpeechRecognitionSupport()) return; - - Session.set('speechVoices', unique(window.speechSynthesis.getVoices().map((v) => v.lang))); -}; - -// Trigger getVoices -setSpeechVoices(); - const getSpeechVoices = () => { - if (!isWebSpeechApi()) return LANGUAGES; - - const voices = Session.get('speechVoices') || []; - return voices.filter((v) => LANGUAGES.includes(v)); + return LANGUAGES; }; const getSpeechProvider = () => { @@ -79,7 +67,6 @@ const initSpeechRecognition = () => { if (hasSpeechRecognitionSupport()) { // Effectivate getVoices - setSpeechVoices(); const speechRecognition = new SpeechRecognitionAPI(); speechRecognition.continuous = true; speechRecognition.interimResults = true; From f1bad0257da3d52597de8178c1b1048079f0ea45 Mon Sep 17 00:00:00 2001 From: Lucas Fialho Zawacki Date: Wed, 10 Apr 2024 13:49:15 -0300 Subject: [PATCH 2/4] feat(transcription): Add translation strings for ca-ES and documentation links --- .../imports/ui/components/audio/captions/button/component.jsx | 4 ++++ .../imports/ui/components/audio/captions/select/component.jsx | 4 ++++ bigbluebutton-html5/private/config/settings.yml | 4 ++++ bigbluebutton-html5/public/locales/en.json | 3 ++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx index beff71abe2..55f39288c2 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/captions/button/component.jsx @@ -54,6 +54,10 @@ const intlMessages = defineMessages({ id: 'app.audio.captions.select.es-ES', description: 'Audio speech recognition spanish language', }, + 'ca-ES': { + id: 'app.audio.captions.select.ca-ES', + description: 'Audio speech recognition catalan language', + }, 'fr-FR': { id: 'app.audio.captions.select.fr-FR', description: 'Audio speech recognition french language', diff --git a/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx index 0ac175f3de..43bcb8e07a 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/captions/select/component.jsx @@ -20,6 +20,10 @@ const intlMessages = defineMessages({ id: 'app.audio.captions.speech.unsupported', description: 'Audio speech recognition unsupported', }, + 'ca-ES': { + id: 'app.audio.captions.select.ca-ES', + description: 'Audio speech recognition catalan language', + }, 'de-DE': { id: 'app.audio.captions.select.de-DE', description: 'Audio speech recognition german language', diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index b0cfe66ec3..abd47dfbc2 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -95,7 +95,11 @@ public: # provider: [webspeech, vosk, gladia] provider: webspeech language: + # Available languages will depend on the transcription service + # Google: https://cloud.google.com/speech-to-text/docs/speech-to-text-supported-languages?hl=pt-br + # Gladia: https://docs-v1.gladia.io/reference/supported-languages available: + # - ca-ES # - de-DE - en-US - es-ES diff --git a/bigbluebutton-html5/public/locales/en.json b/bigbluebutton-html5/public/locales/en.json index db7c8b94e2..54ef8aea68 100755 --- a/bigbluebutton-html5/public/locales/en.json +++ b/bigbluebutton-html5/public/locales/en.json @@ -527,7 +527,6 @@ "app.submenu.application.localeDropdown.az": "Azerbaijani", "app.submenu.application.localeDropdown.bg-BG": "Bulgarian", "app.submenu.application.localeDropdown.bn": "Bengali", - "app.submenu.application.localeDropdown.ca": "Catalan", "app.submenu.application.localeDropdown.cs-CZ": "Czech", "app.submenu.application.localeDropdown.da": "Danish", "app.submenu.application.localeDropdown.de": "German", @@ -539,6 +538,7 @@ "app.submenu.application.localeDropdown.es-419": "Spanish (Latin America)", "app.submenu.application.localeDropdown.es-ES": "Spanish (Spain)", "app.submenu.application.localeDropdown.es-MX": "Spanish (Mexico)", + "app.submenu.application.localeDropdown.ca-ES": "Catalan (Spain)", "app.submenu.application.localeDropdown.et": "Estonian", "app.submenu.application.localeDropdown.eu": "Basque", "app.submenu.application.localeDropdown.fa-IR": "Persian", @@ -790,6 +790,7 @@ "app.audio.captions.speech.disabled": "Disabled", "app.audio.captions.speech.auto": "Auto Detect", "app.audio.captions.speech.unsupported": "Your browser doesn't support speech recognition. Your audio won't be transcribed", + "app.audio.captions.select.ca-ES": "Catalan", "app.audio.captions.select.de-DE": "German", "app.audio.captions.select.en-US": "English", "app.audio.captions.select.es-ES": "Spanish", From 9676afceaf1eb9492334aeb7217f87fa658e5437 Mon Sep 17 00:00:00 2001 From: Lucas Fialho Zawacki Date: Thu, 11 Apr 2024 16:39:30 -0300 Subject: [PATCH 3/4] feat(transcription): Bump bbb-transcription-controller --- bbb-transcription-controller.placeholder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bbb-transcription-controller.placeholder.sh b/bbb-transcription-controller.placeholder.sh index 136d4a7c28..c68a6bb4e4 100755 --- a/bbb-transcription-controller.placeholder.sh +++ b/bbb-transcription-controller.placeholder.sh @@ -1 +1 @@ -git clone --branch v0.2.3 --depth 1 https://github.com/bigbluebutton/bbb-transcription-controller bbb-transcription-controller +git clone --branch v0.2.5 --depth 1 https://github.com/bigbluebutton/bbb-transcription-controller bbb-transcription-controller From 3c2d89280b1888a9551308eb5835867665e9b71e Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Fri, 19 Apr 2024 11:24:32 -0400 Subject: [PATCH 4/4] Update bigbluebutton-html5/private/config/settings.yml --- bigbluebutton-html5/private/config/settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index abd47dfbc2..4897154c24 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -96,7 +96,7 @@ public: provider: webspeech language: # Available languages will depend on the transcription service - # Google: https://cloud.google.com/speech-to-text/docs/speech-to-text-supported-languages?hl=pt-br + # Google: https://cloud.google.com/speech-to-text/docs/speech-to-text-supported-languages # Gladia: https://docs-v1.gladia.io/reference/supported-languages available: # - ca-ES