Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with espeak in python
#4
Using a basic function, this works for me

import pyttsx3

def speak(text):
    engine = pyttsx3.init()
    engine.say(text)
    engine.runAndWait()


speak('Hi there, what is your name?')
The wishme function

def wishme():
    engine
    hour = datetime.now().hour
    if hour < 24:
        engine.say('Good evening.')
    elif hour < 18:
        engine.say('Good afternoon.')
    else:
        engine.say('Good morning.')
    engine.say('How can I be of service?')
    engine.runAndWait()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply


Messages In This Thread
Help with espeak in python - by Extra - Dec-31-2021, 11:23 PM
RE: Help with espeak in python - by bowlofred - Jan-01-2022, 01:13 AM
RE: Help with espeak in python - by Extra - Jan-02-2022, 07:47 PM
RE: Help with espeak in python - by menator01 - Jan-02-2022, 08:20 PM
RE: Help with espeak in python - by Extra - Jan-02-2022, 08:37 PM
RE: Help with espeak in python - by menator01 - Jan-02-2022, 08:52 PM
RE: Help with espeak in python - by Extra - Jan-02-2022, 09:11 PM
RE: Help with espeak in python - by menator01 - Jan-02-2022, 09:12 PM
RE: Help with espeak in python - by Extra - Jan-02-2022, 09:48 PM
RE: Help with espeak in python - by menator01 - Jan-02-2022, 09:56 PM
RE: Help with espeak in python - by Extra - Jan-02-2022, 10:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python espeak on Windows?? Extra 4 5,836 Mar-01-2022, 10:28 AM
Last Post: DeaD_EyE
  Voice packs for Linux espeak gr3yali3n 0 1,708 Dec-24-2020, 07:42 PM
Last Post: gr3yali3n

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020