# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "phostt"
version = "0.2.0"
authors = ["Eugene Khodzitsky <eugene.khodzitsky@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Local STT server powered by Zipformer-vi RNN-T — on-device Vietnamese speech recognition via ONNX Runtime"
readme = "README.md"
keywords = [
    "stt",
    "speech-recognition",
    "zipformer",
    "onnx",
    "vietnamese",
]
categories = [
    "multimedia::audio",
    "command-line-utilities",
]
license = "MIT"
repository = "https://github.com/ekhodzitsky/phostt"

[features]
coreml = ["ort/coreml"]
cuda = ["ort/cuda"]
default = []
diarization = []
ffi = ["ort/nnapi"]

[lib]
name = "phostt"
path = "src/lib.rs"

[[bin]]
name = "phostt"
path = "src/main.rs"

[[test]]
name = "e2e_errors"
path = "tests/e2e_errors.rs"

[[test]]
name = "e2e_rate_limit"
path = "tests/e2e_rate_limit.rs"

[[test]]
name = "e2e_rest"
path = "tests/e2e_rest.rs"

[[test]]
name = "e2e_shutdown"
path = "tests/e2e_shutdown.rs"

[[test]]
name = "e2e_ws"
path = "tests/e2e_ws.rs"

[[test]]
name = "load_test"
path = "tests/load_test.rs"

[[test]]
name = "soak_test"
path = "tests/soak_test.rs"

[[test]]
name = "wer"
path = "tests/wer.rs"

[[bench]]
name = "latency"
path = "benches/latency.rs"
harness = false

[dependencies.anyhow]
version = "1"

[dependencies.async-channel]
version = "2"

[dependencies.axum]
version = "0.8"
features = [
    "ws",
    "multipart",
]

[dependencies.bytes]
version = "1"

[dependencies.bzip2]
version = "0.6"

[dependencies.clap]
version = "4"
features = [
    "derive",
    "env",
]

[dependencies.dashmap]
version = "6"

[dependencies.futures-util]
version = "0.3"

[dependencies.kaldi-native-fbank]
version = "0.1"

[dependencies.ort]
version = "2.0.0-rc.12"

[dependencies.reqwest]
version = "0.13"
features = ["stream"]

[dependencies.rubato]
version = "0.16"

[dependencies.rustfft]
version = "6"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.10"

[dependencies.symphonia]
version = "0.5"
features = [
    "aac",
    "isomp4",
    "mp3",
    "ogg",
    "flac",
    "pcm",
    "wav",
]

[dependencies.tar]
version = "0.4"

[dependencies.tokio]
version = "1"
features = ["full"]

[dependencies.tokio-stream]
version = "0.1"

[dependencies.tokio-util]
version = "0.7"
features = ["rt"]

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tokio-tungstenite]
version = "0.29"

[dev-dependencies.tract-onnx]
version = "0.22.1"

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