mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
Merge pull request #2982 from xinnan-tech/web-supplement-language
优化相关判断,补充国际化
This commit is contained in:
@@ -765,6 +765,7 @@ export default {
|
||||
'roleConfig.memory': 'Speicher',
|
||||
'roleConfig.intent': 'Intent',
|
||||
'roleConfig.language': 'Sprache auswählen',
|
||||
'roleConfig.selectLanguage': 'Bitte Sprache auswählen',
|
||||
'roleConfig.voiceType': 'Stimmtyp',
|
||||
'roleConfig.ttsVolume': 'Lautstärke',
|
||||
'roleConfig.ttsRate': 'Geschwindigkeit',
|
||||
|
||||
@@ -765,6 +765,7 @@ export default {
|
||||
'roleConfig.memory': 'Memory Model',
|
||||
'roleConfig.intent': 'Intent Recognition',
|
||||
'roleConfig.language': 'Select Language',
|
||||
'roleConfig.selectLanguage': 'Please select language',
|
||||
'roleConfig.voiceType': 'Voice Type',
|
||||
'roleConfig.ttsVolume': 'Volume',
|
||||
'roleConfig.ttsRate': 'Speed',
|
||||
|
||||
@@ -755,6 +755,8 @@ export default {
|
||||
'roleConfig.roleTemplate': 'Modelo',
|
||||
'roleConfig.roleIntroduction': 'Introdução',
|
||||
'roleConfig.languageCode': 'Código do Idioma',
|
||||
'roleConfig.language': 'Selecionar Idioma',
|
||||
'roleConfig.selectLanguage': 'Por favor, selecione o idioma',
|
||||
'roleConfig.interactionLanguage': 'Idioma de Interação',
|
||||
'roleConfig.vad': 'Detecção de Voz',
|
||||
'roleConfig.asr': 'Reconhecimento de Fala',
|
||||
|
||||
@@ -765,6 +765,7 @@ export default {
|
||||
'roleConfig.memory': 'Mô hình bộ nhớ',
|
||||
'roleConfig.intent': 'Nhận dạng ý định',
|
||||
'roleConfig.language': 'Chọn ngôn ngữ',
|
||||
'roleConfig.selectLanguage': 'Vui lòng chọn ngôn ngữ',
|
||||
'roleConfig.voiceType': 'Loại giọng nói',
|
||||
'roleConfig.ttsVolume': 'Âm lượng',
|
||||
'roleConfig.ttsRate': 'Tốc độ',
|
||||
|
||||
@@ -765,6 +765,7 @@ export default {
|
||||
'roleConfig.memory': '记忆模式',
|
||||
'roleConfig.tts': '语音合成(TTS)',
|
||||
'roleConfig.language': '选择语言',
|
||||
'roleConfig.selectLanguage': '请选择语言',
|
||||
'roleConfig.voiceType': '声音音色(Voice)',
|
||||
'roleConfig.ttsVolume': '音量',
|
||||
'roleConfig.ttsRate': '语速',
|
||||
|
||||
@@ -765,6 +765,7 @@ export default {
|
||||
'roleConfig.memory': '記憶模式',
|
||||
'roleConfig.intent': '意圖識別(Intent)',
|
||||
'roleConfig.language': '選擇語言',
|
||||
'roleConfig.selectLanguage': '請選擇語言',
|
||||
'roleConfig.voiceType': '聲音音色(Voice)',
|
||||
'roleConfig.ttsVolume': '音量',
|
||||
'roleConfig.ttsRate': '語速',
|
||||
|
||||
@@ -713,7 +713,7 @@ export default {
|
||||
const allLanguages = new Set();
|
||||
data.data.forEach(voice => {
|
||||
if (voice.languages) {
|
||||
const languagesArray = voice.languages.split('、').map(lang => lang.trim()).filter(lang => lang);
|
||||
const languagesArray = voice.languages.split(/[、;;,,]/).map(lang => lang.trim()).filter(lang => lang);
|
||||
languagesArray.forEach(lang => allLanguages.add(lang));
|
||||
}
|
||||
});
|
||||
@@ -753,7 +753,7 @@ export default {
|
||||
// 根据选中的语言筛选音色
|
||||
const filteredVoices = allVoices.filter(voice => {
|
||||
if (!voice.languages) return false;
|
||||
const languagesArray = voice.languages.split('、').map(lang => lang.trim()).filter(lang => lang);
|
||||
const languagesArray = voice.languages.split(/[、;;,,]/).map(lang => lang.trim()).filter(lang => lang);
|
||||
return languagesArray.includes(this.selectedLanguage);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user