diff --git a/smnb/app/dashboard/studio/host/Host.tsx b/smnb/app/dashboard/studio/host/Host.tsx index 5527687..5233971 100644 --- a/smnb/app/dashboard/studio/host/Host.tsx +++ b/smnb/app/dashboard/studio/host/Host.tsx @@ -14,7 +14,7 @@ import React, { useEffect } from "react"; import { WaterfallNarration } from "@/components/host/WaterfallNarration"; import { useHostAgentStore } from "@/lib/stores/host/hostAgentStore"; -import { Settings } from 'lucide-react'; +import { Settings, Mic, MicOff } from 'lucide-react'; export default function Host() { const { @@ -25,8 +25,10 @@ export default function Host() { nextStoryCountdown, isGenerating, stats, + isMicActive, initializeHostAgent, - cleanup + cleanup, + toggleMic } = useHostAgentStore(); // Initialize host agent on mount @@ -75,6 +77,13 @@ export default function Host() { > + diff --git a/smnb/lib/stores/host/hostAgentStore.ts b/smnb/lib/stores/host/hostAgentStore.ts index fb0535f..d2c72c5 100644 --- a/smnb/lib/stores/host/hostAgentStore.ts +++ b/smnb/lib/stores/host/hostAgentStore.ts @@ -85,6 +85,9 @@ interface HostAgentState { isActive: boolean; currentNarration: HostNarration | null; + // Audio control state + isMicActive: boolean; + // Streaming state isStreaming: boolean; streamingText: string; @@ -120,6 +123,9 @@ interface HostAgentState { processRedditPost: (post: EnhancedRedditPost) => Promise; processLiveFeedPost: (post: EnhancedRedditPost) => void; + // Audio control actions + toggleMic: () => void; + // Streaming actions addToQueue: () => void; processNextInQueue: () => void; @@ -145,6 +151,9 @@ export const useHostAgentStore = create((set, get) => ({ isActive: false, currentNarration: null, + // Audio control state + isMicActive: false, + // Streaming state isStreaming: false, streamingText: '', @@ -543,5 +552,14 @@ export const useHostAgentStore = create((set, get) => ({ })); console.log('✅ Complete host agent state reset completed'); + }, + + // Toggle mic active state + toggleMic: () => { + set((state) => { + const newMicState = !state.isMicActive; + console.log(`🎤 HOST: Mic ${newMicState ? 'activated' : 'deactivated'}`); + return { isMicActive: newMicState }; + }); } }));