# 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.4.2"
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 = ["dep:polyvoice"]
ffi = ["ort/nnapi"]
openapi = [
    "dep:utoipa",
    "dep:utoipa-swagger-ui",
]

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

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

[[test]]
name = "benchmark_report"
path = "tests/benchmark_report.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 = "ep_smoke"
path = "tests/ep_smoke.rs"

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

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

[[test]]
name = "fleurs_wer"
path = "tests/fleurs_wer.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.polyvoice]
version = "0.4"
features = ["onnx"]
optional = true

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

[dependencies.rubato]
version = "2.0"

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

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.11"

[dependencies.silero]
version = "0.2.0"
features = ["bundled"]

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

[dependencies.tar]
version = "0.4"

[dependencies.tokio]
version = "1"
features = [
    "full",
    "test-util",
]

[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"]

[dependencies.utoipa]
version = "5"
features = ["axum_extras"]
optional = true

[dependencies.utoipa-swagger-ui]
version = "9"
features = ["axum"]
optional = true

[dependencies.uuid]
version = "1"
features = ["v4"]

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

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

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

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