-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathCargo.toml
More file actions
171 lines (133 loc) · 4.22 KB
/
Cargo.toml
File metadata and controls
171 lines (133 loc) · 4.22 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
[package]
name = "transcribe-rs"
version = "0.3.11"
build = "build.rs"
edition = "2021"
description = "A simple library to help you transcribe audio"
license = "MIT"
repository = "https://github.com/cjpais/transcribe-rs"
[features]
default = []
# Shared audio feature extraction (mel spectrogram, CTC decode, etc.)
audio-features = ["dep:ndarray", "dep:rustfft"]
# ONNX-based models (SenseVoice, GigaAM, Parakeet, Moonshine, Canary)
onnx = ["audio-features", "dep:ort", "dep:base64", "dep:regex", "dep:once_cell"]
# Whisper via whisper.cpp (CPU-only by default; add whisper-metal, whisper-vulkan, or whisper-cuda for GPU)
whisper-cpp = ["dep:whisper-rs", "whisper-rs/raw-api"]
# --- Whisper Accelerators ---
whisper-metal = ["whisper-cpp", "whisper-rs/metal"]
whisper-vulkan = ["whisper-cpp", "whisper-rs/vulkan"]
whisper-cuda = ["whisper-cpp", "whisper-rs/cuda"]
# Whisperfile server
whisperfile = ["dep:ureq"]
# Remote engines
openai = ["dep:async-openai", "dep:tokio", "dep:async-trait"]
# Silero neural VAD (requires silero_vad_v4.onnx model file)
vad-silero = ["dep:ort", "dep:ndarray"]
# --- ORT Accelerators ---
# Note: ort-cuda pulls in the CUDA execution provider, which adds ~800 MB+
# to the ORT binary and requires a CUDA toolkit / cuDNN installation at runtime.
ort-cuda = ["onnx", "ort/cuda"]
ort-tensorrt = ["ort-cuda", "ort/tensorrt"]
ort-directml = ["onnx", "ort/directml"]
ort-rocm = ["onnx", "ort/rocm"]
ort-coreml = ["onnx", "ort/coreml"]
ort-webgpu = ["onnx", "ort/webgpu"]
ort-xnnpack = ["onnx", "ort/xnnpack"]
ort-tracing = ["onnx", "ort/tracing"]
ort-accel = ["ort-cuda", "ort-tensorrt", "ort-directml", "ort-rocm", "ort-coreml", "ort-webgpu", "ort-xnnpack"]
# Convenience
all = ["onnx", "whisper-cpp", "whisperfile", "openai"]
[dependencies]
# Always required
thiserror = "2"
hound = "3.5.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
log = "0.4.28"
env_logger = "0.10.0"
derive_builder = { version = "0.20.2" }
# ONNX runtime
ort = { version = "=2.0.0-rc.12", optional = true }
ndarray = { version = "0.17", optional = true }
regex = { version = "1.11.2", optional = true }
once_cell = { version = "1.21.3", optional = true }
rustfft = { version = "6", optional = true }
base64 = { version = "0.22", optional = true }
# Whisperfile
ureq = { version = "3", optional = true }
# ITN (Inverse Text Normalization)
# nemo-text-processing = { version = "0.1.0", git = "https://github.com/FluidInference/text-processing-rs", optional = true } # TODO: re-enable when published to crates.io
# OpenAI
tokio = { version = "1.47.1", features = ["rt-multi-thread"], optional = true }
async-openai = { version = "0.29.3", optional = true }
async-trait = { version = "0.1.89", optional = true }
# Whisper (GPU features controlled by whisper-metal / whisper-vulkan / whisper-cuda feature flags)
whisper-rs = { version = "0.16.0", optional = true }
# Examples with required features
[[example]]
name = "parakeet"
required-features = ["onnx"]
[[example]]
name = "whisper"
required-features = ["whisper-cpp"]
[[example]]
name = "moonshine"
required-features = ["onnx"]
[[example]]
name = "moonshine_streaming"
required-features = ["onnx"]
[[example]]
name = "gigaam"
required-features = ["onnx"]
[[example]]
name = "sense_voice"
required-features = ["onnx"]
[[example]]
name = "canary"
required-features = ["onnx"]
[[example]]
name = "cohere"
required-features = ["onnx"]
[[example]]
name = "whisperfile"
required-features = ["whisperfile"]
[[example]]
name = "openai"
required-features = ["openai"]
[dev-dependencies]
once_cell = "1.21.3"
# Tests with required features
[[test]]
name = "parakeet"
required-features = ["onnx"]
[[test]]
name = "whisper"
required-features = ["whisper-cpp"]
[[test]]
name = "moonshine"
required-features = ["onnx"]
[[test]]
name = "gigaam"
required-features = ["onnx"]
[[test]]
name = "sense_voice"
required-features = ["onnx"]
[[test]]
name = "canary"
required-features = ["onnx"]
[[test]]
name = "cohere"
required-features = ["onnx"]
[[test]]
name = "whisperfile"
required-features = ["whisperfile"]
[[test]]
name = "openai"
required-features = ["openai"]
[[test]]
name = "transcriber"
required-features = ["onnx", "vad-silero"]
[[test]]
name = "vad_silero"
required-features = ["vad-silero"]