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

engine.say has no sound after not using window about 1 hour #273

Open
enxuan opened this issue Apr 21, 2023 · 4 comments
Open

engine.say has no sound after not using window about 1 hour #273

enxuan opened this issue Apr 21, 2023 · 4 comments
Labels
Needs-Checking Possibly outdated. Needs checking with current latest

Comments

@enxuan
Copy link

enxuan commented Apr 21, 2023

I have code to say tts:
import pyttsx3
engine = pyttsx3.init()
engine.setProperty('rate', rate)
engine.setProperty('volume', volume)
engine.say('I will speak this text')
engine.runAndWait()
This code work ok if my PC is using or other PC remote to my PC.
But if my PC is not using about 1 hour (no touch, no any event), if I run jenkins build from jenkins PC (not my PC), it has no sound at all.
I am using window 10, already set never sleep, fixed speaker for speech to text setting.
lib version: 2.90

@Jiangshan00001
Copy link

"But if my PC is not using about 1 hour (no touch, no any event), if I run jenkins build from jenkins PC (not my PC), it has no sound at all."
the code is executed in my PC?
the code is executed using which mode? ssh? vnc? remote desktop? or locally?

@enxuan
Copy link
Author

enxuan commented Apr 24, 2023

"But if my PC is not using about 1 hour (no touch, no any event), if I run jenkins build from jenkins PC (not my PC), it has no sound at all." ==> it means that we do not touch to "my PC" and the source code is auto get to "my PC" and run on it.
the code is executed in my PC? --> yes, it is, the code is auto sync by jenkins and run on my PC
the code is executed using which mode? ssh? vnc? remote desktop? or locally? --> the code is run on my PC so it run locally.
If when code is running, I use other PC to remote to "my PC", I can hear engine.say speak normally. If I close the remote, "my PC" will has no sound at all.
If when code is running, I log in to "my PC" and has event, the sound play normally again.

@Jiangshan00001
Copy link

1 my PC, which runs the code
2 jenkins PC, which trigger the program run?
how the jenkins PC tell my PC to run the code when jenkins want to?

i think this maybe the same problem with this one:
#263

@enxuan
Copy link
Author

enxuan commented Apr 27, 2023

yes, I think I have same issue with #263
The issue seem due to engine.say() has no sound when PC screen is locked.
You can try to reproduce it by run you code, after run press window+L to off the screen and check if you can hear the sound or not.

@willwade willwade added the Needs-Checking Possibly outdated. Needs checking with current latest label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Checking Possibly outdated. Needs checking with current latest
Projects
None yet
Development

No branches or pull requests

3 participants