Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6028811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:47:41+00:00 2026-05-23T04:47:41+00:00

I created a small module to speak the text that is sent to it.

  • 0

I created a small module to speak the text that is sent to it.
It works fine if I don’t use engine.setProperty to set the voice, but if I set the voice it will only play the first command.

import pyttsx

def speak( text ):
    if text != "":
        engine = pyttsx.init()
        engine.setProperty('voice', "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\VW Kate") #if I don't do this line then it says both the commands
        engine.say( text )
        engine.runAndWait()

    else:
        print "you didnt enter anything"

    if __name__ == "__main__":
        speak("Hello")
        speak("This one won't play unless I use the default voice")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:47:42+00:00Added an answer on May 23, 2026 at 4:47 am

    I think you should try the following code snippet :

    import pyttsx
    engine = pyttsx.init()
    engine.say('Sally sells seashells by the seashore.')
    engine.say('The quick brown fox jumped over the lazy dog.')
    engine.runAndWait()
    

    which is originally from this page

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a small flash CS4 project that has a few custom components
I have created a small application using Microsoft .NET. I don't have problems with
The organization I work for has created a small flash widget that we're encouraging
On an embedded type system, I have created a Small Object Allocator that piggy
I've created a small Class Library, with a HttpModule that uses a filter to
I created a small module in assembler for ARM, to be linked together with
So a while ago I created a small module to serve as the methods
So I've created a small custom dialog application for sitecore that is called through
I have a small project that would be perfect for Google App Engine. Implementing
I've created small database under SQL Server 2008 . Now i wanted to move

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.