Update voice vad ui

This commit is contained in:
Xin Wang
2026-02-12 15:31:45 +08:00
parent 82521e7b90
commit 39bcd67eac

View File

@@ -793,8 +793,10 @@ export const AssistantsPage: React.FC = () => {
</div> </div>
</div> </div>
{canAdjustInterruptionSensitivity && (
<>
<div className="flex justify-between items-center mb-1"> <div className="flex justify-between items-center mb-1">
<label className={`text-sm font-medium flex items-center ${canAdjustInterruptionSensitivity ? 'text-white' : 'text-muted-foreground'}`}> <label className="text-sm font-medium flex items-center text-white">
<Timer className="w-4 h-4 mr-2 text-primary"/> <Timer className="w-4 h-4 mr-2 text-primary"/>
</label> </label>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
@@ -803,8 +805,7 @@ export const AssistantsPage: React.FC = () => {
type="number" type="number"
value={selectedAssistant.interruptionSensitivity || 500} value={selectedAssistant.interruptionSensitivity || 500}
onChange={(e) => updateAssistant('interruptionSensitivity', parseInt(e.target.value) || 0)} onChange={(e) => updateAssistant('interruptionSensitivity', parseInt(e.target.value) || 0)}
disabled={!canAdjustInterruptionSensitivity} className="w-20 h-8 text-right pr-7 text-xs font-mono bg-black/40 border-white/5"
className="w-20 h-8 text-right pr-7 text-xs font-mono bg-black/40 border-white/5 disabled:opacity-40 disabled:cursor-not-allowed"
/> />
<span className="absolute right-2 top-1/2 -translate-y-1/2 text-[10px] text-muted-foreground font-mono">ms</span> <span className="absolute right-2 top-1/2 -translate-y-1/2 text-[10px] text-muted-foreground font-mono">ms</span>
</div> </div>
@@ -818,20 +819,19 @@ export const AssistantsPage: React.FC = () => {
step="50" step="50"
value={selectedAssistant.interruptionSensitivity || 500} value={selectedAssistant.interruptionSensitivity || 500}
onChange={(e) => updateAssistant('interruptionSensitivity', parseInt(e.target.value))} onChange={(e) => updateAssistant('interruptionSensitivity', parseInt(e.target.value))}
disabled={!canAdjustInterruptionSensitivity} className="flex-1 h-1.5 bg-secondary rounded-lg appearance-none cursor-pointer accent-primary"
className="flex-1 h-1.5 bg-secondary rounded-lg appearance-none cursor-pointer accent-primary disabled:opacity-40 disabled:cursor-not-allowed"
/> />
</div> </div>
<div className={`flex justify-between text-[10px] font-mono uppercase tracking-widest px-0.5 ${canAdjustInterruptionSensitivity ? 'text-muted-foreground opacity-50' : 'text-muted-foreground/60 opacity-35'}`}> <div className="flex justify-between text-[10px] font-mono uppercase tracking-widest px-0.5 text-muted-foreground opacity-50">
<span>0ms</span> <span>0ms</span>
<span>1000ms</span> <span>1000ms</span>
<span>2000ms</span> <span>2000ms</span>
</div> </div>
<p className={`text-xs pt-1 italic ${canAdjustInterruptionSensitivity ? 'text-muted-foreground opacity-60' : 'text-muted-foreground/70 opacity-50'}`}> <p className="text-xs pt-1 italic text-muted-foreground opacity-60">
{canAdjustInterruptionSensitivity AI
? '用户持续说话达到该时长后AI 将停止当前发言并响应。数值越小越敏感,也更容易被噪音触发。'
: '当前为“不可打断”,打断灵敏度已禁用。'}
</p> </p>
</>
)}
</div> </div>
<div className="space-y-3"> <div className="space-y-3">