-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCargo.toml
More file actions
143 lines (126 loc) · 5.32 KB
/
Copy pathCargo.toml
File metadata and controls
143 lines (126 loc) · 5.32 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
[package]
name = "eaRS"
version = "0.6.0"
edition = "2024"
description = "Easy automatic speech recognition library using Kyutai's STT models"
license = "MIT"
repository = "https://github.com/tommyfalkowski/eaRS"
authors = ["Tommy Falkowski"]
homepage = "https://byteowlz.com"
[build-dependencies]
pkg-config = "0.3"
[lib]
name = "ears"
path = "src/lib.rs"
[[bin]]
name = "ears"
path = "src/main.rs"
[[bin]]
name = "ears-server"
path = "src/bin/ears-server.rs"
[[bin]]
name = "ears-dictation"
path = "src/bin/ears-dictation.rs"
[dependencies]
aho-corasick = "1"
anyhow = "1.0"
atty = "0.2"
candle = { version = "0.9", package = "candle-core" }
candle-nn = "0.9"
clap = { version = "4.4.12", features = ["derive"] }
cpal = "0.16"
crossbeam-channel = "0.5"
hf-hub = "0.4.3"
kaudio = "0.2.1"
moshi = "0.6.4"
# prkt must come before sentencepiece to ensure ort's protobuf symbols are used
# (both bundle protobuf-lite, and the linker uses the first definition)
prkt = { path = "prkt", optional = true }
# Pin ort to a version compatible with both prkt (caret ^2.0.0-rc.10) and
# parakeet-rs (caret ^2.0.0-rc.12). eaRS pins exact so both engines resolve to
# one ort; rc.12 satisfies both caret requirements. eaRS's own ort dep is only
# pulled by the prkt `parakeet` feature (it is optional below).
ort = { version = "=2.0.0-rc.12", optional = true, features = ["load-dynamic"] }
ort-sys = { version = "=2.0.0-rc.12", optional = true, features = ["download-binaries", "disable-linking"] }
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.115"
toml = "0.9"
dirs = "6.0"
time = { version = "0.3", features = ["formatting"] }
tokio = { version = "1.0", features = ["full"] }
tokio-tungstenite = "0.28"
futures = "0.3"
indicatif = "0.17.5"
uuid = { version = "1.0", features = ["v4"] }
colored = "3.0"
libc = "0.2"
enigo = "0.6"
rdev = "0.5"
futures-util = "0.3"
ctrlc = { version = "3.4", features = ["termination"] }
# cudarc auto-detects CUDA version from the build system (nvcc)
# Users can override by setting CUDARC_CUDA_VERSION environment variable
cudarc = { version = "0.17", optional = true, features = ["cuda-version-from-build-system"] }
notifica = "3.0.2"
webrtc-vad = { version = "0.4", optional = true }
# parakeet-rs (Nemotron streaming). Mutually exclusive in practice with the
# `parakeet` (prkt) feature: prkt pins ort =2.0.0-rc.10 while parakeet-rs needs
# ort 2.0.0-rc.12, and eaRS's own `ort` dep is optional (only pulled by the
# prkt feature), so do not enable both `parakeet` and `parakeet-rs` together.
parakeet-rs = { package = "parakeet-rs", git = "https://github.com/altunenes/parakeet-rs.git", rev = "086e3bb734dd9a3f01e4e99ef6895da0db85b47a", optional = true, default-features = false }
# transcribe.cpp GGUF streaming engine. Pinned past the 0.1.3 crates.io
# release because multitalker-parakeet streaming landed after it. Builds the
# C++ library from source via cmake; backend features (metal/cuda) are
# forwarded from eaRS's `apple`/`nvidia` features.
transcribe-cpp = { git = "https://github.com/handy-computer/transcribe.cpp.git", rev = "5a5a49664a8ea1f0e5b3be1dfc544730d1b62561", optional = true, default-features = false }
# `ears models refresh` fetches the maintained catalog.json. Reuses hf-hub's TLS
# stack (native-tls); already in the tree, so this adds no new transitive cost.
ureq = { version = "2.12", optional = true }
# Platform-specific sentencepiece configuration
# All platforms: compile from source (static linking).
[target.'cfg(target_os = "linux")'.dependencies]
sentencepiece = { version = "0.12", features = ["static"] }
uinput = "0.1"
# hf-hub's sync (ureq) path uses native-tls -> openssl-sys on Linux. Build
# OpenSSL from source so cross-compiled release artifacts (cargo-zigbuild) do
# not depend on a system OpenSSL that isn't present in the cross sysroot.
openssl = { version = "0.10", features = ["vendored"] }
[target.'cfg(not(target_os = "linux"))'.dependencies]
sentencepiece = { version = "0.12", features = ["static"] }
[features]
default = []
cudnn = ["candle/cudnn", "candle-nn/cudnn"]
hooks = []
# Engines
parakeet = ["dep:prkt", "dep:ort", "dep:ort-sys", "dep:webrtc-vad"]
# parakeet-rs Nemotron streaming engine (ort 2.0.0-rc.12). Enables ort via
# parakeet-rs's own features. Do NOT combine with the `parakeet` (prkt) feature.
# Dynamic ORT avoids symbol collisions with eaRS's statically linked
# SentencePiece protobuf-lite. Set ORT_DYLIB_PATH to the ORT dylib at runtime.
parakeet-rs = ["dep:parakeet-rs", "parakeet-rs/cpu", "parakeet-rs/load-dynamic"]
# transcribe.cpp GGUF engine (streaming multitalker/nemotron models).
# CPU-only by default; combine with `metal`/`cuda` for GPU compute.
transcribe-cpp = ["dep:transcribe-cpp", "dep:ureq"]
# Acceleration (shared flags)
nvidia = ["dep:cudarc", "candle/cuda", "candle-nn/cuda", "transcribe-cpp?/cuda"]
apple = ["candle/metal", "candle-nn/metal", "transcribe-cpp?/metal"]
amd = []
directml = []
# Backwards-compat aliases
cuda = ["nvidia"]
metal = ["apple"]
parakeet-cuda = ["parakeet", "nvidia"]
parakeet-coreml = ["parakeet", "apple"]
parakeet-directml = ["parakeet", "directml"]
parakeet-rocm = ["parakeet", "amd"]
[profile.release]
debug = true
[profile.release-no-debug]
inherits = "release"
debug = false
# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
[patch.crates-io]
sentencepiece-sys = { path = "vendor/sentencepiece-sys" }