1

I've been trying forever to get my pyttsx code working. I am working in a Github codespace based on Linux Ubuntu. Since it is not my own I can't access any of its settings.

enter image description here

I've ran a number of different commands to try to get it to work, including:

sudo apt-get update
sudo apt install espeak
sudo apt-get install alsa-utils

as well as installed libspeak. The errors unfortunately still persist. Any ideas how to fix it or get around it and still get pyttsx to run?

starball
  • 20,030
  • 7
  • 43
  • 238
VinPy
  • 36
  • 4
  • If you are in Github Codespace it is a containerized environment, so it doesnt have access to your host audio – Saxtheowl Mar 21 '23 at 14:01

1 Answers1

0

Solved the issue by adding these lines to the top of the script:

os.system('sudo apt install -y espeak')
os.system('sudo apt-get -y update')
os.system('sudo apt-get install -y alsa-utils')
os.system('sudo apt-get install -y software-properties-common')
os.system('sudo apt-get install -y ffmpeg')
VinPy
  • 36
  • 4