-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathCargo.toml
More file actions
160 lines (136 loc) · 4.55 KB
/
Cargo.toml
File metadata and controls
160 lines (136 loc) · 4.55 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
[package]
name = "sayna"
version = "0.1.9"
edition = "2024"
repository = "https://github.com/saynaai/sayna"
license = "Apache-2.0"
readme = "README.md"
keywords = ["voice", "stt", "tts", "livekit", "speech"]
categories = ["multimedia::audio", "web-programming"]
description = "Real-time voice processing server with unified STT and TTS services"
publish = false # Binary-only distribution via GitHub releases
[features]
default = []
stt-vad = ["dep:ort", "dep:ndarray", "dep:rustfft"]
noise-filter = [
"dep:deep_filter",
"dep:tract-core",
"dep:tract-onnx",
"dep:tract-pulse",
"dep:tract-hir",
"dep:ndarray",
"dep:num_cpus",
]
openapi = [
"dep:utoipa",
]
[dependencies]
async-trait = "0.1.88"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
# Server
axum = { version = "0.8.4", features = ["ws"] }
tokio = { version = "1.46.0", features = ["full"] }
tokio-util = { version = "0.7", features = ["rt"] }
tower = "0.5.2"
tower-http = { version = "0.6.6", features = ["trace"] }
futures = "0.3"
futures-util = "0.3"
bytes = "1.8"
http-body-util = "0.1"
# HTTP client
# Note: Using default-features = false + rustls-tls to avoid OpenSSL dependency
# This is important for cross-compilation to musl targets
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "stream", "http2"] }
hound = "3.5"
# JWT authentication
jsonwebtoken = { version = "10.2.0", features = ["rust_crypto"] }
# WebSocket client
tokio-tungstenite = { version = "0.28.0", features = ["rustls-tls-webpki-roots"] }
url = "2.5.0"
base64 = "0.22.0"
http = "1.0"
# TLS support
rustls = { version = "0.23", default-features = false, features = ["ring"] }
# Environment variables
dotenvy = "0.15"
# Configuration
serde_yaml = "0.9"
# Error handling
thiserror = "2.0.12"
# Performance optimizations
parking_lot = "0.12"
# Cache dependencies
moka = { version = "0.12", features = ["future"] }
xxhash-rust = { version = "0.8", features = ["xxh3"] }
arc-swap = "1.7"
# Logging
tracing = "0.1"
tracing-subscriber = "0.3"
# CLI
clap = { version = "4.5", features = ["derive"] }
# Text processing
regex = "1.10"
once_cell = "1.19"
uuid = { version = "1.10", features = ["v4"] }
object_store = { version = "0.12", features = ["aws"] }
# OpenAPI documentation (feature-gated)
utoipa = { version = "5.3", optional = true, features = ["axum_extras"] }
# LiveKit
livekit = "=0.7.24"
livekit-api = "=0.4.9"
livekit-protocol = "=0.5.1"
# Need prost/pbjson-types for SIP API client, using same versions as livekit to avoid conflicts
prost = "0.12.6"
pbjson-types = "0.6.0"
deep_filter = { git = "https://github.com/Rikorose/DeepFilterNet", rev = "f1d19bffbeccd98a616f23c89903a2386a1d1dba", package = "deep_filter", default-features = true, features = ["tract", "default-model-ll"], optional = true }
tract-core = { version = "=0.21.5", optional = true }
tract-onnx = { version = "=0.21.5", optional = true }
tract-pulse = { version = "=0.21.5", optional = true }
tract-hir = { version = "=0.21.5", optional = true }
time = ">=0.3.35"
# Using 0.15.6 to match DeepFilterNet - ort will work with explicit type conversions
ndarray = { version = "0.15.6", optional = true }
num_cpus = { version = "1.17.0", optional = true }
# Turn detection dependencies
ort = { version = "2.0.0-rc.10", features = ["load-dynamic", "download-binaries"], optional = true }
rustfft = { version = "6.2", optional = true }
sha2 = "0.10"
hmac = "0.12"
hex = "0.4"
subtle = "2.6"
anyhow = "1.0"
# Google Cloud STT
# Using google-api-proto 1.678.0 for prost 0.12 compatibility with LiveKit
# (newer versions use prost 0.13 which conflicts with livekit's prost 0.12)
google-api-proto = { version = "=1.678.0", features = ["google-cloud-speech-v2"] }
google-cloud-auth = "1.2.0"
tonic = { version = "0.11", features = ["tls-roots", "prost", "channel"] }
prost-types = "0.12"
async-stream = "0.3"
[dev-dependencies]
tower = { version = "0.5.2", features = ["util"] }
tempfile = "3.8"
serial_test = "3.2"
tokio-test = "0.4"
mockito = "1.2"
wiremock = "0.6"
# Debug profile optimizations to fix tract codegen issues
# Disable debug assertions specifically for problematic dependencies
[profile.dev.package.deep_filter]
debug-assertions = false
[profile.dev.package.tract-core]
debug-assertions = false
[profile.dev.package.tract-onnx]
debug-assertions = false
[profile.dev.package.tract-pulse]
debug-assertions = false
[profile.dev.package.tract-hir]
debug-assertions = false
# Release profile optimizations for smaller, faster binaries
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
strip = true
panic = "abort"