Re: [orca-list] Quick change of the active language
- From: Sebastian Humenda <shumenda gmx de>
- To: orca-list gnome org
- Subject: Re: [orca-list] Quick change of the active language
- Date: Sat, 6 Nov 2010 11:57:30 +0100
Hello,
Luciano de Souza <luchyanus gmail com> wrote on Fr, Nov 05, 2010 at 07:40:10 -0200:
Sometimes, it's necessary to change the active language to read a
short text and, few moments after, return to the previous language.
[...]
The feature you are suggesting will be implemented in future versions
of orca. For now a script might help. I tried something, but it
doesn't work. I paste it below. If someone on this list has the
knowledge to fix that, it would be great.
Thanks, Greetings
Sebastian
===
import orca.acss
import orca.settings
import orca.keybindings
import orca.input_event
myKeyBindings = orca.keybindings.KeyBindings()
LANG_SWITCHED=False
SPEECH_ORIGINAL_SETTINGS = None
def toggle_language():
if not LANG_SWITCHED:
SPEECH_ORIGINAL_SETTINGS = orca.settings.voices
LANG_SWITCHED = True
orca.settings.voices = {
'default' : orca.acss.ACSS({'average-pitch': 4.7000000000000002,
'rate': 80.0, 'family': {'gender': None, 'locale': 'en', 'name': 'english'}})}
else:
orca.settings.voices = SPEECH_ORIGINAL_SETTINGS
LANG_SWITCHED = False
lang_switch_handler = \
orca.input_event.InputEventHandler(toggle_language, \
'Toggle speech between English and German')
# Bind keys
myKeyBindings.add(orca.keybindings.KeyBinding(
"r",
1 << orca.settings.MODIFIER_ORCA,
1 << orca.settings.MODIFIER_ORCA,
lang_switch_handler))
--
Test the free Latin-German dictionary | Teste das freie Latein-Deutsch-Wörterbuch!
Online: http://dict.uni-leipzig.de/dictd?Form=dict3&Database=lat-deu
More languages | mehr Sprachen: http://www.freedict.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]