Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions accessible_output2.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ accessible_output2/outputs/pc_talker.py
accessible_output2/outputs/sapi4.py
accessible_output2/outputs/sapi5.py
accessible_output2/outputs/say.py
accessible_output2/outputs/speech_dispatcher.py
accessible_output2/outputs/system_access.py
accessible_output2/outputs/voiceover.py
accessible_output2/outputs/window_eyes.py
Expand Down
3 changes: 2 additions & 1 deletion accessible_output2/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from . import say

if platform.system() == 'Linux':
from . import e_speak
#from . import e_speak
from . import speech_dispatcher

from .import auto
32 changes: 32 additions & 0 deletions accessible_output2/outputs/speech_dispatcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from .base import Output

try:
import speechd
except:
raise RuntimeError("Cannot find speechd. Please install python-speechd")

class Speechdisp(Output):
"""Speech output supporting Speech Dispatcher on Linux
Note this requires python-speechd to be installed
"""
name = "Linux Speech-Dispatcher"
def __init__(self):
self.client = speechd.SSIPClient('AccessibleOutput2')
self.client.set_output_module('espeak-ng')
self.client.set_punctuation(speechd.PunctuationMode.NONE)

def is_active(self):
try:
import speechd
except:
return False
return True

def speak(self, text, interrupt = 0):
if interrupt:
self.silence()
self.client.speak(text)
def silence(self):
self.client.stop()

output_class = Speechdisp
3 changes: 2 additions & 1 deletion build/lib/accessible_output2/outputs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from . import say

if platform.system() == 'Linux':
from . import e_speak
#from . import e_speak
from . import speech_dispatcher

from .import auto
32 changes: 32 additions & 0 deletions build/lib/accessible_output2/outputs/speech-dispatcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from .base import Output

try:
import speechd
except:
raise RuntimeError("Cannot find speechd. Please install python-speechd")

class Speechdisp(Output):
"""Speech output supporting Speech Dispatcher on Linux
Note this requires python-speechd to be installed
"""
name = "Linux Speech-Dispatcher"
def __init__(self):
self.client = speech.SSIPClient('AccessibleOutput2')
self.client.set_output_motule('espeak-ng')
self.client.set_punctuation(speech.PunctuationMode.NONE)

def is_active(self):
try:
import speechd
except:
return False
return True

def speak(self, text, interrupt = 0):
if interrupt:
self.silence()
self.client.speak(text)
def silence(self):
self.client.stop()

output_class = Speechdisp
32 changes: 32 additions & 0 deletions build/lib/accessible_output2/outputs/speech_dispatcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from .base import Output

try:
import speechd
except:
raise RuntimeError("Cannot find speechd. Please install python-speechd")

class Speechdisp(Output):
"""Speech output supporting Speech Dispatcher on Linux
Note this requires python-speechd to be installed
"""
name = "Linux Speech-Dispatcher"
def __init__(self):
self.client = speechd.SSIPClient('AccessibleOutput2')
self.client.set_output_module('espeak-ng')
self.client.set_punctuation(speechd.PunctuationMode.NONE)

def is_active(self):
try:
import speechd
except:
return False
return True

def speak(self, text, interrupt = 0):
if interrupt:
self.silence()
self.client.speak(text)
def silence(self):
self.client.stop()

output_class = Speechdisp
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
check_call("pip install pywin32")
if system() == "Windows":
check_call("pip install pywin32")
develop.run(self)

class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
check_call("pip install pywin32")
if system() == "Windows":
check_call("pip install pywin32")
install.run(self)

_system = system()
Expand Down