Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 7 Unit Test fail #17

Open
LiKe85 opened this issue Oct 7, 2013 · 2 comments
Open

Windows 7 Unit Test fail #17

LiKe85 opened this issue Oct 7, 2013 · 2 comments
Milestone

Comments

@LiKe85
Copy link

LiKe85 commented Oct 7, 2013

As requested in #10 I installed and tested pyttsx on a Windows 7 64-bit machine with the following results of a full unit test run.

I used python 2.7.5 with pywin32-218 and no additional TTS software installed. As you can see from the command line output the testStop() fails.

$ python27 test_all.py
testReuseDriver (test_lifecycle.TestLifecycle) ... ok
testSeparateDrivers (test_lifecycle.TestLifecycle) ... ok
testBadRate (test_prop.TestProperties) ... ok
testBadVoice (test_prop.TestProperties) ... ok
testBadVolume (test_prop.TestProperties) ... ok
testDefaults (test_prop.TestProperties) ... ok
testSetMultiple (test_prop.TestProperties) ... ok
testSetRate (test_prop.TestProperties) ... ok
testSetVoice (test_prop.TestProperties) ... ok
testSetVolume (test_prop.TestProperties) ... ok
testExternalLoop (test_say.TestSay) ... ok
testMultipleRuns (test_say.TestSay) ... ok
testMultipleSay (test_say.TestSay) ... ok
testMultipleStopBeforeSay (test_say.TestSay) ... ok
testSay (test_say.TestSay) ... ok
testSayTypes (test_say.TestSay) ... ok
testStartEndLoop (test_say.TestSay) ... ok
testStop (test_say.TestSay) ... pythoncom error: Python error invoking COM method.

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python27\lib\site-packages\win32com\server\policy.py", line 277, in _Invoke_
    return self._invoke_(dispid, lcid, wFlags, args)
  File "C:\Program Files (x86)\Python27\lib\site-packages\win32com\server\policy.py", line 282, in _invoke_
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
  File "C:\Program Files (x86)\Python27\lib\site-packages\win32com\server\policy.py", line 585, in _invokeex_
    return func(*args)
  File "..\..\pyttsx\drivers\sapi5.py", line 148, in OnEndStream
    if d._speaking:
ReferenceError: weakly-referenced object no longer exists
FAIL
testStopBeforeSay (test_say.TestSay) ... pythoncom error: Python error invoking COM method.

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python27\lib\site-packages\win32com\server\policy.py", line 277, in _Invoke_
    return self._invoke_(dispid, lcid, wFlags, args)
  File "C:\Program Files (x86)\Python27\lib\site-packages\win32com\server\policy.py", line 282, in _invoke_
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
  File "C:\Program Files (x86)\Python27\lib\site-packages\win32com\server\policy.py", line 585, in _invokeex_
    return func(*args)
  File "..\..\pyttsx\drivers\sapi5.py", line 148, in OnEndStream
    if d._speaking:
ReferenceError: weakly-referenced object no longer exists
ok

======================================================================
FAIL: testStop (test_say.TestSay)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\mstein\development\pyttsx\tests\unit\test_say.py", line 113, in testStop
    self.assert_(len(self.events) < len(self.correct[0]))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 19 tests in 30.065s

FAILED (failures=1)

Interestingly stop() seems to work properly (under Windows 7, but see #16), at least when used as shown in the "Interrupting an utterance" example from the docs. Apart from that, most of pyttsx seems to work for Windows 7 like for Ubuntu. This means that the following calls work like expected/documented:

  • init()
  • connect() and disconnect()
  • getProperty() and setProperty()
  • startLoop() and endLoop()
  • say()
  • runAndWait()

For the "correctness" of isBusy() see #13, for issues with stop() see #16.

@parente
Copy link
Collaborator

parente commented Oct 8, 2013

Thanks for running the tests. Did you have to switch the SAPI GUID as reported in #10 ?

I'll trying to find a Win7 VM to debug the test cases.

@LiKe85
Copy link
Author

LiKe85 commented Oct 8, 2013

No, the switching of SAPI GUID was not necessary, the microsoft Anna voice was available by default. The ID proposed in #10 works as well with much better voices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants