import module pyttsx in windows IDLE failed

MRAB python at mrabarnett.plus.com
Mon Nov 16 12:28:09 EST 2015


On 2015-11-16 17:12, input/ldompeling at casema.nl wrote:
> When I try to run this module in Windows IDLE I get this message:
> How can I solve this problem.
>
> Thanks
>
> Traceback (most recent call last):
>    File "C:\raspberrypi\recipe-578839-1.py", line 1, in <module>
>      import pyttsx
> ImportError: No module named 'pyttsx'
>
> This is what I found on the internet:
> -------------------------------------------------------------------
> import pyttsx
> engine = pyttsx.init()
> engine.setProperty('rate', 70)
>
> voices = engine.getProperty('voices')
> for voice in voices:
>      print ("Using voice:"), repr(voice)
>      engine.setProperty('voice', voice.id)
>      engine.say("Hi there, how's you ?")
>      engine.say("A B C D E F G H I J K L M")
>      engine.say("N O P Q R S T U V W X Y Z")
>      engine.say("0 1 2 3 4 5 6 7 8 9")
>      engine.say("Sunday Monday Tuesday Wednesday Thursday Friday Saturday")
>      engine.say("Violet Indigo Blue Green Yellow Orange Red")
>      engine.say("Apple Banana Cherry Date Guava")
> engine.runAndWait()
>
>
Have you installed pyttsx?




More information about the Python-list mailing list