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

Updated to work with speech.commands. #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion nvdaAddon/manifest.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description=A free Klatt-based speech synthesizer
author=_author_
version=_version_
minimumNVDAVersion = 2019.3.0
lastTestedNVDAVersion = 2019.3.1
lastTestedNVDAVersion = 2020.4
13 changes: 6 additions & 7 deletions nvdaAddon/synthDrivers/nvSpeechPlayer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###
#This file is a part of the NV Speech Player project.
#URL: https://bitbucket.org/nvaccess/speechplayer
#Copyright 2014 NV Access Limited.
#Copyright 2014-2021 NV Access Limited, Ty Gillespie.
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 2.0, as published by
#the Free Software Foundation.
Expand All @@ -26,11 +26,10 @@
from logHandler import log
from synthDrivers import _espeak
from synthDriverHandler import SynthDriver, VoiceInfo, synthIndexReached, synthDoneSpeaking
from driverHandler import NumericDriverSetting

from autoSettingsUtils.driverSetting import NumericDriverSetting
from speech.commands import IndexCommand, PitchCommand

class AudioThread(threading.Thread):

wavePlayer=None
keepAlive=True
isSpeaking=False
Expand Down Expand Up @@ -153,8 +152,8 @@ def check(cls):
supportedSettings=(SynthDriver.VoiceSetting(),SynthDriver.RateSetting(),SynthDriver.PitchSetting(),SynthDriver.VolumeSetting(),SynthDriver.InflectionSetting())

supportedCommands = {
speech.IndexCommand,
speech.PitchCommand,
IndexCommand,
PitchCommand,
}

supportedNotifications = {synthIndexReached,synthDoneSpeaking}
Expand Down Expand Up @@ -183,7 +182,7 @@ def speak(self,speakList):
for item in speakList:
if isinstance(item,speech.PitchCommand):
pitchOffset=item.offset
elif isinstance(item,speech.IndexCommand):
elif isinstance(item,IndexCommand):
userIndex=item.index
elif isinstance(item,str):
textList=re_textPause.split(item)
Expand Down