.Dd April 4, 2001 .Dt NA_PLAY 1 .Os "Edinburgh Speech Tools" .Sh NAME .Nm na_record .Nd play waveform files on audio device .Sh SYNOPSIS .Nm na_play .Op Fl h .Op Fl itype Ar type .Op Fl n Ar channels .Op Fl f Ar sample rate .Op Fl ibo Ar byteorder .Op Fl iswap .Op Fl istype Ar type .Op Fl c Ar channel .Op Fl start Ar time .Op Fl end Ar time .Op Fl from Ar sample .Op Fl to Ar sample .Op Fl p Ar protocol .Op Fl command Ar command .Op Fl basic .Op Fl quality Ar high | low .Op Fl server Ar host .Op Fl scale Ar scale .Op Fl v .Op Fl wait .Ar input files ... .Sh DESCRIPTION .Nm na_play plays digital audio data to the system's audio input device from the specified file(s). It supports a variety of file formats and native audio devices. .Pp The following option flags are recognized: .Pp .Bl -tag -width 4n -offset indent -compact .It Fl h Prints a short summary of usage to standard output. .It Fl itype Ar type Input file type. Usually, the input type can be determined from the file's headers, so this option is not required except for raw (unheadered) data. Supported types are currently: nist, est, esps, snd, riff, aiff, audlab, raw, ascii. .It Fl n Ar channels Number of channels, in an unheadered input file. Again, this can usually be determined from the headers. Default is 1. .It Fl f Ar sampling rate Sampling rate, for an unheadered input file. Default is 16000. .It Fl ibo Ar byte order Byte order, for an unheadered input file. Default is system byte order. Recognized values are: MSB, LSB, native, nonnative. .It Fl iswap Swap bytes in an unheadered input file. .It Fl istype Ar type Sample type for an unheadered input file. Recognized values are: short, mulaw, byte, ascii. .It Fl c Ar channel Select a single channel (starting at 0) for playback. This option plays only the specified channel and discards all others. .It Fl start Ar time Select a subsection of the file, starting at this time (specified in seconds). .It Fl end Ar time Select a subsection of the file, ending at this time (specified in seconds). .It Fl from Ar sample Select a subsection of the file, starting at this offset (specified in number of samples). .It Fl to Ar sample Select a subsection of the file, ending at this offset (specified in number of samples). .It Fl p Ar protocol Use the specified audio device protocol. The list of supported types varies between platforms, and can be obtained using the .Fl h flag. .It Fl command Ar command If the "audio_command" protocol is specified, this argument must be given to select the command used to play the waveform. A temporary file is created and passed in the environment variable FILE. The sample rate is passed in the environment varialbe SR. .It Fl basic Treat unheadered input files as 8kHz mu-law data (i.e. audio/basic MIME type) .It Fl quality Ar high | low Select the quality of output. "high" will ensure that proper resampling is used. "low" means to play as fast as possible with a minimum of processor time. .It Fl server Ar host Specifies the host to play sound on, when using a network-aware audio protocol (such as NAS) .It Fl scale Ar scale Change the gain (volume) of the signal. The argument is a number relative to 1.0, which is the default. .It Fl v Be verbose (i.e. print file names when playing) .It Fl wait Pause for a keystroke between each file. .El .Sh ENVIRONMENT .Bl -tag -width 4n -offset indent -compact .It Ev NA_PLAY_PROTOCOL Audio protocol to use (as in the .Fl p flag) .It Ev NA_PLAY_COMMAND Command used to play audio when using the audio_command protocol. .It Ev NA_PLAY_HOST Host to play audio on when using a network audio protocol. .It Ev NA_PLAY_QUALITY Playback quality (low or high) .El .Sh EXAMPLES To play the section of foo.wav from 1.5 to 3.2 seconds: .Dl "$ na_play -start 1.5 -end 3.2 foo.wav" To play samples 3600 to 42000 of channel 1 of bar.wav: .Dl "$ na_play -from 3600 -to 4200 -c 1 foo.wav" .Sh BUGS The usage information isn't entirely correct. The audio_command protocol generates temporary files insecurely. .Sh SEE ALSO .Xr na_record 1