[ACCEPTED]-How to pipe /dev/urandom to linux sound output?-pulseaudio

Accepted answer
Score: 33

I'm not sure there is a simple device you 10 can just send the bytes to these days - the 9 /dev/dsp device is an old OSS thing and probably 8 won't exist on a modern ALSA based system 7 where the sound card is controlled by the 6 devices in /dev/snd.

You're probably better off using 5 aplay or something to "play" the data from /dev/random though 4 you will probably need to give it a load 3 of switches to tell it what format to assume 2 the data is in. To make it play as if it 1 were WAV data you want something like:

aplay -c 2 -f S16_LE -r 44100 /dev/random
Score: 12

pacat /dev/urandom
Works on ubuntu without any additional installation.

0

Score: 2
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | sed 1000000000q |aplay

cat /dev/urandom | tr -dc '0-9' | fold -w 10 | sed 1000000000q |aplay

cat /dev/urandom | tr -dc '0-9' | fold -w 10 | sed 1000000000q |aplay



cat /dev/urandom | tr -dc '&*(&(^)' | fold -w 10 | sed 1000000000q |aplay

cat /dev/urandom | tr -dc '&*(&(^)' | fold -w 10 | sed 1000000000q |aplay

cat /dev/urandom | tr -dc '~`!@#$%^&*()' | fold -w 1 | sed 1000000000q |aplay

cat /dev/urandom | tr -dc "0-9a-z" |aplay

cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 |aplay -r 192000

0

More Related questions