Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add special characters to be pronounced via latin voice #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions addon/synthDrivers/_dualvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
# This file is covered by the GNU General Public License version 3.
# See the file COPYING for more details.

from logHandler import log

def charactertype(character):
character.encode('utf-8')
code = ord(character)
if (code ==32):
if (code ==8217 or code == 8250 or code == 8211 ):
charType = 'symbol' # common punctuation or number
elif (code ==32 or code == 8203):
charType = 'space'
elif (code >= 880):
charType = 'nonLatin'
elif (code ==33 or code ==34) or (code >= 39 and code <= 41) or (code >= 44 and code <= 46) or (code ==58 or code ==59) or (code ==63 or code ==96 or code ==171 or code ==187 or code ==8230):
charType = 'complex'
elif (code < 65) or (code > 90 and code < 97) or (code > 122 and code < 161) or (code > 161 and code < 191) or (code ==215 or code ==247):
elif (code < 65) or (code > 90 and code < 97) or (code > 122 and code < 161) or (code > 161 and code < 191) or (code ==215 or code ==247 or code == 2019 ):
charType = 'symbol' # common punctuation or number
else:
charType = 'Latin'
Expand Down