Jetson Inference container unable to run talkey python library for text to speech

I am trying to run the following code inside Jetson Inference container I am getting the following error please anyone has a solution.

Code:

import talkey
tts = talkey.Talkey()
tts.say(‘Old McDonald had a farm’)

Logs
ALSA lib confmisc.c:767:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:788: audio open error: No such file or directory

Hi @saifurrehman4114, I believe you need to mount --device /dev/snd --device /dev/bus/usb when you start the container. See my post on your GitHub question here:

https://github.com/dusty-nv/jetson-inference/issues/1095#issuecomment-860764995

You should then be able to run aplay -L from within the container and see the sound devices.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.