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

Espeak - event loop and recurrent say calls fix #363

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6a6e2ef
attempt at fixing event loop
willwade Nov 4, 2024
d59af8e
resetting test code as expected
willwade Nov 4, 2024
c5d231c
reworking to minimise changes in driver proxy
willwade Nov 4, 2024
414551e
working on the test code now
willwade Nov 4, 2024
a5c83a5
remove test.py from repo
willwade Nov 4, 2024
9dcfabb
reverting engine py - no real change and import order in driver for c…
willwade Nov 4, 2024
0ae012a
Merge branch 'master' into fix-espeak-eventloop
willwade Nov 4, 2024
84b9af6
remove sys
willwade Nov 4, 2024
ba57098
switching print lines to logging
willwade Nov 4, 2024
65da48f
reverting to print traceback
willwade Nov 4, 2024
656f638
putting changes to runAndWait in espeak to keep other engines working…
willwade Nov 4, 2024
2a7933f
Remove Jeep cut F string
willwade Nov 5, 2024
01ba126
Logger to include filename
willwade Nov 5, 2024
e3d998c
add back in comments for audio
willwade Nov 5, 2024
0a2b8a8
Merge branch 'master' into fix-espeak-eventloop
willwade Nov 13, 2024
d8bebdf
fix ruff error
willwade Nov 13, 2024
3202784
move import to top
willwade Nov 13, 2024
5d91c30
delete test.py
willwade Nov 13, 2024
4625b59
add alsay-utils to make sure aplay installed
willwade Nov 13, 2024
ce78d93
try using snd-dummy on ci
willwade Nov 13, 2024
497c2b1
use ffmpeg if aplay not installed
willwade Nov 13, 2024
796d889
ruff formatting fix
willwade Nov 13, 2024
c64485f
add in ffmpeg
willwade Nov 13, 2024
753c2d7
do a if for ci in aplay
willwade Nov 13, 2024
6998d4a
sort dependencies
willwade Nov 13, 2024
f5c80a6
add small delay to see if fixes segmentation fault
willwade Nov 13, 2024
d6b6659
revert delay and add conftest
willwade Nov 13, 2024
49f9883
reformat
willwade Nov 13, 2024
a3e77df
Merge branch 'master' into fix-espeak-eventloop
willwade Nov 15, 2024
8d854f8
logging->logger
willwade Nov 15, 2024
c285353
logging->logger
willwade Nov 15, 2024
bdf09bd
logging->logger, remove print
willwade Nov 15, 2024
3881ea1
logging->logger, remove print
willwade Nov 15, 2024
be5d547
logging->logger
willwade Nov 15, 2024
c3b70a0
logging->logger
willwade Nov 15, 2024
269a694
logging->logger
willwade Nov 15, 2024
488b99e
logging->logger
willwade Nov 15, 2024
72826eb
logging->logger
willwade Nov 15, 2024
671b291
logging->logger
willwade Nov 15, 2024
0caa777
logging->logger
willwade Nov 15, 2024
8aadd82
last logging to logger
willwade Nov 15, 2024
4014d20
fix pre-commit
willwade Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/python_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
- if: runner.os == 'Linux'
run: |
sudo apt-get update -q -q
sudo apt-get install --yes espeak-ng libespeak1 alsa-utils
sudo modprobe snd-dummy
sudo apt-get install --yes espeak-ng libespeak1 alsa-utils ffmpeg
- if: runner.os == 'macOS'
run: brew install espeak-ng
- name: Download and install eSpeak-NG
Expand Down
6 changes: 5 additions & 1 deletion pyttsx3/drivers/espeak.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ def _onSynth(self, wav, numsamples, events):
if platform.system() == "Darwin":
subprocess.run(["afplay", temp_wav_name], check=True)
elif platform.system() == "Linux":
os.system(f"aplay {temp_wav_name} -q")
try:
subprocess.run(f"aplay {temp_wav_name} -q", shell=True, check=True)
except subprocess.CalledProcessError:
logging.debug("Falling back to ffplay for audio playback.")
subprocess.run(f"ffplay -autoexit -nodisp {temp_wav_name}", shell=True)
elif platform.system() == "Windows":
winsound.PlaySound(temp_wav_name, winsound.SND_FILENAME)

Expand Down
Loading