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

Microsoft Speech Platform #10

Open
gstorer opened this issue Jan 31, 2013 · 4 comments
Open

Microsoft Speech Platform #10

gstorer opened this issue Jan 31, 2013 · 4 comments
Assignees
Milestone

Comments

@gstorer
Copy link

gstorer commented Jan 31, 2013

Hi,
I've discovered that the Microsoft Speech Platform (http://www.microsoft.com/en-au/download/details.aspx?id=27225) shares the same COM interface as the Speech API (SAPI) that comes with windows.

I've been able to use the vastly superior Speech Platform voices from here with pyttsx:
http://www.microsoft.com/en-us/download/details.aspx?id=27224

All I had to do was change the SAPI COM object from:
self._tts = win32com.client.Dispatch('SAPI.SPVoice')

to:
self._tts = win32com.client.Dispatch('{d941651c-44e6-4c17-badf-c36826fc3424}')

As far as I can tell there isn't a nice name for the Speech Platform COM object but it does work.

@parente
Copy link
Collaborator

parente commented Mar 10, 2013

Thanks for the info. I somehow missed this issue when you opened it.

It looks like Speech Platform COM is supported on Windows Vista (and up?) I don't have convenient access to a Windows box to test if all of the functions work at the moment. Could you give the unit tests a run and see if they all pass after your change?

I'm thinking either I can treat the two as separate engines, defaulting to the newest one when available and falling back on SAPI when it's not, but also allow manual override using the API in case someone has SP installed but wants to go back to SAPI.

@ghost ghost assigned parente Mar 10, 2013
@parente
Copy link
Collaborator

parente commented Aug 9, 2013

Any chance of giving the unit tests a run to see if things work on Vista and up?

@gstorer
Copy link
Author

gstorer commented Aug 10, 2013

Probably possible. I just need to remember to do it. The project at work I was going to use pyttsx with didn't eventuate. Next time I'm procrastinating I'll see if I can run through the tests on a Windows box.

@KOLANICH
Copy link

I have tried this, it doesn't work.
1 on https://github.com/RapidWareTech/pyttsx/blob/master/pyttsx/drivers/sapi5.py#L56 (in getProperty) it raises
2 if I comment that line out, it is constructed and getProperty('voice') suceeds
3 Cannot start the loop, it hangs, and there is no sound.

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

3 participants