NA_RECORD(1)
β¨ NA_RECORD(1) β¨
ok so bestie, welcome to the na_record page from the General Commands Manual π this is the one that records waveform from audio device and honestly? iconic.
π NAME π
na_record β record waveform from audio device. that's it, that's the whole job, and she does it slayfully π«Ά
π¦ 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]
look at all those flags, she's literally dressed for every occasion π
π DESCRIPTION π
so what does na_record actually do? she grabs digital audio data from your system's audio input device and writes it straight to the file you picked. that's the main character move. she's also lowkey flexible β a whole variety of output file formats? supported. native audio devices? supported. we love a versatile queen π
here's the option flags she recognizes, no cap:
-hβ prints a short summary of usage to standard output. basically the "hey bestie here's how u use me" flag πΈ-fsampling rate β sets the input sampling rate, in samples per second (aka Hz, iykyk). heads up tho: not every device vibes with every sampling rate, so it may be desirable to set this separately from the output sampling rate. they're different things, don't be fooled π-audiodevicedevice β sets the audio device to record from, if it's supported by the audio protocol you chose (think stuff like/dev/dsp,/dev/audio) π§-timeseconds β stops recording after the specified number of seconds. a little timer, a little boundary, we stan β±οΈ-ofile β writes sound output to the specified file. yes the file. that one π-otypetype β specifies the file format for output. supported types currently includenist,est,dsps,snd,riff,aiff,audlab,raw, andascii. the-hflag will show the most accurate list (so like, trust-hover this list, fr fr). the default type isnistβ¨-Fsampling 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 β she'll do the work for u πͺ. defaults to16000Hz.-obobyte order β sets the output byte order. supported values areMSB,LSB, andnative. ngl this one isn't tremendously useful except for raw data, bc many file formats have their own byte order or are byte order independent entirely. the default is the native byte order for the system audio device π§-oswapβ swap bytes when saving to output. little endian to big endian glow-up π-ostypesample type β sets the sample type of the output. supported values areshort,mulaw,byte, orascii. again, this is usually implied by the file format, so it should only be used for raw data. the default isshort(i.e. 16-bit PCM) π-paudio device protocol β selects an audio device protocol (i.e. the type of audio device) to use. this varies between different installations of Speech Tools, but it defaults to the most 'native' audio device β usually Open Sound System on Linux and *BSD, and/dev/audioon Solaris π
πΈ ENVIRONMENT πΈ
the environment variables, the backstage crew, the ones working behind the scenes:
NA_PLAY_PROTOCOLβ audio protocol to use (same energy as the-pflag) πNA_PLAY_HOSTβ host to record audio from when using a network audio protocol. yes, record from a whole other host, networking era π»β¨
π₯ EXAMPLES π₯
ok so here's the tea, two little demos for u:
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
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
periodt. go make some files π
π BUGS π
the-timeargument only accepts integer values β even though the usage message implies otherwise π so like, don't come at her with2.5seconds, she will simply not. the usage message is lying to u a lil bit, sorry bestie π
π SEE ALSO π
na_play(1)β the other half of the duo, the playback queen πΆ
and that's the page!! mwah π
Edinburgh Speech Tools π April 4, 2001 β yeah she's an old icon, a vintage queen, still serving audio since '01 β π¦
π¦ where this page comes from
- debian bookworm: speech-tools 1:2.5.0-13
- debian trixie: speech-tools 1:2.5.0-13+b4
- ubuntu jammy: speech-tools 1:2.5.0-12
- ubuntu noble: speech-tools 1:2.5.0-13build2
- ubuntu questing: speech-tools 1:2.5.0-13build2
- ubuntu resolute: speech-tools 1:2.5.0-14build1
- ubuntu stonking: speech-tools 1:2.5.0-15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms