6 ms·
Looks very nice, would you tell us a little bit about what you used to build this? I am just getting started with Rust and it would be cool to hear what approac
by audio_stuff 4y ago
Looks very nice, would you tell us a little bit about what you used to build this? I am just getting started with Rust and it would be cool to hear what approach you went and what you would recommend when starting today.
- zduny 4y agoFlutter for the UI. Rust for the listening, and pitch detecting backend. Connected the former with the latter using flutter_rust_bridge. More details on Rust backend: For listening (getting audio signal from microphone) I used: - Android: https://crates.io/crates/oboe https://crates.io/crates/oboe - native desktop/iOS (not currently released): https://crates.io/crates/clap https://crates.io/crates/clap - Web: https://crates.io/crates/web-sys https://crates.io/crates/web-sys (so basically JS Web Audio API called from Rust compiled to WASM). For pitch detection: - https://crates.io/crates/pitch-detection https://crates.io/crates/pitch-detection
- bobajeff 4y ago>Flutter for the UI. Rust for the listening, and pitch detecting backend. Connected the former with the latter using flutter_rust_bridge. It's good to see that there is a active project to help with making Android apps using rust.
- frr149 4y agoWhy not just dart?
- mkss 4y agoDart being a GC'd runtime makes it quite hard to use for low latency audio applications, probably not as critical for audio input as output, but still potential issue, for more details see: https://github.com/dart-lang/sdk/issues/46943 https://github.com/dart-lang/sdk/issues/46943
- pjmlp 4y agoThen why bother with Flutter at all?
- audio_stuff 4y agoAwesome, thanks!
- sodality2 4y ago> - native desktop/iOS (not currently released): https://crates.io/crates/clap https://crates.io/crates/clap I hope you didn't use a command line parser to stream audio...
- zduny 4y agoI meant https://github.com/RustAudio/cpal https://github.com/RustAudio/cpal (should've checked).
- sodality2 4y agoHaha, no worries :) "clap" does indeed sound audio-related, and "clap" is only one transposition from "cpal"!
- audio_stuff 4y ago"clap" IS actually audio related too https://github.com/free-audio/clap https://github.com/free-audio/clap :)
- zduny 4y agoHeh, I always get those two crates names confused, even now, rereading comments I again thought it was "clap" and not "cpal" (because "clap" like in "clapping").