Updated accessible_output2. Add mac and a better linux support

This commit is contained in:
2015-11-03 04:38:59 -06:00
parent 6a4a3cc94e
commit fe9f724673
22 changed files with 174 additions and 1261 deletions

View File

@@ -1,14 +1,19 @@
from __future__ import absolute_import
import ctypes
from base import Output
from .base import Output
class PCTalker(Output):
lib32 = 'pctkusr.dll'
lib64 = 'pctkusr64.dll'
cdll = True
argtypes = {
'PCTKPRead': (ctypes.c_char_p, ctypes.c_int, ctypes.c_int)
}
def speak(self, text, interrupt=False):
if interrupt:
self.silence()
self.lib.PCTKPRead(text.encode('cp932', 'replace'))
self.lib.PCTKPRead(text.encode('cp932', 'replace'), 0, 1)
def silence(self):
self.lib.PCTKVReset()