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