[package]
name = "otoji"
version = "0.1.13"
edition = "2021"
license = "MIT"
authors = ["snomiao <snomiao@gmail.com>"]
repository = "https://github.com/snomiao/otoji"
homepage = "https://github.com/snomiao/otoji"
description = "音字 — realtime speech ⇄ text. SenseVoice / iFlytek ASR + TTS, LLM polish, ratatui live transcript."
readme = "README.md"
keywords = ["asr", "speech", "tts", "realtime", "sensevoice"]
categories = ["command-line-utilities", "multimedia::audio"]
exclude = ["*.pcm", "test_*.md", "16k_*.md", "docs/", "scripts/"]

[lib]
name = "otoji"
path = "src/lib.rs"
crate-type = ["rlib", "cdylib"]

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

[[bin]]
name = "otoji-tray"
path = "src/bin/tray.rs"

[features]
default = []
# Enable the napi-rs Node.js / Bun bindings exposed via src/napi.rs.
node = ["dep:napi", "dep:napi-derive", "dep:napi-build"]

[dependencies]
tokio = { version = "1.40", features = ["full"] }
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
futures-util = "0.3"
async-trait = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "1"
anyhow = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
bytes = "1"
hmac = "0.12"
sha1 = "0.10"
sha2 = "0.10"
md-5 = "0.10"
base64 = "0.22"
url = "2"
urlencoding = "2"
hex = "0.4"
reqwest = { version = "0.12", features = ["json", "rustls-tls", "stream"], default-features = false }
ratatui = "0.28"
crossterm = "0.28"
cpal = "0.15"
clap = { version = "4", features = ["derive", "env"] }
hound = "3.5"
chrono = "0.4"
sherpa-onnx = "1.12"
signal-hook = "0.3"
dotenvy = "0.15"

# Optional Node/Bun binding deps (enabled with `--features node`).
napi = { version = "2", default-features = false, features = ["napi6", "async"], optional = true }
napi-derive = { version = "2", optional = true }
exec = "0.3.1"
similar = "2"
nnnoiseless = "0.5.2"
libc = "0.2"

[build-dependencies]
napi-build = { version = "2", optional = true }
