diff --git a/template/src/ai-agent/components/CustomSettingsPanel.tsx b/template/src/ai-agent/components/CustomSettingsPanel.tsx index f0b136eea..4303ce5cf 100644 --- a/template/src/ai-agent/components/CustomSettingsPanel.tsx +++ b/template/src/ai-agent/components/CustomSettingsPanel.tsx @@ -160,8 +160,33 @@ const AdvancedSettings = () => { ); }; +const ASRSettings = () => { + const {agentId} = useContext(AgentContext); + const { + data: {agents}, + } = useRoomInfo(); + + // Get the selected agent and check if ASR vendor is "ares" + const selectedAgent = agents?.find(a => a.id === agentId); + const isAresASR = selectedAgent?.asr?.vendor === 'ares'; + + // Only render ASR settings if the agent uses "ares" as ASR vendor + if (!isAresASR) { + return null; + } + + return ( + <> + + + + + ); +}; + const CustomSettingsPanel = () => { const isAgentAvailable = useIsAgentAvailable(); + return ( @@ -174,9 +199,7 @@ const CustomSettingsPanel = () => { - - - + ) : ( <> diff --git a/template/src/components/room-info/useRoomInfo.tsx b/template/src/components/room-info/useRoomInfo.tsx index 82d6c8c0f..dd2b9056f 100644 --- a/template/src/components/room-info/useRoomInfo.tsx +++ b/template/src/components/room-info/useRoomInfo.tsx @@ -85,6 +85,10 @@ export interface AIAgentInterface { region: string; }; }; + asr: { + vendor: string; + params: Record; + }; } export interface RoomInfoContextInterface {