← 返回命令列表

Linux command

asak 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Record audio

asak rec [output]

Play back

asak play [input.wav]

Play a file interactively

asak play

Record using a specific audio device

asak rec -d [device_index] [output]

Monitor audio input

asak monitor

Monitor with a custom buffer size

asak monitor -b [2048]

List available audio devices

asak list

说明

asak (audio Swiss Army knife) is a cross-platform audio recording and playback CLI tool with a terminal user interface, written in Rust. It aims to provide functionality similar to SoX but with an interactive and visual experience. The tool provides four main subcommands. rec records audio from an input device to a WAV file; if no filename is given, it prompts interactively and suggests a UTC-timestamped default name. play plays back a WAV file; if no file is specified, it searches the current directory for WAV files and presents an interactive selection menu. monitor routes audio from the input device to the output device in real time with a visual scope display, useful for quickly testing a microphone or speaker setup. list displays all available audio input and output devices with their indices. asak uses cpal as its audio backend and ratatui for its terminal UI, providing visual feedback such as level meters and playback animations. Audio resampling is handled via the dasp library when the source and target sample rates differ.

参数

-j, --jack
Use the JACK audio backend instead of the default. Only available on Linux, DragonFly BSD, FreeBSD, and NetBSD when built with the jack feature.
-d _index_, --device _index_
The audio device index to use for recording or playback. Run asak list to see available devices and their indices.
-b _size_, --buffer_size _size_
Buffer size for audio input monitoring. Defaults to 1024. Higher values increase latency.
-h, --help
Display help information and exit.
-V, --version
Display version information and exit.

FAQ

What is the asak command used for?

asak (audio Swiss Army knife) is a cross-platform audio recording and playback CLI tool with a terminal user interface, written in Rust. It aims to provide functionality similar to SoX but with an interactive and visual experience. The tool provides four main subcommands. rec records audio from an input device to a WAV file; if no filename is given, it prompts interactively and suggests a UTC-timestamped default name. play plays back a WAV file; if no file is specified, it searches the current directory for WAV files and presents an interactive selection menu. monitor routes audio from the input device to the output device in real time with a visual scope display, useful for quickly testing a microphone or speaker setup. list displays all available audio input and output devices with their indices. asak uses cpal as its audio backend and ratatui for its terminal UI, providing visual feedback such as level meters and playback animations. Audio resampling is handled via the dasp library when the source and target sample rates differ.

How do I run a basic asak example?

Run `asak rec [output]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -j, --jack do in asak?

Use the JACK audio backend instead of the default. Only available on Linux, DragonFly BSD, FreeBSD, and NetBSD when built with the jack feature.