NA_PLAY(1)

✨ NA_PLAY(1) ✨

so this is a page from the General Commands Manual, bestie, and it's all about na_play β€” the little program that takes your waveform files and makes them come out of the audio device. 🎧✨


🌸 NAME 🌸

na_record β€” play waveform files on audio device

ngl i'm just the messenger here πŸ™ˆ that's literally what the page says in the NAME section, na_record, even though the whole rest of the page is about na_play. we keep the lore exactly as we found it. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

na_play [-h] [-itype type] [-n channels] [-f sample rate]
        [-ibo byteorder] [-iswap] [-istype type] [-c channel]
        [-start time] [-end time] [-from sample] [-to sample]
        [-p protocol] [-command command] [-basic] [-quality high | low]
        [-server host] [-scale scale] [-v] [-wait] input files ...

✨ DESCRIPTION ✨

okay so na_play plays digital audio data to the system's audio input device, pulling it from the file(s) you hand it. 🫢 it's giving versatile: a whole variety of file formats? supported. native audio devices? also supported. she contains multitudes. πŸ’–


πŸ“ the option flags πŸ“

here's every single flag she recognizes, no skips, no cuts, periodt:

  • -h β€” prints a short summary of usage to standard output. (your little help me out moment ✨)
  • -itype type β€” the input file type. usually the input type can just be figured out from the file's headers, so you lowkey don't need this option at all β€” except for raw (unheadered) data, where it's your only hope. supported types are currently: nist, est, esps, snd, riff, aiff, audlab, raw, ascii. 🌈
  • -n channels β€” number of channels, in an unheadered input file. again, this can usually be sniffed out from the headers. default is 1. πŸŽ€
  • -f sampling rate β€” sampling rate, for an unheadered input file. default is 16000. ⭐
  • -ibo byte order β€” byte order, for an unheadered input file. default is system byte order. recognized values are: MSB, LSB, native, nonnative. πŸ”₯
  • -iswap β€” swap bytes in an unheadered input file. πŸ”„
  • -istype type β€” sample type for an unheadered input file. recognized values are: short, mulaw, byte, ascii. πŸ¦‹
  • -c channel β€” select a single channel (starting at 0) for playback. this option plays only the specified channel and discards all others. brutal but efficient πŸ’€
  • -start time β€” select a subsection of the file, starting at this time (specified in seconds). ⏱️
  • -end time β€” select a subsection of the file, ending at this time (specified in seconds). ⏱️
  • -from sample β€” select a subsection of the file, starting at this offset (specified in number of samples). 🌸
  • -to sample β€” select a subsection of the file, ending at this offset (specified in number of samples). 🌸
  • -p protocol β€” use the specified audio device protocol. the list of supported types varies between platforms, and you can obtain it using the -h flag. 🌐
  • -command 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 variable SR. (yes, FILE and SR, capital letters, iykyk ✨)
  • -basic β€” treat unheadered input files as 8kHz mu-law data (i.e. audio/basic MIME type). 🎡
  • -quality 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. pick your fighter βš”οΈ
  • -server host β€” specifies the host to play sound on, when using a network-aware audio protocol (such as NAS). πŸ›°οΈ
  • -scale scale β€” change the gain (volume) of the signal. the argument is a number relative to 1.0, which is the default. πŸ”Š
  • -v β€” be verbose (i.e. print file names when playing). πŸ‘€
  • -wait β€” pause for a keystroke between each file. ⌨️

🌈 ENVIRONMENT 🌈

  • NA_PLAY_PROTOCOL β€” audio protocol to use (as in the -p flag). ✨
  • NA_PLAY_COMMAND β€” command used to play audio when using the audio_command protocol. ✨
  • NA_PLAY_HOST β€” host to play audio on when using a network audio protocol. ✨
  • NA_PLAY_QUALITY β€” playback quality (low or high). ✨

πŸ’… EXAMPLES πŸ’…

to play the section of foo.wav from 1.5 to 3.2 seconds:

$ na_play -start 1.5 -end 3.2 foo.wav

to play samples 3600 to 42000 of channel 1 of bar.wav:

$ na_play -from 3600 -to 4200 -c 1 foo.wav

and yes bestie, we're keeping both lines exactly as the page gives them to us β€” the prose says one thing and the command says another and that is simply the text we were handed. no cap, no edits. πŸ™ˆ


πŸ’€ BUGS πŸ’€

  • the usage information isn't entirely correct. 😭
  • the audio_command protocol generates temporary files insecurely.
ok so that second one is not a vibe, that's an actual security situation, so take it seriously fr fr. πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! 🫢✨ this little beauty comes to you from the Edinburgh Speech Tools, dated April 4, 2001, and if you want to see her again just look for NA_PLAY(1). mwah. πŸ’…πŸŽ€πŸŒΈ