{"id":13550127,"url":"https://github.com/tazz4843/whisper-rs","last_synced_at":"2025-12-25T03:44:21.537Z","repository":{"id":61145840,"uuid":"548674012","full_name":"tazz4843/whisper-rs","owner":"tazz4843","description":"Rust bindings to https://github.com/ggerganov/whisper.cpp","archived":false,"fork":false,"pushed_at":"2024-05-01T22:37:04.000Z","size":434,"stargazers_count":580,"open_issues_count":20,"forks_count":101,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-02T02:27:19.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tazz4843.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-10T02:19:09.000Z","updated_at":"2024-05-29T00:57:13.014Z","dependencies_parsed_at":"2023-02-01T18:02:49.748Z","dependency_job_id":"0fa340f1-66f3-43df-9411-ee237c3d863d","html_url":"https://github.com/tazz4843/whisper-rs","commit_stats":{"total_commits":103,"total_committers":17,"mean_commits":"6.0588235294117645","dds":0.3980582524271845,"last_synced_commit":"efd18b6cc1ffc2b9561d038e9306251d5248c25d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tazz4843%2Fwhisper-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tazz4843%2Fwhisper-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tazz4843%2Fwhisper-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tazz4843%2Fwhisper-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tazz4843","download_url":"https://codeload.github.com/tazz4843/whisper-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222893024,"owners_count":17054034,"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":[],"created_at":"2024-08-01T12:01:29.260Z","updated_at":"2025-12-25T03:44:21.527Z","avatar_url":"https://github.com/tazz4843.png","language":"Rust","funding_links":[],"categories":["Rust","Summary","Frameworks","Machine Learning"],"sub_categories":[],"readme":"# MIGRATED\nThis repository has been migrated to Codeberg and this repository will recieve no more updates in the future. Open all future issues and PRs there. \n\n`whisper-rs` itself remains maintaned at https://codeberg.org/tazz4843/whisper-rs with no plans to discontinue it.\n\n## Why'd you do this?\n[This blogpost](https://skaye.blog/ai/ai-gitbail) is a good summary of my reasons. I recommend reading through it, but a tl;dr:\nI don't want to deal with GitHub's new GenAI bullshit features that result in more work than they \"save\", on top of their questionable licensing for a public domain project such as `whisper-rs`.\n\nUnlike most people who would be maintaining similar libraries, I am opposed to GenAI and similar \"tools\".\nThey do nothing besides wasting time and scarce natural resources that could be put to much better use otherwise.\n\n# whisper-rs\n\nRust bindings to [whisper.cpp](https://github.com/ggerganov/whisper.cpp/)\n\n## Usage\n\n```bash\ngit clone --recursive https://github.com/tazz4843/whisper-rs.git\n\ncd whisper-rs\n\ncargo run --example basic_use\n\ncargo run --example audio_transcription\n```\n\n```rust\nuse whisper_rs::{WhisperContext, WhisperContextParameters, FullParams, SamplingStrategy};\n\nfn main() {\n\tlet path_to_model = std::env::args().nth(1).unwrap();\n\n\t// load a context and model\n\tlet ctx = WhisperContext::new_with_params(\n\t\tpath_to_model,\n\t\tWhisperContextParameters::default()\n\t).expect(\"failed to load model\");\n\n\t// create a params object\n\tlet params = FullParams::new(SamplingStrategy::Greedy { best_of: 1 });\n\n\t// assume we have a buffer of audio data\n\t// here we'll make a fake one, floating point samples, 32 bit, 16KHz, mono\n\tlet audio_data = vec![0_f32; 16000 * 2];\n\n\t// now we can run the model\n\tlet mut state = ctx.create_state().expect(\"failed to create state\");\n\tstate\n\t\t.full(params, \u0026audio_data[..])\n\t\t.expect(\"failed to run model\");\n\n\t// fetch the results\n\tlet num_segments = state\n\t\t.full_n_segments()\n\t\t.expect(\"failed to get number of segments\");\n\tfor i in 0..num_segments {\n\t\tlet segment = state\n\t\t\t.full_get_segment_text(i)\n\t\t\t.expect(\"failed to get segment\");\n\t\tlet start_timestamp = state\n\t\t\t.full_get_segment_t0(i)\n\t\t\t.expect(\"failed to get segment start timestamp\");\n\t\tlet end_timestamp = state\n\t\t\t.full_get_segment_t1(i)\n\t\t\t.expect(\"failed to get segment end timestamp\");\n\t\tprintln!(\"[{} - {}]: {}\", start_timestamp, end_timestamp, segment);\n\t}\n}\n```\n\nSee [examples/basic_use.rs](examples/basic_use.rs) for more details.\n\nLower level bindings are exposed if needed, but the above should be enough for most use cases.\nSee the docs: https://docs.rs/whisper-rs/ for more details.\n\n## Feature flags\n\nAll disabled by default unless otherwise specified.\n\n* `raw-api`: expose whisper-rs-sys without having to pull it in as a dependency.\n  **NOTE**: enabling this no longer guarantees semver compliance,\n  as whisper-rs-sys may be upgraded to a breaking version in a patch release of whisper-rs.\n* `cuda`: enable CUDA support. Implicitly enables hidden GPU flag at runtime.\n* `hipblas`: enable ROCm/hipBLAS support. Only available on linux. Implicitly enables hidden GPU flag at runtime.\n* `openblas`: enable OpenBLAS support.\n* `metal`: enable Metal support. Implicitly enables hidden GPU flag at runtime.\n* `vulkan`: enable Vulkan support. Implicitly enables hidden GPU flag at runtime.\n* `log_backend`: allows hooking into whisper.cpp's log output and sending it to the `log` backend. Requires calling\n* `tracing_backend`: allows hooking into whisper.cpp's log output and sending it to the `tracing` backend.\n\n## Building\n\nSee [BUILDING.md](BUILDING.md) for instructions for building whisper-rs on Windows and OSX M1. Linux builds should just\nwork out of the box.\n\n## Troubleshooting\n\n* Something other than Windows/macOS/Linux isn't working!\n    * I don't have a way to test these platforms, so I can't really help you.\n        * If you can get it working, please open a PR with any changes to make it work and build instructions in\n          BUILDING.md!\n* I get a panic during binding generation build!\n    * You can attempt to fix it yourself, or you can set the `WHISPER_DONT_GENERATE_BINDINGS` environment variable.\n      This skips attempting to build the bindings whatsoever and copies the existing ones. They may be out of date,\n      but it's better than nothing.\n        * `WHISPER_DONT_GENERATE_BINDINGS=1 cargo build`\n    * If you can fix the issue, please open a PR!\n\n## License\n\n[Unlicense](LICENSE)\n\ntl;dr: public domain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftazz4843%2Fwhisper-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftazz4843%2Fwhisper-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftazz4843%2Fwhisper-rs/lists"}