Merge pull request #19987 from lfzawacki/v2.7.x-release-more-languages
[2.7] Support more transcription languages
This commit is contained in:
commit
0eae452d25
@ -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
|
||||||
|
@ -54,6 +54,10 @@ const intlMessages = defineMessages({
|
|||||||
id: 'app.audio.captions.select.es-ES',
|
id: 'app.audio.captions.select.es-ES',
|
||||||
description: 'Audio speech recognition spanish language',
|
description: 'Audio speech recognition spanish language',
|
||||||
},
|
},
|
||||||
|
'ca-ES': {
|
||||||
|
id: 'app.audio.captions.select.ca-ES',
|
||||||
|
description: 'Audio speech recognition catalan language',
|
||||||
|
},
|
||||||
'fr-FR': {
|
'fr-FR': {
|
||||||
id: 'app.audio.captions.select.fr-FR',
|
id: 'app.audio.captions.select.fr-FR',
|
||||||
description: 'Audio speech recognition french language',
|
description: 'Audio speech recognition french language',
|
||||||
@ -133,7 +137,7 @@ const CaptionsButton = ({
|
|||||||
availableVoices.map((availableVoice) => (
|
availableVoices.map((availableVoice) => (
|
||||||
{
|
{
|
||||||
icon: '',
|
icon: '',
|
||||||
label: intl.formatMessage(intlMessages[availableVoice]),
|
label: intlMessages[availableVoice] ? intl.formatMessage(intlMessages[availableVoice]) : availableVoice,
|
||||||
key: availableVoice,
|
key: availableVoice,
|
||||||
iconRight: selectedLocale.current === availableVoice ? 'check' : null,
|
iconRight: selectedLocale.current === availableVoice ? 'check' : null,
|
||||||
customStyles: (selectedLocale.current === availableVoice) && Styled.SelectedLabel,
|
customStyles: (selectedLocale.current === availableVoice) && Styled.SelectedLabel,
|
||||||
|
@ -20,6 +20,10 @@ const intlMessages = defineMessages({
|
|||||||
id: 'app.audio.captions.speech.unsupported',
|
id: 'app.audio.captions.speech.unsupported',
|
||||||
description: 'Audio speech recognition unsupported',
|
description: 'Audio speech recognition unsupported',
|
||||||
},
|
},
|
||||||
|
'ca-ES': {
|
||||||
|
id: 'app.audio.captions.select.ca-ES',
|
||||||
|
description: 'Audio speech recognition catalan language',
|
||||||
|
},
|
||||||
'de-DE': {
|
'de-DE': {
|
||||||
id: 'app.audio.captions.select.de-DE',
|
id: 'app.audio.captions.select.de-DE',
|
||||||
description: 'Audio speech recognition german language',
|
description: 'Audio speech recognition german language',
|
||||||
@ -122,7 +126,7 @@ const Select = ({
|
|||||||
key={v}
|
key={v}
|
||||||
value={v}
|
value={v}
|
||||||
>
|
>
|
||||||
{intl.formatMessage(intlMessages[v])}
|
{intlMessages[v] ? intl.formatMessage(intlMessages[v]) : v}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
|
@ -23,20 +23,8 @@ const hasSpeechRecognitionSupport = () => typeof SpeechRecognitionAPI !== 'undef
|
|||||||
&& typeof window.speechSynthesis !== 'undefined'
|
&& typeof window.speechSynthesis !== 'undefined'
|
||||||
&& VALID_ENVIRONMENT;
|
&& VALID_ENVIRONMENT;
|
||||||
|
|
||||||
const setSpeechVoices = () => {
|
|
||||||
if (!hasSpeechRecognitionSupport()) return;
|
|
||||||
|
|
||||||
Session.set('speechVoices', unique(window.speechSynthesis.getVoices().map((v) => v.lang)));
|
|
||||||
};
|
|
||||||
|
|
||||||
// Trigger getVoices
|
|
||||||
setSpeechVoices();
|
|
||||||
|
|
||||||
const getSpeechVoices = () => {
|
const getSpeechVoices = () => {
|
||||||
if (!isWebSpeechApi()) return LANGUAGES;
|
return LANGUAGES;
|
||||||
|
|
||||||
const voices = Session.get('speechVoices') || [];
|
|
||||||
return voices.filter((v) => LANGUAGES.includes(v));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSpeechProvider = () => {
|
const getSpeechProvider = () => {
|
||||||
@ -79,7 +67,6 @@ const initSpeechRecognition = () => {
|
|||||||
|
|
||||||
if (hasSpeechRecognitionSupport()) {
|
if (hasSpeechRecognitionSupport()) {
|
||||||
// Effectivate getVoices
|
// Effectivate getVoices
|
||||||
setSpeechVoices();
|
|
||||||
const speechRecognition = new SpeechRecognitionAPI();
|
const speechRecognition = new SpeechRecognitionAPI();
|
||||||
speechRecognition.continuous = true;
|
speechRecognition.continuous = true;
|
||||||
speechRecognition.interimResults = true;
|
speechRecognition.interimResults = true;
|
||||||
|
@ -95,7 +95,11 @@ public:
|
|||||||
# provider: [webspeech, vosk, gladia]
|
# provider: [webspeech, vosk, gladia]
|
||||||
provider: webspeech
|
provider: webspeech
|
||||||
language:
|
language:
|
||||||
|
# Available languages will depend on the transcription service
|
||||||
|
# Google: https://cloud.google.com/speech-to-text/docs/speech-to-text-supported-languages
|
||||||
|
# Gladia: https://docs-v1.gladia.io/reference/supported-languages
|
||||||
available:
|
available:
|
||||||
|
# - ca-ES
|
||||||
# - de-DE
|
# - de-DE
|
||||||
- en-US
|
- en-US
|
||||||
- es-ES
|
- es-ES
|
||||||
|
@ -527,7 +527,6 @@
|
|||||||
"app.submenu.application.localeDropdown.az": "Azerbaijani",
|
"app.submenu.application.localeDropdown.az": "Azerbaijani",
|
||||||
"app.submenu.application.localeDropdown.bg-BG": "Bulgarian",
|
"app.submenu.application.localeDropdown.bg-BG": "Bulgarian",
|
||||||
"app.submenu.application.localeDropdown.bn": "Bengali",
|
"app.submenu.application.localeDropdown.bn": "Bengali",
|
||||||
"app.submenu.application.localeDropdown.ca": "Catalan",
|
|
||||||
"app.submenu.application.localeDropdown.cs-CZ": "Czech",
|
"app.submenu.application.localeDropdown.cs-CZ": "Czech",
|
||||||
"app.submenu.application.localeDropdown.da": "Danish",
|
"app.submenu.application.localeDropdown.da": "Danish",
|
||||||
"app.submenu.application.localeDropdown.de": "German",
|
"app.submenu.application.localeDropdown.de": "German",
|
||||||
@ -539,6 +538,7 @@
|
|||||||
"app.submenu.application.localeDropdown.es-419": "Spanish (Latin America)",
|
"app.submenu.application.localeDropdown.es-419": "Spanish (Latin America)",
|
||||||
"app.submenu.application.localeDropdown.es-ES": "Spanish (Spain)",
|
"app.submenu.application.localeDropdown.es-ES": "Spanish (Spain)",
|
||||||
"app.submenu.application.localeDropdown.es-MX": "Spanish (Mexico)",
|
"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.et": "Estonian",
|
||||||
"app.submenu.application.localeDropdown.eu": "Basque",
|
"app.submenu.application.localeDropdown.eu": "Basque",
|
||||||
"app.submenu.application.localeDropdown.fa-IR": "Persian",
|
"app.submenu.application.localeDropdown.fa-IR": "Persian",
|
||||||
@ -790,6 +790,7 @@
|
|||||||
"app.audio.captions.speech.disabled": "Disabled",
|
"app.audio.captions.speech.disabled": "Disabled",
|
||||||
"app.audio.captions.speech.auto": "Auto Detect",
|
"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.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.de-DE": "German",
|
||||||
"app.audio.captions.select.en-US": "English",
|
"app.audio.captions.select.en-US": "English",
|
||||||
"app.audio.captions.select.es-ES": "Spanish",
|
"app.audio.captions.select.es-ES": "Spanish",
|
||||||
|
Loading…
Reference in New Issue
Block a user