{"id":19363131,"url":"https://github.com/meyda/meyda-rs","last_synced_at":"2025-04-23T13:31:53.977Z","repository":{"id":17481558,"uuid":"82072987","full_name":"meyda/meyda-rs","owner":"meyda","description":"This may become an audio feature extraction library for Rust.","archived":false,"fork":false,"pushed_at":"2025-01-28T08:30:44.000Z","size":75,"stargazers_count":23,"open_issues_count":11,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T15:38:30.741Z","etag":null,"topics":["audio","audio-analysis","audio-features","dsp","rust","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meyda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T15:05:05.000Z","updated_at":"2025-01-28T08:30:41.000Z","dependencies_parsed_at":"2022-07-26T17:15:24.916Z","dependency_job_id":null,"html_url":"https://github.com/meyda/meyda-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meyda%2Fmeyda-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meyda%2Fmeyda-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meyda%2Fmeyda-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meyda%2Fmeyda-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meyda","download_url":"https://codeload.github.com/meyda/meyda-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250440092,"owners_count":21430950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-analysis","audio-features","dsp","rust","rust-library"],"created_at":"2024-11-10T07:32:58.177Z","updated_at":"2025-04-23T13:31:53.636Z","avatar_url":"https://github.com/meyda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meyda-rs\n\n[![Build Status](https://travis-ci.org/meyda/meyda-rs.svg?branch=master)](https://travis-ci.org/meyda/meyda-rs)\n[![Code coverage](https://codecov.io/github/meyda/meyda-rs/coverage.svg?branch=master)](https://codecov.io/gh/meyda/meyda-rs)\n\n_It's like [meyda](https://github.com/hughrawlinson/meyda), but for Rust._\n\nThis project is heavily WIP and it's not wise to use it in production yet.\n\nThe plan is to initially provide a set of pure functions which operate on 64-bit float vectors, each vector being a frame of audio.\n\nLater on, `meyda-rs` should support file loading, configuration, overlapping frames, etc. to approach the API of Meyda.\n\n## Usage\n\nThis example creates a 1024-sample frame of white noise, and calculates its features.\n\n```rust\nextern crate meyda;\nextern crate rand;\n\nuse rand::Rng;\n\nfn main() {\n  const BUFFER_SIZE: usize = 1024;\n  const SAMPLE_RATE: f64 = 44100.0;\n\n  // create a vector of white noise\n  let mut generator = rand::thread_rng();\n  let signal: Vec\u003cf64\u003e = vec![0; BUFFER_SIZE]\n    .iter()\n    .map(|\u0026_sample| generator.gen_range(-1_f64..1_f64))\n    .collect();\n\n  // compute features\n  let rms = meyda::get_rms(\u0026signal);\n  let energy = meyda::get_energy(\u0026signal);\n  let zcr = meyda::get_zcr(\u0026signal);\n  // let power_spectrum = meyda::get_power_spectrum(\u0026signal);\n  let spectral_centroid = meyda::get_spectral_centroid(\u0026signal);\n  let spectral_flatness = meyda::get_spectral_flatness(\u0026signal);\n  let spectral_kurtosis = meyda::get_spectral_kurtosis(\u0026signal);\n  let spectral_rolloff = meyda::get_spectral_rolloff(\u0026signal, SAMPLE_RATE, Some(0.95));\n  let bark_loudness = meyda::get_bark_loudness(\u0026signal, SAMPLE_RATE);\n\n  println!(\"RMS is {} \\n energy is {:?}, zcr is {:?},\\n spectral centroid is {},\\n spectral flatness is {},\\n spectral kurtosis is {},\\n spectral rolloff is {},\\n Bark loudness is {:?}\", rms, energy, zcr, spectral_centroid, spectral_flatness, spectral_kurtosis,\n   spectral_rolloff, bark_loudness);\n}\n\n```\n\n## Development\n\nContributions are always welcome. The library _should_ be test-driven and all new features _should_ have accompanying tests.\n\nTests can be run with `cargo test` – each extractor function _should_ have a test module in the same file, and should make use of [meyda/gauge](https://github.com/meyda/gauge), which is submodule'd in `/src/utils`. The deserialized gauge data is provided by `utils::test` as a vector of `TestDataSet` structures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeyda%2Fmeyda-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeyda%2Fmeyda-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeyda%2Fmeyda-rs/lists"}