๐ต nu_plugin_audio_hook
A Nushell plugin for generating and playing sounds. Supports beeping, tone generation, metadata manipulation, and playback for multiple audio formats.
โจ Features
sound beepโ Play a simple beep sound.sound makeโ Generate a noise with a given frequency and duration.sound metaโ Retrieve metadata (duration, artist, album, etc.) from an audio file.sound meta setโ Modify ID3 metadata frames in an audio file. More about ID3.sound playโ Play an audio file. By default, supports FLAC, WAV, MP3, and OGG. Use theall-decodersfeature to enable AAC and MP4 playback.
๐ Usage
Generate a simple noise
Generate a noise sequence
[ |
Play an audio file (first 3 seconds only)
Retrieve metadata from an audio file
Example Output:
โญโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ duration โ 4min 5sec 551ms 20ยตs 408ns โ
โ artist โ SINGER โ
โ title โ TITLE โ
โ album โ ALBUM โ
โ album_artist โ SINGER โ
โ track_no โ 1 โ
โ total_tracks โ 1 โ
โฐโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Modify ID3 metadata (change the artist tag)
Play an MP3 file using its metadata duration
|
List all available ID3 frame names
๐ง Installation
๐ Recommended: Using nupm
๐ ๏ธ Manual Compilation
๐ฆ Install via Cargo (using git)
๐ฆ Install via Cargo (crates.io) Not Recommended
Since I live in Iran and crates.io often restricts package updates, the version there might be outdated.
๐ Supported Features
You can enable specific features when compiling or installing:
fullโ Enables all features below.flac(default) โ FLAC format support.vorbis(default) โ OGG Vorbis support.wav(default) โ WAV format support.minimp3โ MP3 decoding.symphonia-allโ Enables all Symphonia-based decoders:symphonia-aacโ AAC decoding.symphonia-flacโ FLAC decoding.symphonia-isomp4โ MP4 (audio) decoding.symphonia-mp3(default) โ MP3 decoding.symphonia-vorbisโ OGG Vorbis decoding.symphonia-wavโ WAV decoding.