开发者

How to see Microsoft Speech Recognition language and if it's active using Python?

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-开发者_如何学GoUS_CompletedSpeechConfiguration')[0]:
        self.recognitionMode = True
    else:
        self.recognitionMode = False
except EnvironmentError:
    self.recognitionMode = False


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜