示例#1
0
	def _exitProfileTriggers(self, triggers):
		for trigger in reversed(triggers):
			try:
				trigger.exit()
			except:
				log.exception("Error exiting profile trigger %r" % trigger.spec)
		synthDriverHandler.handlePostConfigProfileSwitch(resetSpeechIfNeeded=False)
示例#2
0
	def _restoreProfileTriggers(self, triggers):
		for trigger in triggers:
			try:
				trigger.enter()
			except:
				log.exception("Error entering profile trigger %r" % trigger.spec)
		synthDriverHandler.handlePostConfigProfileSwitch(resetSpeechIfNeeded=False)
示例#3
0
	def _switchProfile(self):
		command = self._curPriQueue.pendingSequences.pop(0)[0]
		assert isinstance(command, ConfigProfileTriggerCommand), "First pending command should be a ConfigProfileTriggerCommand"
		if command.enter:
			try:
				command.trigger.enter()
			except:
				log.exception("Error entering new trigger %r" % command.trigger.spec)
			self._curPriQueue.enteredProfileTriggers.append(command.trigger)
		else:
			try:
				command.trigger.exit()
			except:
				log.exception("Error exiting active trigger %r" % command.trigger.spec)
			self._curPriQueue.enteredProfileTriggers.remove(command.trigger)
		synthDriverHandler.handlePostConfigProfileSwitch(resetSpeechIfNeeded=False)