Project

Profile

Help

How to connect?
Download (1.03 KB) Statistics View on GitHub Reload from mirrored respository
| Branch: | Tag: | Revision:

github / src / UniversalSpeech.py @ 05b173a7

1
import ctypes as __ctypes
2
__uspeech = __ctypes.cdll.UniversalSpeech
3

    
4
VOLUME, VOLUME_MAX, VOLUME_MIN, VOLUME_SUPPORTED, \
5
RATE, RATE_MAX, RATE_MIN, RATE_SUPPORTED, \
6
PITCH, PITCH_MAX, PITCH_MIN, PITCH_SUPPORTED, \
7
INFLEXION, INFLEXION_MAX, INFLEXION_MIN, INFLEXION_SUPPORTED, \
8
PAUSED, PAUSE_SUPPORTED, \
9
BUSY, BUSY_SUPPORTED, \
10
WAIT, WAIT_SUPPORTED \
11
        = range(0,22)
12

    
13
ENABLE_NATIVE_SPEECH = 0xFFFF
14
VOICE = 0x10000
15
LANGUAGE = 0x20000
16
SUBENGINE = 0x30000
17
ENGINE = 0x40000
18
ENGINE_AVAILABLE = 0x50000
19
AUTO_ENGINE = 0xFFFE
20
USER_PARAM = 0x1000000
21

    
22

    
23
def say (msg, interrupt=True):
24
        return __uspeech.speechSay(msg, interrupt)
25

    
26
def braille (msg):
27
        return __uspeech.brailleDisplay(msg)
28

    
29
def stop () :
30
        return __uspeech.speechStop()
31

    
32
def getValue (what) :
33
        return __uspeech.speechGetValue(what)
34

    
35
def setValue (what, value):
36
        return __uspeech.speechSetValue(what, value)
37

    
38
def getString (what):
39
        __uspeech.speechGetString.restype = __ctypes.c_wchar_p
40
        return __uspeech.speechGetString(what)        
41

    
42
def setString (what, value):
43
        return __uspeech.speechSetString(what, value)
(1-1/20)