OSDN Git Service

Descriting or spelling the current chracter, word or line now speaks in the appropria...
authorMichael Curran <mick@kulgan.net>
Mon, 31 Oct 2011 01:44:54 +0000 (11:44 +1000)
committerMichael Curran <mick@kulgan.net>
Mon, 31 Oct 2011 01:44:54 +0000 (11:44 +1000)
commit55b779e8fbf82cc9f3868246fbe7757958517e7c
tree3e9d5ff104de03783fe9e2b85dc957248d2e5178
parentb83120667c45ebba7f566dea5b14973641ead0b5
Descriting or spelling the current chracter, word or line now speaks in the appropriate language according to the text if auto language switching is turned on and the appropriate language information is available.
Specific changes:
* speech._speakSpellingGen:  place the initial text, locale and characterDescriptions bool as a tuple in to a list, and iterate through this list and spell each tuple. Also on each yield, check to see if a new tuple has been sent in to the generator and if so then append it to the list of things to be spelled.
* speech: rather than  holding _speakSpellingGenID, hold the actual generator as _speakspellingGenerator. CancelSpeech calls .close() on it if its still alive.
* speech.speakSpelling: if the generator is currently alive, use its .send to send new text to be spelled. If its dead then create a new generator.
* speech: add a spellTextInfo function which will spell the text in the given TextInfo, but also detects langChangeCommand objects and appropriately honours the language shen speaking.
* globalCommands:  for script_review_current[Chracter|Word|Line] use spellTextInfo instead of speakSpelling.
source/globalCommands.py
source/speech.py
user_docs/en/changes.t2t