[package] name = "impress_asr_input_rust" version = "0.1.0" edition = "2021" authors = ["Your Name "] description = "高性能跨平台桌面语音识别输入工具" license = "MIT" repository = "https://github.com/your-username/impress_asr_input_rust" keywords = ["asr", "speech-to-text", "onnx", "audio"] categories = ["multimedia::audio"] [features] default = [] gui = ["dep:tauri", "dep:tauri-plugin-shell", "dep:tauri-plugin-dialog", "dep:tauri-plugin-fs", "dep:global-hotkey", "dep:tauri-build", "dep:cfg_aliases"] [dependencies] # Tauri v2 桌面应用框架 (可选,需要 `cargo build --features gui`) tauri = { version = "2", features = ["tray-icon"], optional = true } tauri-plugin-shell = { version = "2", optional = true } tauri-plugin-dialog = { version = "2", optional = true } tauri-plugin-fs = { version = "2", optional = true } # 全局快捷键 global-hotkey = { version = "0.6", optional = true } # ONNX Runtime - 语音识别核心 (使用 2.x rc 版本, 需要手动提供 onnxruntime 库) ort = { version = "2.0.0-rc.12", default-features = false, features = [] } cpal = "0.15" ureq = { version = "2", default-features = false, features = ["tls"] } # 音频处理 hound = "3.5" # WAV 文件读写 rubato = "0.15" # 高质量音频重采样 realfft = "3.3" # FFT 用于音频特征提取 # 张量处理 ndarray = "0.15" # 异步运行时 tokio = { version = "1", features = ["full"] } # 序列化/配置 serde = { version = "1", features = ["derive"] } serde_json = "1" toml = "0.8" # 日志 tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } # 错误处理 anyhow = "1" thiserror = "1" # 其他工具 dirs = "5" # 跨平台目录路径 once_cell = "1" # 懒加载 parking_lot = "0.12" # 高级锁原语 uuid = { version = "1", features = ["v4"] } # 唯一 ID chrono = { version = "0.4", features = ["serde"] } # 命令行解析 clap = { version = "4", features = ["derive"] } [build-dependencies] tauri-build = { version = "2", features = [], optional = true } cfg_aliases = { version = "0.2", optional = true } chrono = "0.4" [dev-dependencies] criterion = { version = "0.5", features = ["html_reports"] } [[bin]] name = "impress_asr" path = "src/bin/cli.rs" [[bin]] name = "impress_asr_gui" path = "src/main.rs" required-features = ["gui"] [lib] name = "impress_asr_lib" path = "src/lib.rs" # 性能优化配置 [profile.release] lto = true codegen-units = 1 opt-level = 3 strip = true # 开发环境优化 [profile.dev] opt-level = 1 # 平台特定配置 [target.'cfg(windows)'.dependencies] windows = { version = "0.58", features = ["Win32_Media_Audio"] } [target.'cfg(target_os = "macos")'.dependencies] coreaudio-sys = "0.2"