import say = require ( 'say' ) ; export class VoiceAssistant { private silent : boolean ; private suppress = false ; constructor ( silent = 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 ; } }