Sponsored Content
Full Discussion: Play sound
Top Forums Shell Programming and Scripting Play sound Post 302786905 by wisecracker on Thursday 28th of March 2013 11:14:30 AM
Old 03-28-2013
(This could be homework.)

I am not sure i am understanding you correctly but I assume you want the sounds to be like morse code...

This will generate a single tone.

https://www.unix.com/shell-programmin...ator-demo.html

It is up to you to work out morse code with it which is not difficult...

Alternatively if it as voice you want the look at "cat" and use it to record raw voice data directly to disk, as <number>.raw using a laptop's internal mic for ease of use...

This assumes that you have /dev/dsp as a device.

Not sure why you need <number>.wav but if that is a requirement then look at SOX for doing all of the above...
This User Gave Thanks to wisecracker For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

play cd? how?

hi all, How do I set up my cdrom to play some regular audio cd (not cd-r or cd-rw). I know that my cdrom has been mounted as it does pop up the file manager if I put in, e.g., the office52 cd. Thanks in advance. Andre (3 Replies)
Discussion started by: andrec
3 Replies

2. UNIX for Advanced & Expert Users

Need something new to play with

I posted this question in the dummies forums, but I would like to get a more expert opinion... I am looking for a new OS to play with. I have a celron 450 running slackware linux, a powermac G4 450 running Mac OS X (Which by the way has 81 days of uptime as of this moment), a PowerBook G3 running... (5 Replies)
Discussion started by: dewhite04
5 Replies

3. UNIX for Dummies Questions & Answers

How Can I Play A Cd On Unix

HI I AM A FRESH NEW USER ...I MEAN I JUST GOT A COMPUTER ALMOST FOR FREE AND IT RUNS UNIX WHICH I DIDN'T EXPECT AND DONT KNOW HOW TO WORK ON IT I THOUGHT IT'LL BE WITH WINDOWS ..YOU KNOW SO HOW DO I PLAY A CD IN IT. REMEMBER I KNOW NOTHING ABOUT UNIX , BUT I THINK I'LL GET OVER IT... (1 Reply)
Discussion started by: IMOTEB
1 Replies

4. UNIX for Advanced & Expert Users

play

dear friends, i have linux system . can i play songs in linux system. like winamp player in windows. let me know. (2 Replies)
Discussion started by: rajan_ka1
2 Replies

5. Linux

how can i play the gam

can some1 tell me how to start playing? (2 Replies)
Discussion started by: 123456
2 Replies

6. Linux

Can not play sound in Linux RHEL5.

Hi All, Recently I installed Linux RHEL5 on my machine. It seems that I can not play sound on RHEL5. I have real player installed along with RHEL5 but, when I try to play any song, the error message comes up saying "Can not open the audio device.Another application may be using it." Does any... (2 Replies)
Discussion started by: gydave
2 Replies

7. Slackware

Can't play sound files with aplay or cat to /dev/dsp

I am having problems using soundes. Until a few moments ago the following commands produced errors and no sound: cat /usr/share/apps/kolf/sounds/blackhole.wav/ > /dev/dsp yielded: /dev/dsp: Invalid argument cat /usr/share/apps/kolf/sounds/blackhole.wav > /dev/audio yelded: /dev/audio:... (3 Replies)
Discussion started by: slak0
3 Replies

8. Shell Programming and Scripting

Making a play-list

approximately the same question as the last time, but unfortunately I didn't get a working answer. I made a script with bash and gtkdialog that create a play-list. The output is for example : gtk-media-pause | CB60471-05 - Gilbert, Brantley - Country Must Be Country Wide.zip | 28897 |... (3 Replies)
Discussion started by: jkfloris
3 Replies
NA_RECORD(1)						    BSD General Commands Manual 					      NA_RECORD(1)

NAME
na_record -- record waveform from audio device SYNOPSIS
na_record [-h] [-f sampling rate] [-audiodevice device] [-time seconds] [-o file] [-otype type] [-ostype sample type] [-F sample rate] [-obo MSB | LSB | native] [-oswap] [-p audio device protocol] DESCRIPTION
na_record records digital audio data from the system's audio input device and writes it to the specified file. It supports a variety of out- put file formats and native audio devices. The following option flags are recognized: -h Prints a short summary of usage to standard output. -f sampling rate Sets the input sampling rate (in samples per second, i.e. Hz). Not all devices support all sampling rates, so it may be desire- able to set this separately from the output sampling rate. -audiodevice device Sets the audio device to record from, if supported by the audio protocol chosen (e.g. /dev/dsp, /dev/audio) -time seconds Stops recording after the specified number of seconds. -o file Writes sound output to the specified file -otype type Specifies the file format to use for output. Supported types currently include nist, est, dsps, snd, riff, aiff, audlab, raw, and ascii. The -h flag will show the most accurate list. The default type is nist. -F sampling rate Sets the output sampling rate (again, in samples per second, i.e. Hz). If this differs from the input sampling rate, resampling will be done. Defaults to 16000Hz. -obo byte order Sets the output byte order. Supported values are MSB, LSB, and native. Many file formats have their own byte order, or are byte order independent, so this isn't tremendously useful except for raw data. The default is the native byte order for the system audio device. -oswap Swap bytes when saving to output. -ostype sample type Sets the sample type of the output. Suported values are short, mulaw, byte, or ascii. Again, this is usually implied by the file format, so should only be used for raw data. The default is short (i.e. 16-bit PCM). -p audio device protocol Selects an audio device protocol (i.e. type of audio device) to use. This varies between different installations of Speech Tools, but defaults to the most 'native' audio device, usually Open Sound System on Linux and *BSD and /dev/audio on Solaris. ENVIRONMENT
NA_PLAY_PROTOCOL Audio protocol to use (as in the -p flag) NA_PLAY_HOST Host to record audio from when using a network audio protocol. EXAMPLES
To record five seconds of audio from /dev/dsp1 (on Linux) to foo.wav in RIFF format at 32kHz: $ na_record -time 5 -audiodevice /dev/dsp1 -o foo.wav -otype RIFF -f 32000 To record one second of audio to bar.wav in raw format in 8kHz mu-law: $ na_record -time 1 -o bar.wav -otype raw -ostype mulaw -f 8000 BUGS
The -time argument only accepts integer values (though the usage message implies otherwise) SEE ALSO
na_play(1) Edinburgh Speech Tools April 4, 2001 Edinburgh Speech Tools
All times are GMT -4. The time now is 05:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy