i found this to work:

pacmd list-sinks

then just use the index: value for the device in paplay

index: 0 is my builtin
index: 13 is my hdmi

and these command seem to put the  output to the expected device:

paplay -d 0  /usr/share/sounds/alsa/Front_Center.wav
paplay -d 13  /usr/share/sounds/alsa/Front_Center.wav


--
gsker at skerbitz.org

On Sun, 19 Apr 2020, gregrwm wrote:

> how do i use either aplay or paplay and specify a device?  aplay fails because pulseaudio hogs the devices?  and paplay and it's
> manpage and help are no help trying to learn how to specify the desired device:
> 
> $  aplay -DS7 /usr/share/sounds/alsa/Front_Center.wav
> ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM S7
> aplay: main:830: audio open error: No such file or directory
> $  aplay -Dhw:S7 /usr/share/sounds/alsa/Front_Center.wav
> aplay: main:830: audio open error: Device or resource busy
> $  paplay -dhw:S7 /usr/share/sounds/alsa/Front_Center.wav
> Stream error: Invalid argument
> $  paplay -dS7 /usr/share/sounds/alsa/Front_Center.wav
> Stream error: No such entity
> $  paplay -l
> paplay: invalid option -- 'l'
> $  paplay -L
> paplay: invalid option -- 'L'
> $  cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=20.04
> DISTRIB_CODENAME=focal
> DISTRIB_DESCRIPTION="Ubuntu Focal Fossa (development branch)"
> $  dpkg-query -W alsa-utils
> alsa-utils      1.2.2-1ubuntu1
> $  dpkg-query -W pulseaudio-utils
> pulseaudio-utils        1:13.99.1-1ubuntu2
> 
>