- 请选择希望截取的时间点({timeFormat(segmentTimeTip, 'ss.SSS')})
+ {t('AudioSegmentTip', { time: timeFormat(segmentTimeTip, 'ss.SSS')})}
);
};
diff --git a/packages/lb-components/src/components/audioPlayer/zoomSlider/index.tsx b/packages/lb-components/src/components/audioPlayer/zoomSlider/index.tsx
index 4f278055f..ca7c7f13b 100644
--- a/packages/lb-components/src/components/audioPlayer/zoomSlider/index.tsx
+++ b/packages/lb-components/src/components/audioPlayer/zoomSlider/index.tsx
@@ -7,6 +7,7 @@ import { cKeyCode } from '@labelbee/lb-annotation';
import { useLatest } from 'ahooks';
import styles from './index.module.scss';
+import { useTranslation } from 'react-i18next';
const EKeyCode = cKeyCode.default
@@ -25,6 +26,7 @@ interface IZoomSliderProps {
const ZoomSlider = (props: IZoomSliderProps) => {
const { onChange, zoom } = props;
+ const { t } = useTranslation();
const zoomRef = useLatest(zoom);
const changeHandler = (newValue: number) => {
@@ -72,7 +74,7 @@ const ZoomSlider = (props: IZoomSliderProps) => {
return (
-
缩放
+
{t('Scale')}
{
const { onChange, playerType } = props;
+ const { t } = useTranslation();
const PLAYBACK_RATE_SPEED = PLAYER_TYPE_RATE_SPEED[playerType];
const MAX_PLAYBACK_RATE_SPEED = PLAYBACK_RATE_SPEED.slice(-1)[0];
const MIN_PLAYBACK_RATE_SPEED = PLAYBACK_RATE_SPEED[0];
@@ -72,7 +74,7 @@ const SpeedController = (props: IProps) => {
alignItems: 'center',
}}
>
- 倍速
+ {t('Speed')}
{rate}x
diff --git a/packages/lb-components/src/hooks/annotation.ts b/packages/lb-components/src/hooks/annotation.ts
index ce51ead14..35f689964 100644
--- a/packages/lb-components/src/hooks/annotation.ts
+++ b/packages/lb-components/src/hooks/annotation.ts
@@ -12,9 +12,9 @@ export interface ICustomToolInstance {
valid: boolean;
exportData: () => [any, {}];
exportCustomData: () => {};
- singleOn: () => void;
+ singleOn: (eventName: string, callback: (...args: any[]) => void) => void;
clearResult: () => void;
- on: () => void;
+ on: (eventName: string, callback: (...args: any[]) => void) => void;
unbind: () => void;
setResult: (result: any) => void;
setValid: (valid: boolean) => void;
diff --git a/packages/lb-components/src/index.scss b/packages/lb-components/src/index.scss
index 29de690a3..fa6b14e3f 100644
--- a/packages/lb-components/src/index.scss
+++ b/packages/lb-components/src/index.scss
@@ -349,6 +349,9 @@ $prefix: bee;
&:hover {
background: #f3f4ff;
+ .sensebee-radio-icon{
+ display: inline-block;
+ }
}
> span:nth-child(2) {
@@ -374,6 +377,10 @@ $prefix: bee;
overflow: hidden;
text-overflow: ellipsis;
}
+ .sensebee-radio-icon{
+ margin-right: 10px;
+ display: none;
+ }
}
}
@@ -2264,3 +2271,10 @@ $predictTrackingPrefix: #{$prefix}-point-cloud-predict-tracking;
right: 0;
z-index: -200;
}
+
+.bee-audio-clip{
+ cursor: url('./assets/annotation/audio/blackClip.svg'), default;
+}
+.bee-audio-combined{
+ cursor: url('./assets/annotation/audio/combine.svg') 10 12, default;
+}
diff --git a/packages/lb-components/src/views/MainView/index.tsx b/packages/lb-components/src/views/MainView/index.tsx
index 0fc85c4b7..0e1077b7e 100644
--- a/packages/lb-components/src/views/MainView/index.tsx
+++ b/packages/lb-components/src/views/MainView/index.tsx
@@ -26,7 +26,7 @@ import LLMLayout from './LLMLayout';
import AudioAnnotate from '@/components/audioAnnotate'
import { LoadingOutlined } from '@ant-design/icons';
import { useTranslation } from 'react-i18next';
-import { EAudioToolName, EPointCloudName } from '@labelbee/lb-annotation';
+import { EPointCloudName } from '@labelbee/lb-annotation';
interface IProps {
path: string;
@@ -85,7 +85,7 @@ const ViewportProviderLayout = (props: AppProps & IProps & { children: any }) =>
const { t } = useTranslation();
const { stepList, step } = props;
const currentToolName = getStepConfig(stepList, step)?.tool;
- const hasLangNode = ![EToolName.LLM, EAudioToolName.AudioTextTool].includes(currentToolName)
+ const hasLangNode = ![EToolName.LLM].includes(currentToolName)
const hasHeaderOption = ![EToolName.LLM].includes(currentToolName)
const hasPredictTrackingIcon = [EPointCloudName.PointCloud].includes(currentToolName)
return (
diff --git a/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/audioText/index.tsx b/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/audioText/index.tsx
index 720dcadb5..e68c8e4a5 100644
--- a/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/audioText/index.tsx
+++ b/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/audioText/index.tsx
@@ -25,6 +25,7 @@ import {
} from '../line'
import IconPolygonMerge from '@/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg';
import IconPolygonCut from '@/assets/annotation/toolHotKeyIcon/icon_polygonCut_kj.svg';
+import DrawRectSvg from '@/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg';
const audioForward = _.cloneDeep(forward);
const audioBackward = _.cloneDeep(backward);
@@ -40,19 +41,33 @@ const audioPrev = _.cloneDeep(preLine);
const audioNext = _.cloneDeep(nextLine);
export const combineAudio = {
- name: '合并区间',
+ name: 'CombineAudio',
icon: IconPolygonMerge,
noticeInfo: '',
shortCut: ['Alt', 'Z'],
};
export const splitAudio = {
- name: '分割区间',
+ name: 'ClipAudio',
icon: IconPolygonCut,
noticeInfo: '',
shortCut: ['Alt', 'X'],
};
+audioForward.name = 'NextFile';
+audioBackward.name = 'PreviousFile';
+audioBackTrack.name = 'Forward0.1';
+audioForwardTrack.name = 'Back0.1';
+audioToggleClipMode.name = 'SwitchClipMode';
+audioClipped.name = 'Clip';
+audioTag.name = 'TaggingOrAttr';
+audioPrev.name = 'PreviousInterval';
+audioNext.name = 'NextInterval';
+
+audioClipped.icon = DrawRectSvg;
+
+audioToggleClipMode.noticeInfo = '';
+
const audioTextToolShortCurTable = [
saveResult,
audioToggleTagMode,
diff --git a/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.tsx b/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.tsx
index 194413661..a798b6be1 100644
--- a/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.tsx
+++ b/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.tsx
@@ -187,7 +187,7 @@ export const rewind = {
};
export const toggleTagMode = {
- name: '切换标签模式',
+ name: 'SwitchTagMode',
icon: ToggleTagModeSvg,
shortCut: ['L'],
};
@@ -196,7 +196,7 @@ export const tag = {
name: '打标签',
icon: IconTagKj,
shortCut: [DragWithLeftClickSvg],
- noticeInfo: '左击',
+ noticeInfo: 'LeftClick',
};
export const period = {
@@ -207,27 +207,27 @@ export const period = {
};
export const clipSelected = {
- name: '截取选中',
+ name: 'ClipSelect',
icon: IconClipSelected,
shortCut: [DragWithRightClickShortCutSvg],
- noticeInfo: '右击',
+ noticeInfo: 'RightClick',
};
export const deleteRemark = {
- name: '删除批注',
+ name: 'DeleteComment',
icon: IconDeleteRemark,
shortCut: ['Delete'],
- noticeInfo: '选中时',
+ noticeInfo: 'SelectedStatus',
};
export const nextRemark = {
- name: '下一条批注',
+ name: 'NextComment',
icon: IconNextRemark,
shortCut: ['Tab'],
};
export const preRemark = {
- name: '上一条批注',
+ name: 'PreviousComment',
icon: IconPreRemark,
shortCut: ['Shift', 'Tab'],
};
diff --git a/packages/lb-demo/src/mock/index.js b/packages/lb-demo/src/mock/index.js
index 6722e0b77..d766cfc90 100644
--- a/packages/lb-demo/src/mock/index.js
+++ b/packages/lb-demo/src/mock/index.js
@@ -468,7 +468,7 @@ export const mockAudioList = [
id: 1,
path: '230150176229189149233159179.mp3',
name: '',
- url: 'https://sensebee.oss-accelerate.aliyuncs.com/Development%2F8799%2F2.mp3?Expires=1693562399&OSSAccessKeyId=LTAI4Fcnhge5ysEwVNGjQCpU&Signature=ze0073LJhvux%2FJ%2FTVbquGVKlZX0%3D',
+ url: 'https://sensebee.oss-accelerate.aliyuncs.com/Development%2F8978%2F2.wav?Expires=1701341999&OSSAccessKeyId=LTAI4Fcnhge5ysEwVNGjQCpU&Signature=s5eX9GyK6VM42Xk0jZtYndYfwI0%3D',
processedUrl:
'https://sensebee.oss-accelerate.aliyuncs.com/Development%2F8799%2F2.mp3?Expires=1693378799&OSSAccessKeyId=LTAI4Fcnhge5ysEwVNGjQCpU&Signature=5u3nNCoKi64X487g%2F23wJR1486w%3D',
result: '',
diff --git a/packages/lb-demo/src/mock/taskConfig.js b/packages/lb-demo/src/mock/taskConfig.js
index 52210c207..6caa628d7 100644
--- a/packages/lb-demo/src/mock/taskConfig.js
+++ b/packages/lb-demo/src/mock/taskConfig.js
@@ -300,7 +300,7 @@ const audioToolConfig = {
"skipWhileNoDependencies": false,
"configList": [
{
- "label": "文本",
+ "label": "测试文本",
"key": "text",
"required": false,
"default": "",
diff --git a/packages/lb-utils/src/i18n/resources.json b/packages/lb-utils/src/i18n/resources.json
index a5bbe220e..7c856b117 100644
--- a/packages/lb-utils/src/i18n/resources.json
+++ b/packages/lb-utils/src/i18n/resources.json
@@ -83,6 +83,7 @@
"SwitchPattern": "Switch Pattern",
"Tagging": "Tagging",
"Hide": "Hide ",
+ "TaggingOrAttr": "Tag/attribute",
"HideDrawnAnnotation": "Hidden Drawn Annotation",
"Blue": "Blue",
"Cyan": "Cyan",
@@ -142,6 +143,7 @@
"PointCount": "Point Count",
"Invalid": "Invalid",
"Tag": "Tag",
+ "SearchTag": "Search tags",
"Attribute": "Attribute",
"SubAttribute": "SubAttribute",
"PleaseSelect": "Please Select",
@@ -267,7 +269,28 @@
"AnswerGenerationFailedPleaseTryAgainLater": "Answer generation failed, please try again later",
"ReGenerate": "Re-generate",
"AnswerTextEdit": "Answer text edit",
- "ShowEditingResultDifferencesInTextModeOnly": "Show editing result differences in text mode only"
+ "ShowEditingResultDifferencesInTextModeOnly": "Show editing result differences in text mode only",
+ "AttributeLockNotify": "View Properties:{{label}},only display the annotation content of the selected properties",
+ "AudioSegmentTip": "Please select the desired time point for capture({{time}})",
+ "AudioCombineTip": "Please click on the intervals you wish to merge",
+ "ClippedAudio": "Captured content",
+ "NoClippedData": "No captured content",
+ "CompareTags": "Tag comparison display",
+ "CombineAudio": "Merge intervals",
+ "ClipAudio": "Split intervals",
+ "SwitchClipMode": "Switch to capture mode",
+ "SwitchTagMode": "Switch to tag mode",
+ "Clip": "Capture",
+ "PreviousInterval": "Previous interval",
+ "NextInterval": "Next interval",
+ "DeleteComment": "Delete Comments",
+ "PreviousComment": "Previous comment",
+ "NextComment": "Next comment",
+ "ClipSelect": "Select",
+ "Forward0.1": "Advance by 0.1 seconds",
+ "Back0.1": "Rewind by 0.1 seconds",
+ "LeftClick": "Left-click",
+ "RightClick": "Right-click"
},
"cn": {
"TextInput": "文本输入",
@@ -352,6 +375,7 @@
"SwitchPattern": "切换绘制形式",
"Tagging": "打标签",
"Hide": "打标签",
+ "TaggingOrAttr": "打标签/属性",
"HideDrawnAnnotation": "标注隐藏中",
"Blue": "蓝",
"Cyan": "青",
@@ -412,6 +436,7 @@
"PointCount": "点数",
"Invalid": "无效",
"Tag": "标签",
+ "SearchTag": "搜索标签",
"Attribute": "主属性",
"SubAttribute": "副属性",
"PleaseSelect": "请选择",
@@ -537,6 +562,27 @@
"AnswerGenerationFailedPleaseTryAgainLater": "回答生成失败,请稍后重试",
"ReGenerate": "重新生成",
"AnswerTextEdit": "回答文本编辑",
- "ShowEditingResultDifferencesInTextModeOnly": "仅文本模式下显示编辑结果差异"
+ "ShowEditingResultDifferencesInTextModeOnly": "仅文本模式下显示编辑结果差异",
+ "AttributeLockNotify": "查看属性:{{label}},只显示所选属性的标注内容",
+ "AudioSegmentTip": "请选择希望截取的时间点({{time}})",
+ "AudioCombineTip": "请点击希望合并的区间",
+ "ClippedAudio": "已截取音频",
+ "NoClippedData": "暂无截取内容",
+ "CompareTags": "标签对照显示",
+ "CombineAudio": "合并区间",
+ "ClipAudio": "分割区间",
+ "SwitchClipMode": "切换截取模式",
+ "SwitchTagMode": "切换标签模式",
+ "Clip": "截取",
+ "PreviousInterval": "上一区间",
+ "NextInterval": "下一区间",
+ "DeleteComment": "删除批注",
+ "PreviousComment": "上一条批注",
+ "NextComment": "下一条批注",
+ "ClipSelect": "截取选中",
+ "Forward0.1": "前进0.1s",
+ "Back0.1": "后退0.1s",
+ "LeftClick": "左击",
+ "RightClick": "右击"
}
}
\ No newline at end of file