|
@@ -149,6 +149,7 @@ export const AgoraSTTComponent: React.FC<AgoraSTTComponentProps> = ({
|
|
|
disabled={!!state.error || state.isConnecting}
|
|
disabled={!!state.error || state.isConnecting}
|
|
|
className="flex items-center gap-2"
|
|
className="flex items-center gap-2"
|
|
|
aria-label={state.isConnecting ? '正在连接到语音频道' : '加入语音频道'}
|
|
aria-label={state.isConnecting ? '正在连接到语音频道' : '加入语音频道'}
|
|
|
|
|
+ data-testid="join-channel-button"
|
|
|
>
|
|
>
|
|
|
<Wifi className="h-4 w-4" aria-hidden="true" />
|
|
<Wifi className="h-4 w-4" aria-hidden="true" />
|
|
|
{state.isConnecting ? '连接中...' : '加入频道'}
|
|
{state.isConnecting ? '连接中...' : '加入频道'}
|
|
@@ -160,6 +161,7 @@ export const AgoraSTTComponent: React.FC<AgoraSTTComponentProps> = ({
|
|
|
onClick={handleStartRecording}
|
|
onClick={handleStartRecording}
|
|
|
className="flex items-center gap-2"
|
|
className="flex items-center gap-2"
|
|
|
aria-label="开始录音"
|
|
aria-label="开始录音"
|
|
|
|
|
+ data-testid="start-recording-button"
|
|
|
>
|
|
>
|
|
|
<Play className="h-4 w-4" aria-hidden="true" />
|
|
<Play className="h-4 w-4" aria-hidden="true" />
|
|
|
开始录音
|
|
开始录音
|
|
@@ -170,6 +172,7 @@ export const AgoraSTTComponent: React.FC<AgoraSTTComponentProps> = ({
|
|
|
variant="destructive"
|
|
variant="destructive"
|
|
|
className="flex items-center gap-2"
|
|
className="flex items-center gap-2"
|
|
|
aria-label="停止录音"
|
|
aria-label="停止录音"
|
|
|
|
|
+ data-testid="stop-recording-button"
|
|
|
>
|
|
>
|
|
|
<Square className="h-4 w-4" aria-hidden="true" />
|
|
<Square className="h-4 w-4" aria-hidden="true" />
|
|
|
停止录音
|
|
停止录音
|
|
@@ -181,6 +184,7 @@ export const AgoraSTTComponent: React.FC<AgoraSTTComponentProps> = ({
|
|
|
variant="outline"
|
|
variant="outline"
|
|
|
className="flex items-center gap-2"
|
|
className="flex items-center gap-2"
|
|
|
aria-label="离开语音频道"
|
|
aria-label="离开语音频道"
|
|
|
|
|
+ data-testid="leave-channel-button"
|
|
|
>
|
|
>
|
|
|
<WifiOff className="h-4 w-4" aria-hidden="true" />
|
|
<WifiOff className="h-4 w-4" aria-hidden="true" />
|
|
|
离开频道
|
|
离开频道
|
|
@@ -191,6 +195,7 @@ export const AgoraSTTComponent: React.FC<AgoraSTTComponentProps> = ({
|
|
|
variant="outline"
|
|
variant="outline"
|
|
|
className="flex items-center gap-2"
|
|
className="flex items-center gap-2"
|
|
|
aria-label="清空所有转录结果"
|
|
aria-label="清空所有转录结果"
|
|
|
|
|
+ data-testid="clear-transcriptions-button"
|
|
|
>
|
|
>
|
|
|
<Trash2 className="h-4 w-4" aria-hidden="true" />
|
|
<Trash2 className="h-4 w-4" aria-hidden="true" />
|
|
|
清空转录
|
|
清空转录
|