A Nushell plugin for generating and playing sounds. Supports beeping, tone generation, metadata manipulation, and playback for multiple audio formats.
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.
sound make 1000 200ms[ 300.0, 500.0, 1000.0, 400.0, 600.0 ] | each { |it| sound make $it 150ms }sound play audio.mp3 -d 3secsound meta audio.mp4Example Output:
╭──────────────┬────────────────────────────╮
│ duration │ 4min 5sec 551ms 20µs 408ns │
│ artist │ SINGER │
│ title │ TITLE │
│ album │ ALBUM │
│ album_artist │ SINGER │
│ track_no │ 1 │
│ total_tracks │ 1 │
╰──────────────┴────────────────────────────╯
sound meta set audio.mp3 -k TPE1 -v new-artistsound meta audio.mp4 | sound play audio.mp3 -d $in.durationsound meta list🚀 Recommended: Using nupm
git clone https://github.com/FMotalleb/nu_plugin_audio_hook.git
nupm install --path nu_plugin_audio_hook -f git clone https://github.com/FMotalleb/nu_plugin_audio_hook.git
cd nu_plugin_audio_hook
cargo build -r --features=all-decoders
plugin add target/release/nu_plugin_audio_hook cargo install --git https://github.com/FMotalleb/nu_plugin_audio_hook.git --features=all-decoders
plugin add ~/.cargo/bin/nu_plugin_audio_hook Since I live in Iran and crates.io often restricts package updates, the version there might be outdated.
cargo install nu_plugin_audio_hook --features=all-decoders
plugin add ~/.cargo/bin/nu_plugin_audio_hook 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.