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
4 changes: 3 additions & 1 deletion tdsr/backend/mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ def gotLine(observer, line):
def handle_line(line):
global rate, volume, voice_idx
line = line.decode('utf-8', 'replace')
if line[0] == u"s" or line[0] == "l":
if line[0] == u"s" or line[0] == "l" or line[0] == "L":
ln = line[1:].replace('[[', ' ')
ln = ln.replace(u'\u23ce', ' ')
if line[0] == "L":
ln = "cap " + ln
# macOS 26 doesn't process text in <>, even though we're not telling it to speak SSML.
ln = html.escape(ln, False)
u = AVSpeechUtterance.alloc().initWithString_(ln)
Expand Down
4 changes: 2 additions & 2 deletions tdsr/backend/speechdispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def main():
if line[0] == u"s":
synth.speak(line[1:])
elif line[0] == u"l":
# TODO capitals. Do pitchrise here, or just
# let it be Speech Dispatcher's problem?
synth.char(line[1:])
elif line[0] == u"L":
synth.speak("cap " + line[1:])
elif line[0] == u"x":
synth.cancel()
elif line[0] == u"r":
Expand Down
2 changes: 2 additions & 0 deletions tdsr/tdsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,8 @@ def say_character(ch):
key = str(ord(ch))
if key in state.config['symbols']:
synth.send('s%s\n' % state.config['symbols'][key])
elif ch.isupper():
synth.send('L%s\n' % ch)
else:
synth.send('l%s\n' % ch)

Expand Down