0

I'm trying to create a simple program that will relay what I type as synthesized speech. I've tried pyttsx, it has been known to not work with python 3.x and it sure doesn't. I also tried using speech, but it interfered with the speech_recognition Library I'm using. I don't have any code to show since I don't even have a Library for it yet.

Running Python 3.4.2 32-bit on Windows 8.1 64-bit

1 Answer 1

1

According to this POST, considering that you are targeting the Windows platform, the following will work:

import win32com.client
speaker = win32com.client.Dispatch("SAPI.SpVoice")
speaker.Speak("Hello, it works!")
Sign up to request clarification or add additional context in comments.

6 Comments

just tried it, gave me an error ImportError: No module named 'win32api'
I installed pywin32, still nothing?
@Maskot That's odd. Try and restart your python interpreter, etc. and see if that does not work.
I got it to work, but now a new problem has surfaced
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.