UNPKG

instapack

Version:

All-in-one TypeScript and Sass compiler for web applications!

27 lines (26 loc) 648 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoiceAssistant = void 0; const say = require("say"); class VoiceAssistant { constructor(silent = false) { this.suppress = false; this.silent = silent; } speak(message) { if (this.silent || this.suppress) { return; } try { say.speak(message, 'Samantha', 1.3, () => { }); this.suppress = true; } catch (error) { } } rewind() { this.suppress = false; } } exports.VoiceAssistant = VoiceAssistant;