It is recommended to provide us with a complete screenshot of the error.
What sample code did you run and what error occurred?
What version of the system are you currently using and what model of Raspberry Pi board are you using? Please tell us so that we can reproduce and solve the problem.
Has the code been modified? Are all modules wired correctly?
Do not use Raspberry Pi’s built-in programming tools (such as Geany) to run speaker-related scripts. These tools run with standard user privileges, while hardware control (such as managing speakers) usually requires higher privileges.
It is recommended that you execute python code on the command line. When running related scripts, you need to add sudo to obtain administrative privileges. For example, sudo python3 tts.py