views:

40

answers:

1

Hello,

I'm using windows 7 english and I want to know how to see the microsoft speech language and to see if the speech recognition is active.

How can I do it using python?

Solved with:

x=_winreg.ConnectRegistry(None,_winreg.HKEY_CURRENT_USER)
try:
    y= _winreg.OpenKey(x, r"Software\Microsoft\Speech\Preferences")
    if _winreg.QueryValueEx(y,'en-US_CompletedSpeechConfiguration')[0]:
        self.recognitionMode = True
    else:
        self.recognitionMode = False
except EnvironmentError:
    self.recognitionMode = False
+2  A: 

If you know the registry key you could use the Python _winreg API

extraneon