Files
Lumotia/src-tauri/Cargo.toml
Jake 9f53702c7e
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled
feat(tts): Phase 4 — Read Page Aloud with OS-native voices
Platform-dispatched TTS (spd-say + espeak-ng fallback on Linux, say on
macOS, PowerShell System.Speech on Windows) with a shared SpeakerButton
component. Tap to speak, tap again to stop; only one button speaks at
a time so two surfaces don't talk over each other. Text always travels
via argv (or a PowerShell here-string delivered through -EncodedCommand
on Windows) so user content never enters a shell string.

Mount points: DictationPage transcript footer, transcript viewer header,
per-step in MicroSteps. Settings gains a "Read aloud" accordion with
voice picker (lazy-loaded from the OS synth), rate slider 0.5-2.0x,
and a British-English test utterance.

Rust tests cover rate mapping, NaN handling, and Windows here-string
terminator safety. No pause/resume, no SSML, no cloud voices — that
stays out of scope per the Layer-1 roadmap.
2026-04-24 16:01:47 +01:00

86 lines
3.1 KiB
TOML

[package]
name = "kon"
version = "0.1.0"
description = "Kon — Think out loud"
authors = ["CORBEL Ltd"]
edition = "2021"
[lib]
name = "kon_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[features]
# Default build includes the Whisper backend. Disabling this feature
# also drops it from kon-transcription (see Cargo.toml in that crate)
# so a --no-default-features workspace build does not pull whisper-rs-sys.
# load_model_from_disk returns a runtime error for Engine::Whisper when
# this feature is off; Parakeet continues to work.
default = ["whisper"]
whisper = ["kon-transcription/whisper"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
# Used by the CSP regression guard in build.rs to parse tauri.conf.json
# and pull out app.security.csp rather than substring-matching the raw
# file. Keeps the guard robust against unrelated JSON values that
# happen to mention a localhost URL.
serde_json = "1"
[dependencies]
# Workspace crates
kon-core = { path = "../crates/core" }
kon-audio = { path = "../crates/audio" }
kon-transcription = { path = "../crates/transcription", default-features = false }
kon-ai-formatting = { path = "../crates/ai-formatting" }
kon-storage = { path = "../crates/storage" }
kon-cloud-providers = { path = "../crates/cloud-providers" }
kon-hotkey = { path = "../crates/hotkey" }
kon-llm = { path = "../crates/llm" }
# Tauri
tauri = { version = "2", features = ["tray-icon"] }
tauri-plugin-opener = "2"
tauri-plugin-dialog = "2"
tauri-plugin-global-shortcut = "2"
tauri-plugin-updater = "2"
tauri-plugin-window-state = "2"
# Serialisation
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Async runtime (spawn_blocking for inference)
tokio = { version = "1", features = ["rt", "sync"] }
arboard = "3.6.1"
# Runtime shared-library probe for the Vulkan loader (active compute
# device detection, brief item #1). We do not call any vulkan symbols
# — we only need to answer "is libvulkan resolvable from the loader's
# default search path right now?".
libloading = "0.8"
# SqlitePool is named directly from src-tauri/src/lib.rs (the AppState
# stores it). Must be unconditional, not Linux-only — naming a type from
# a transitive dep requires the dep be listed here too.
# See crates/storage/Cargo.toml — default-features = false drops macros /
# migrate / any / json which this crate doesn't use. Only names SqlitePool.
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite"] }
uuid = { version = "1", features = ["v4"] }
[target.'cfg(target_os = "linux")'.dependencies]
webkit2gtk = "2.0"
# Needed for setting the preview overlay's WindowTypeHint to Utility via
# the Tauri gtk_window() escape hatch. Versions track what webkit2gtk 2.0
# transitively depends on (GTK 3).
gtk = "0.18"
gdk = "0.18"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6.4"
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "NSString", "NSProcessInfo"] }
[target.'cfg(target_os = "windows")'.dependencies]
# Phase 4 TTS: PowerShell -EncodedCommand expects UTF-16-LE base64.
# Windows-only because the other platforms' TTS paths pass text via argv.
base64 = "0.22"