[package]
name = "gigastt"
version = "0.6.1"
edition = "2024"
description = "Local STT server powered by GigaAM v3 e2e_rnnt — on-device Russian speech recognition via ONNX Runtime"
license = "MIT"
repository = "https://github.com/ekhodzitsky/gigastt"
keywords = ["stt", "speech-recognition", "gigaam", "onnx", "russian"]
categories = ["multimedia::audio", "command-line-utilities"]

[features]
default = []
coreml = ["ort/coreml"]
cuda = ["ort/cuda"]
diarization = []
quantize = ["dep:onnx-pb", "dep:prost"]

[dependencies]
# ONNX Runtime
ort = "2.0.0-rc.12"

# Async runtime
tokio = { version = "1", features = ["full"] }

# HTTP + WebSocket server (single port via axum)
axum = { version = "0.8", features = ["ws", "multipart"] }
futures-util = "0.3"

# CLI
clap = { version = "4", features = ["derive"] }

# HTTP client for model download
reqwest = { version = "0.12", features = ["stream"] }

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Error handling
anyhow = "1"

# Cryptographic hashing for model verification
sha2 = "0.10"

# FFT for mel spectrogram
rustfft = "6"

# High-quality audio resampling
rubato = "0.16"

# Async stream adapters (ReceiverStream for SSE)
tokio-stream = "0.1"

# Audio file reading (for `transcribe` command)
symphonia = { version = "0.5", features = ["aac", "isomp4", "mp3", "ogg", "flac", "pcm", "wav"] }
onnx-pb = { version = "0.1.4", optional = true }
prost = { version = "0.6", optional = true }

[[test]]
name = "benchmark"
harness = false

[dev-dependencies]
tempfile = "3"
tokio-tungstenite = "0.28"

[profile.release]
lto = true
codegen-units = 1
strip = true
