
# Custom application settings for gaim.

import traceback
import orca.acss
import orca.orca
import orca.settings
import orca.speech

try:
    orca.settings.voices = {
        'default' : orca.acss.ACSS({'average-pitch': 5.0,
         'family': {'locale': 'en_US', 'gender': None, 'name': 'Betty'},
         'gain': 9,
         'rate': 65.0}),
         'uppercase' : orca.acss.ACSS({'average-pitch': 6}),
         'hyperlink' : orca.acss.ACSS({'average-pitch': 2}),
    }

    workingFactories = []
    factories = orca.speech.getSpeechServerFactories()
    if len(factories) == 0:
        for factory in factories:
            servers = factory.SpeechServer.getSpeechServers()
            if len(servers):
                workingFactories.append(factory)

        for factory in workingFactories:
            factory.SpeechServer.shutdownActiveServers()
    orca.orca.loadUserSettings()
except:
    traceback.print_exc(100)
