0

I'm trying to use the pyttsx3 library but once i run the code it shows an error

This is the code:

import pyttsx3

text = input("Text >> ")

engine = pyttsx3.init()
engine.say(text)
engine.runAndWait()

and this the error message:

ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default aplay: main:831: audio open error: No such file or directory

i tried running sudo apt-get install alsa-utils to install alsa utilities (I'm using wsl to run this)

Bas H
  • 2,114
  • 10
  • 14
  • 23

0 Answers0