chaosprint / asak Goto Github PK
View Code? Open in Web Editor NEWA cross-platform audio recording/playback CLI tool with TUI, written in Rust.
License: MIT License
A cross-platform audio recording/playback CLI tool with TUI, written in Rust.
License: MIT License
On macOS Ventura, asak 0.3.3
.
lm@neutrino Downloads % RUST_BACKTRACE=full asak play 12\ Isarflimmern.wav
thread 'main' panicked at src/playback.rs:300:45:
index out of bounds: the len is 8072128 but the index is 8101366
stack backtrace:
0: 0x10083996c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7fda799bfa435f0f
1: 0x100844934 - core::fmt::write::h149c43f8c649a127
2: 0x10082a82c - std::io::Write::write_fmt::hc658f220ee6401ee
3: 0x1008397c0 - std::sys_common::backtrace::print::hd320cb51e23d85e7
4: 0x100835760 - std::panicking::default_hook::{{closure}}::h2a019217d59e304e
5: 0x10083547c - std::panicking::default_hook::h7115745ac0da2b42
6: 0x100835afc - std::panicking::rust_panic_with_hook::hcaae50c6a8446a46
7: 0x100839d48 - std::panicking::begin_panic_handler::{{closure}}::h3511e01278c0eee1
8: 0x100839b98 - std::sys_common::backtrace::__rust_end_short_backtrace::hb40ac48f98b88c7f
9: 0x100835844 - _rust_begin_unwind
10: 0x10085acd4 - core::panicking::panic_fmt::hd81673e1b116ffee
11: 0x10085ae1c - core::panicking::panic_bounds_check::hc81bd72e43e4b29a
12: 0x10076c4e4 - ratatui::terminal::terminal::Terminal<B>::draw::hb8831a3bf92146a5
13: 0x10075c970 - asak::playback::play_audio::heb81761218f536ce
14: 0x100773d3c - asak::main::h20e2bf02a7677445
15: 0x100748c18 - std::sys_common::backtrace::__rust_begin_short_backtrace::h703d3d2757c553a3
16: 0x100777dfc - std::rt::lang_start::{{closure}}::hd475ac4a0ad9792e
17: 0x100835798 - std::panicking::try::hd72586cf9ddb09aa
18: 0x100823cc4 - std::rt::lang_start_internal::ha2b1bf612bcbfcfb
19: 0x100776cb0 - _main
This is a track that was not recorded using asak. Let me know if you need the file for testing and I will try uploading somewhere or sharing it by email… although I had issues with several files.
Recording seemed to work great, as well as playback of asak recordings, thank you for the development of this! :-)
✗ asak rec
> Please enter the output wav file name: 2024-06-26T09:42:32Z.wav
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.12/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
thread 'main' panicked at src/record.rs:190:48:
called `Result::unwrap()` on an `Err` value: BackendSpecific { err: BackendSpecificError { description: "ALSA function 'snd_pcm_open' failed with error 'ENXIO: No such device or address'" } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
✗ asak -V
asak 0.3.3
I created an AUR package for asak here: https://aur.archlinux.org/packages/asak-git (builds from Git source)
I also would like to package it as a non-VCS package, so my question is are you planning to create releases on GitHub? 🐻
it says:
2024-08-20T13:28:35Z.wav: Protocol not found
Hi !
Really cool tool!!
Just tried it and record worked flawlessly for me, but play seems to play back the file at the wrong speed. The same file played with sox plays normally through once at normal speed but then in asak it is played twice at double speed it seems. Probably not adjusting for sample rate.
in recording if we have a prompt, it will make it very clear what the file name is and what the params are.
same for the plackback, with a list selector, it would almost be impossible to get file not exist error
it would be useful for synth playing
Hello,
Using Linux Mint 21 (Ubuntu 22.04-based) on an x64 platform, the following error prevents asak from being installed with cargo:
user@computer:~$ cargo install asak
Updating crates.io index
Installing asak v0.3.3
Updating crates.io index
Locking 199 packages to latest compatible versions
Adding bitflags v1.3.2 (latest: v2.6.0)
Adding compact_str v0.7.1 (latest: v0.8.0)
Adding coreaudio-rs v0.11.3 (latest: v0.12.0)
Adding crossterm v0.25.0 (latest: v0.28.1)
Adding crossterm v0.27.0 (latest: v0.28.1)
Adding itertools v0.12.1 (latest: v0.13.0)
Adding jni-sys v0.3.0 (latest: v0.4.0)
Adding libloading v0.7.4 (latest: v0.8.5)
Adding mio v0.8.11 (latest: v1.0.1)
Adding ndk v0.8.0 (latest: v0.9.0)
Adding ndk-sys v0.5.0+25.2.9519653 (latest: v0.6.0+11769913)
Adding ratatui v0.26.3 (latest: v0.27.0)
Adding rustc-hash v1.1.0 (latest: v2.0.0)
Adding toml_edit v0.21.1 (latest: v0.22.20)
Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.1+wasi-0.2.0)
Adding windows v0.54.0 (latest: v0.58.0)
Adding windows-core v0.52.0 (latest: v0.58.0)
Adding windows-core v0.54.0 (latest: v0.58.0)
Adding windows-result v0.1.2 (latest: v0.2.0)
Adding windows-sys v0.45.0 (latest: v0.59.0)
Adding windows-sys v0.48.0 (latest: v0.59.0)
Adding windows-sys v0.52.0 (latest: v0.59.0)
Adding windows-targets v0.42.2 (latest: v0.52.6)
Adding windows-targets v0.48.5 (latest: v0.52.6)
Adding windows_aarch64_gnullvm v0.42.2 (latest: v0.52.6)
Adding windows_aarch64_gnullvm v0.48.5 (latest: v0.52.6)
Adding windows_aarch64_msvc v0.42.2 (latest: v0.52.6)
Adding windows_aarch64_msvc v0.48.5 (latest: v0.52.6)
Adding windows_i686_gnu v0.42.2 (latest: v0.52.6)
Adding windows_i686_gnu v0.48.5 (latest: v0.52.6)
Adding windows_i686_msvc v0.42.2 (latest: v0.52.6)
Adding windows_i686_msvc v0.48.5 (latest: v0.52.6)
Adding windows_x86_64_gnu v0.42.2 (latest: v0.52.6)
Adding windows_x86_64_gnu v0.48.5 (latest: v0.52.6)
Adding windows_x86_64_gnullvm v0.42.2 (latest: v0.52.6)
Adding windows_x86_64_gnullvm v0.48.5 (latest: v0.52.6)
Adding windows_x86_64_msvc v0.42.2 (latest: v0.52.6)
Adding windows_x86_64_msvc v0.48.5 (latest: v0.52.6)
Adding winnow v0.5.40 (latest: v0.6.18)
Compiling libc v0.2.155
Compiling cfg-if v1.0.0
Compiling proc-macro2 v1.0.86
Compiling unicode-ident v1.0.12
Compiling autocfg v1.3.0
Compiling byteorder v1.5.0
Compiling pkg-config v0.3.30
Compiling log v0.4.22
Compiling dasp_sample v0.11.0
Compiling crossbeam-utils v0.8.20
Compiling signal-hook v0.3.17
Compiling parking_lot_core v0.9.10
Compiling once_cell v1.19.0
Compiling lock_api v0.4.12
Compiling rustversion v1.0.17
Compiling scopeguard v1.2.0
Compiling bitflags v1.3.2
Compiling version_check v0.9.5
Compiling smallvec v1.13.2
Compiling jack-sys v0.5.1
Compiling dasp_frame v0.11.0
Compiling ahash v0.8.11
Compiling bitflags v2.6.0
Compiling quote v1.0.36
Compiling signal-hook-registry v1.4.2
Compiling mio v0.8.11
Compiling syn v2.0.72
Compiling heck v0.5.0
Compiling parking_lot v0.12.3
Compiling signal-hook-mio v0.2.4
error: failed to run custom build command for `jack-sys v0.5.1`
Caused by:
process didn't exit successfully: `/tmp/cargo-installzGuGsL/release/build/jack-sys-d8a23dfa92841928/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=JACK_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=JACK_STATIC
cargo:rerun-if-env-changed=JACK_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jack-sys-0.5.1/build.rs:13:23:
called `Result::unwrap()` on an `Err` value: "\npkg-config exited with status code 1\n> PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags jack\n\nThe system library `jack` required by crate `jack-sys` was not found.\nThe file `jack.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.\nThe PKG_CONFIG_PATH environment variable is not set.\n\nHINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `jack.pc`.\n"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `asak v0.3.3`, intermediate artifacts can be found at `/tmp/cargo-installzGuGsL`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.