-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathCargo.toml
More file actions
73 lines (58 loc) · 2 KB
/
Cargo.toml
File metadata and controls
73 lines (58 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[package]
name = "cohere-transcribe-rs"
version = "0.1.1"
edition = "2021"
license = "Apache-2.0"
description = "Rust implementation for the CohereLabs/cohere-transcribe-03-2026 speech-to-text model. Includes a CLI and an OpenAI-compatible API server."
repository = "https://github.com/second-state/cohere_transcribe_rs"
keywords = ["speech-to-text", "transcription", "asr", "mlx", "libtorch"]
categories = ["multimedia::audio", "command-line-utilities"]
exclude = ["mlx-c/", ".github/", "tests/", "models/", "tools/", ".gitmodules"]
[[bin]]
name = "transcribe"
path = "src/main.rs"
[[bin]]
name = "transcribe-server"
path = "src/bin/server.rs"
[dependencies]
# libtorch backend (Linux x86_64 / aarch64 with SVE)
# tch 0.20 (torch 2.4 C++ API) + LIBTORCH_BYPASS_VERSION_CHECK works with libtorch 2.7.x
# See https://github.com/second-state/qwen3_asr_rs for the same approach
tch = { version = "0.20", optional = true }
# Model weight loading (shared by both backends)
safetensors = "0.5.3"
# Audio decoding (pure Rust: WAV, FLAC, MP3, AAC, OGG, ...)
symphonia = { version = "0.5", features = ["mp3", "aac", "flac", "ogg", "wav"] }
# Audio resampling
rubato = "0.16"
# FFT for mel spectrogram computation
rustfft = "6"
num-complex = "0.4"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Error handling
anyhow = "1"
thiserror = "1"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# CLI argument parsing
clap = { version = "4", features = ["derive"] }
# API server
axum = { version = "0.7", features = ["multipart"] }
tokio = { version = "1", features = ["full"] }
tower-http = { version = "0.5", features = ["cors", "trace"] }
tempfile = "3"
[features]
# Exactly one backend must be selected.
# tch-backend: libtorch C++ (Linux x86_64 / aarch64, default)
# mlx: Apple MLX via C FFI (macOS Apple Silicon only)
default = ["tch-backend"]
tch-backend = ["dep:tch"]
mlx = []
[build-dependencies]
cmake = "0.1"
[profile.release]
opt-level = 3
lto = "thin"