Interactive demo showing TTS integration in a chat interface
import { useTextToSpeech } from '@/hooks/useTextToSpeech';
function ChatMessage({ message }) {
const { speak, stop, isSpeaking } = useTextToSpeech();
return (
<div>
<p>{message.text}</p>
<button onClick={() => speak(message.text)}>
{isSpeaking ? 'âšī¸ Stop' : 'đ Speak'}
</button>
</div>
);
}See TTS-INTEGRATION-GUIDE.md for complete examples and patterns