feat(video): update ASR terminology and file type labels for improved clarity

- Changed 'Audio Processing' to 'Audio & Video' in English, Korean, Russian, and Chinese translations to reflect expanded functionality.
- Updated ASR configuration titles and descriptions to include video processing capabilities, enhancing user understanding of the feature.
- Renamed file type labels from 'Audio Files' to 'Audio & Video' across multiple languages for consistency and clarity.
- Enhanced document upload handling in the KnowledgeBase to filter unsupported file types, providing user feedback for filtered images, videos, and audio files.

This update improves the internationalization of the application and clarifies the capabilities of the ASR feature.
This commit is contained in:
wizardchen
2026-04-14 22:27:31 +08:00
committed by lyingbug
parent cb97489787
commit 0fcab3a413
23 changed files with 635 additions and 291 deletions
+8 -7
View File
@@ -1516,7 +1516,7 @@ export default {
faq: 'FAQ Settings',
graph: 'Knowledge Graph',
multimodal: 'Image Processing',
asr: 'Audio Processing',
asr: 'Audio & Video',
datasource: 'Data Sources',
share: 'Sharing'
},
@@ -1724,12 +1724,13 @@ export default {
description: 'Configure image content understanding for parsing and retrieving non-text content like images',
},
asr: {
title: 'Audio Processing Configuration',
description: 'Configure speech recognition to upload audio files (mp3, wav, m4a, flac, ogg) and automatically transcribe to text',
label: 'Enable Speech Recognition',
desc: 'When enabled, audio files can be uploaded to the knowledge base and automatically transcribed to text',
title: 'Audio & Video Speech Recognition',
description:
'Configure ASR (speech-to-text). When enabled, you can upload audio files or videos; audio is transcribed directly, and video audio tracks are extracted and transcribed (e.g. mp3, wav, m4a, flac, ogg, mp4, mov, …).',
label: 'Enable audio & video speech recognition',
desc: 'When enabled, audio or video can be uploaded to the knowledge base; speech is transcribed to text for parsing and retrieval.',
modelLabel: 'ASR Model',
modelDescription: 'Speech-to-text model for audio transcription (e.g. OpenAI Whisper)',
modelDescription: 'Speech-to-text model for audio and video soundtracks (e.g. OpenAI Whisper)',
modelPlaceholder: 'Select an ASR model',
},
advanced: {
@@ -3179,7 +3180,7 @@ export default {
fileTypeText: 'Plain Text',
fileTypeJson: 'JSON Files',
fileTypeImage: 'Images',
fileTypeAudio: 'Audio Files',
fileTypeAudiovisual: 'Audio & Video',
engines: {
builtin: {
name: 'Built-in',
+8 -7
View File
@@ -2037,7 +2037,7 @@ export default {
faq: "FAQ 설정",
graph: "지식 그래프",
multimodal: "이미지 처리",
asr: "오디오 처리",
asr: "오디오·영상",
share: "공유관리",
storage: "스토리지 엔진",
datasource: "데이터 소스",
@@ -2256,12 +2256,13 @@ export default {
description: "이미지 콘텐츠 이해 기능을 설정하여 이미지 등 비텍스트 콘텐츠의 파싱 및 검색을 지원합니다",
},
asr: {
title: "오디오 처리 설정",
description: "음성 인식 기능을 설정하여 오디오 파일(mp3, wav, m4a, flac, ogg)을 업로드하고 자동으로 텍스트로 전사합니다",
label: "음성 인식 활성화",
desc: "활성화하면 오디오 파일을 지식베이스에 업로드하고 자동으로 텍스트로 전사할 수 있습니다",
title: "오디오·영상 음성 인식",
description:
"ASR(음성-텍스트)을 설정합니다. 활성화 시 오디오 또는 영상을 업로드할 수 있으며, 오디오는 그대로 전사하고 영상은 음성 트랙을 추출해 텍스트로 전사합니다(mp3, wav, m4a, flac, ogg, mp4, mov 등).",
label: "오디오·영상 음성 인식 사용",
desc: "활성화하면 오디오 또는 영상을 지식베이스에 업로드할 수 있으며, 음성이 텍스트로 전사되어 파싱·검색에 사용됩니다",
modelLabel: "ASR 모델",
modelDescription: "오디오 전사를 위한 음성 인식 모델 (예: OpenAI Whisper)",
modelDescription: "오디오·영상의 음성을 텍스트로 전사하는 모델 (예: OpenAI Whisper)",
modelPlaceholder: "ASR 모델을 선택해주세요",
},
advanced: {
@@ -3234,7 +3235,7 @@ export default {
fileTypeText: '일반 텍스트',
fileTypeJson: 'JSON 파일',
fileTypeImage: '이미지',
fileTypeAudio: '오디오 파일',
fileTypeAudiovisual: '오디오·영상',
engines: {
builtin: {
name: '내장',
+8 -7
View File
@@ -1717,7 +1717,7 @@ export default {
faq: 'FAQ настройки',
graph: 'Граф знаний',
multimodal: 'Обработка изображений',
asr: 'Обработка аудио',
asr: 'Аудио и видео',
storage: 'Storage Engine',
datasource: 'Источники данных',
share: 'Sharing'
@@ -1916,12 +1916,13 @@ export default {
description: 'Настройте понимание изображений для парсинга и поиска нетекстового контента',
},
asr: {
title: 'Обработка аудио',
description: 'Настройте распознавание речи для загрузки аудиофайлов (mp3, wav, m4a, flac, ogg) и автоматической транскрибации в текст',
label: 'Включить распознавание речи',
desc: 'При включении аудиофайлы могут быть загружены в базу знаний и автоматически транскрибированы в текст',
title: 'Распознавание речи для аудио и видео',
description:
'Настройте ASR (речь → текст). При включении можно загружать аудио или видео: аудио транскрибируется целиком, из видео извлекается дорожка и транскрибируется (mp3, wav, m4a, flac, ogg, mp4, mov и др.).',
label: 'Включить распознавание для аудио и видео',
desc: 'При включении в базу можно загружать аудио или видео; речь транскрибируется в текст для парсинга и поиска',
modelLabel: 'Модель ASR',
modelDescription: 'Модель распознавания речи для транскрибации аудио (например, OpenAI Whisper)',
modelDescription: 'Модель распознавания речи для транскрибации аудио и звуковых дорожек видео (например, OpenAI Whisper)',
modelPlaceholder: 'Выберите модель ASR',
},
advanced: {
@@ -2849,7 +2850,7 @@ export default {
fileTypeText: 'Текстовые файлы',
fileTypeJson: 'Файлы JSON',
fileTypeImage: 'Изображения',
fileTypeAudio: 'Аудиофайлы',
fileTypeAudiovisual: 'Аудио и видео',
engines: {
builtin: {
name: 'Встроенный',
+7 -7
View File
@@ -2023,7 +2023,7 @@ export default {
faq: "FAQ 设置",
graph: "知识图谱",
multimodal: "图像处理",
asr: "音频处理",
asr: "音视频",
datasource: "数据源",
share: "共享管理",
},
@@ -2228,12 +2228,12 @@ export default {
description: "配置图像内容理解能力,启用后支持图片等非文本内容的解析和检索",
},
asr: {
title: "音频处理配置",
description: "配置语音识别功能,启用后支持上传音频文件(mp3、wav、m4a、flac、ogg)并自动转录为文本",
label: "启用语音识别",
desc: "启用后可以上传音频文件到知识库,系统将自动转录为文本进行处理",
title: "音视频语音识别",
description: "配置语音识别(ASR),启用后支持上传音频及视频文件;音频将整段转写,视频将提取音轨并转写为文本(常见格式:mp3、wav、m4a、flac、ogg、mp4、mov 等)",
label: "启用音视频语音识别",
desc: "启用后可上传音频或视频到知识库,系统自动转写音轨/语音为文本并参与解析与检索",
modelLabel: "ASR 模型",
modelDescription: "用于语音转文本的语音识别模型(如 OpenAI Whisper)",
modelDescription: "用于音频与视频中语音转文本的识别模型(如 OpenAI Whisper)",
modelPlaceholder: "请选择 ASR 模型",
},
advanced: {
@@ -3177,7 +3177,7 @@ export default {
fileTypeText: "纯文本",
fileTypeJson: "JSON 文件",
fileTypeImage: "图片",
fileTypeAudio: "音频文件",
fileTypeAudiovisual: "音视频",
engines: {
builtin: {
name: "内置",
@@ -1030,11 +1030,38 @@ const handleDocumentUpload = async (event: Event) => {
return;
}
const vlmEnabled = kbInfo.value?.vlm_config?.enabled || false;
const asrEnabled = kbInfo.value?.asr_config?.enabled || false;
const dynamicTypes = supportedFileTypes.value.size > 0 ? supportedFileTypes.value : undefined
const validFiles: File[] = [];
let skippedCount = 0;
let imageFilteredCount = 0;
let videoFilteredCount = 0;
let audioFilteredCount = 0;
for (let i = 0; i < files.length; i++) {
const file = files[i];
const fileExt = file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase();
const imageTypes = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'];
const videoTypes = ['mp4', 'mov', 'avi', 'mkv', 'webm', 'wmv', 'flv'];
const audioTypes = ['mp3', 'wav', 'm4a', 'flac', 'ogg'];
if (!vlmEnabled) {
if (imageTypes.includes(fileExt)) {
imageFilteredCount++;
continue;
}
if (videoTypes.includes(fileExt)) {
videoFilteredCount++;
continue;
}
}
if (!asrEnabled && audioTypes.includes(fileExt)) {
audioFilteredCount++;
continue;
}
if (!kbFileTypeVerification(file, files.length > 1, dynamicTypes)) {
validFiles.push(file);
} else {
@@ -1042,6 +1069,16 @@ const handleDocumentUpload = async (event: Event) => {
}
}
if (imageFilteredCount > 0) {
MessagePlugin.warning(t('knowledgeBase.imagesFilteredNoVLM', { count: imageFilteredCount }));
}
if (videoFilteredCount > 0) {
MessagePlugin.warning(t('knowledgeBase.videosFilteredNoVLM', { count: videoFilteredCount }));
}
if (audioFilteredCount > 0) {
MessagePlugin.warning(t('knowledgeBase.audiosFilteredNoASR', { count: audioFilteredCount }));
}
if (validFiles.length === 0) {
if (skippedCount > 0) {
MessagePlugin.warning(t('knowledgeBase.allFilesSkippedNoEngine'));
@@ -1176,6 +1213,16 @@ const handleFolderUpload = async (event: Event) => {
}
}
if (imageFilteredCount > 0) {
MessagePlugin.warning(t('knowledgeBase.imagesFilteredNoVLM', { count: imageFilteredCount }));
}
if (videoFilteredCount > 0) {
MessagePlugin.warning(t('knowledgeBase.videosFilteredNoVLM', { count: videoFilteredCount }));
}
if (audioFilteredCount > 0) {
MessagePlugin.warning(t('knowledgeBase.audiosFilteredNoASR', { count: audioFilteredCount }));
}
if (validFiles.length === 0) {
MessagePlugin.warning(t('knowledgeBase.noValidFilesInFolder', { total: files.length }));
if (input) input.value = '';
@@ -202,7 +202,7 @@
</div>
</div>
<!-- 音频处理(ASR)设置 -->
<!-- 音视频语音识别(ASR)设置 -->
<div v-if="!isFAQ" v-show="currentSection === 'asr'" class="section">
<div v-if="formData" class="kb-multimodal-settings">
<div class="section-header">
@@ -160,6 +160,9 @@ const fileTypeGroups = computed(() => {
const jsonExts = ['json'].filter(e => ft.has(e))
const imageExts = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'webp'].filter(e => ft.has(e))
const audioExts = ['mp3', 'wav', 'm4a', 'flac', 'ogg'].filter(e => ft.has(e))
const videoExts = ['mp4', 'mov', 'avi', 'mkv', 'webm', 'wmv', 'flv'].filter(e => ft.has(e))
const mediaExtSet = new Set<string>([...audioExts, ...videoExts])
const audiovisualExts = [...mediaExtSet]
if (pdfExts.length) groups.push({ key: 'pdf', label: t('kbSettings.parser.fileTypePdf'), icon: 'file-pdf', extensions: pdfExts })
if (officeExts.length) groups.push({ key: 'office', label: t('kbSettings.parser.fileTypeWord'), icon: 'file-word', extensions: officeExts })
@@ -170,7 +173,14 @@ const fileTypeGroups = computed(() => {
if (txtExts.length) groups.push({ key: 'text', label: t('kbSettings.parser.fileTypeText'), icon: 'file', extensions: txtExts })
if (jsonExts.length) groups.push({ key: 'json', label: t('kbSettings.parser.fileTypeJson'), icon: 'file-code', extensions: jsonExts })
if (imageExts.length) groups.push({ key: 'image', label: t('kbSettings.parser.fileTypeImage'), icon: 'image', extensions: imageExts })
if (audioExts.length) groups.push({ key: 'audio', label: t('kbSettings.parser.fileTypeAudio'), icon: 'sound', extensions: audioExts })
if (audiovisualExts.length) {
groups.push({
key: 'audiovisual',
label: t('kbSettings.parser.fileTypeAudiovisual'),
icon: 'sound',
extensions: audiovisualExts,
})
}
return groups
})