UNPKG

@oliverpople/agency-x

Version:

🚀 **Transform feature requests into production-ready code in seconds**

26 lines (19 loc) • 383 B
const say = require('say'); let voiceEnabled = false; export const setVoiceEnabled = (enabled: boolean) => { voiceEnabled = enabled; }; export const speak = (text: string) => { if (voiceEnabled) { say.speak(text); } }; export const isVoiceEnabled = (): boolean => { return voiceEnabled; }; const stop = () => { say.stop(); }; export const narrator = { stop, };