Last active
July 23, 2020 14:59
-
-
Save oleavr/8653df4b37b4092bcaf3f9649d98784d to your computer and use it in GitHub Desktop.
Revisions
-
oleavr revised this gist
Jul 23, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ setImmediate(function () { synth.setVoice_(voices.objectAtIndex_(i)); synth.startSpeakingString_('Scapy'); do { Thread.sleep(0.05); } while (synth.isSpeaking()); -
oleavr created this gist
Jul 23, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ setImmediate(function () { var NSAutoreleasePool = ObjC.classes.NSAutoreleasePool; var NSSpeechSynthesizer = ObjC.classes.NSSpeechSynthesizer; var pool = NSAutoreleasePool.alloc().init(); try { var synth = NSSpeechSynthesizer.alloc().init(); var voices = NSSpeechSynthesizer.availableVoices(); var n = voices.count().valueOf(); for (var i = 0; i !== n; i++) { console.log('[*] Voice', i + 1, 'out of', n); synth.setVoice_(voices.objectAtIndex_(i)); synth.startSpeakingString_('scapy'); do { Thread.sleep(0.05); } while (synth.isSpeaking()); } } finally { pool.release(); } });