Score:0

How to play sound in Ubuntu

ec flag

I have searched many queries and answers discussing this topic but was unable to fix the problem on my installation. I am on Ubuntu 20.04 and keep getting the following error when trying to perform aplay on terminal.

ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_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:4732:(_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:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:852: audio open error: No such file or directory

I've tried other code, and found that alsamixer does not exist and /proc/asound/ directory is not in my root. I've run lspci and got soundcards in return but running aplay -l returned no soundcards. Running lsmod also gave me no modules. I've tried reinstalling packages but either it still didn't work or there was no version for 20.04 distribution, so I am stuck. (I've tried reinstalling sound system with aptitiude but this also didn't seem to work on 20.04) Any help would be appreciated.

Edit: I forgot to mention that I am on ubuntu for wsl, not linux.

guiverc avatar
cn flag
Does `paplay` work? (ie. using default pulseaudio)
Init avatar
ec flag
.mp3 files do not work at all(I can't figure out why) and .wav files return a connection error.
Init avatar
ec flag
I ended up giving up on Alsa and pulseaudio and switched to a different music player. I am not sure why the soundcards were not detected before but everything seems to work now.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.