-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
100 lines (85 loc) · 3.65 KB
/
Copy pathCargo.toml
File metadata and controls
100 lines (85 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
[package]
name = "rust-tts-wrapper"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Cross-platform TTS wrapper with C API — mirrors js-tts-wrapper / SwiftTTSWrapper"
repository = "https://github.com/AACTools/rust-tts-wrapper"
keywords = ["tts", "text-to-speech", "speech", "accessibility", "assistive-technology"]
categories = ["accessibility", "api-bindings", "multimedia::audio"]
[lib]
crate-type = ["cdylib", "staticlib", "lib"]
[[example]]
name = "quick-start"
path = "examples/quick-start.rs"
[[example]]
name = "word-boundary-demo"
path = "examples/word-boundary-demo.rs"
[[example]]
name = "streaming-audio-demo"
path = "examples/streaming-audio-demo.rs"
[[example]]
name = "advanced-features-demo"
path = "examples/advanced-features-demo.rs"
[[example]]
name = "simple-test"
path = "examples/simple-test.rs"
[features]
default = ["system", "cloud", "sherpaonnx", "sapi", "display_names"]
system = ["speech-dispatcher"]
cloud = ["reqwest", "serde_json", "base64", "speechmarkdown", "tungstenite", "uuid", "url", "symphonia", "sha2"]
sherpaonnx = ["sherpa-onnx", "serde_json"]
tungstenite = ["dep:tungstenite"]
uuid = ["dep:uuid"]
url = ["dep:url"]
# SpeechMarkdown → SSML preprocessing. Auto-enabled by every engine that
# can consume SSML (cloud, sapi, avsynth). Turn it off explicitly with
# `--no-default-features --features ...` if you want a smaller binary.
speechmarkdown = ["dep:speechmarkdown-rust"]
avsynth = ["speechmarkdown"]
sapi = ["windows", "speechmarkdown"]
# Human-readable locale display names (e.g. "Afrikaans (South Africa)" from
# "af-ZA") via ICU4X. Used by all voice mappers so consumers get consistent
# names regardless of engine.
display_names = ["dep:icu_displaynames", "dep:icu_locid"]
[dependencies]
reqwest = { version = "0.12", features = ["blocking", "json", "rustls-tls"], default-features = false, optional = true }
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", optional = true }
sherpa-onnx = { version = "1.13", optional = true }
base64 = { version = "0.22", optional = true }
speechmarkdown-rust = { version = "0.4.12", optional = true }
anyhow = "1"
tungstenite = { version = "0.29.0", features = ["rustls-tls-webpki-roots"], optional = true }
uuid = { version = "1.23.2", features = ["v4"], optional = true }
url = { version = "2.5.8", optional = true }
# MP3 → PCM16 decode so cloud engines deliver uniform PCM like the local ones.
# Pure-Rust symphonia (mp3 codec only) — avoids the C/minimp3 SIMD portability
# issue that breaks cross-builds to aarch64-pc-windows-msvc.
symphonia = { version = "0.5", optional = true, default-features = false, features = ["mp3"] }
# SHA-256 for the Edge (Read Aloud) Sec-MS-GEC auth token.
sha2 = { version = "0.10", optional = true }
# Locale display names via ICU4X (compiled_data bundles the name table).
icu_displaynames = { version = "0.11", optional = true, features = ["compiled_data"] }
icu_locid = { version = "1.0.0-beta1", optional = true }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.62", features = ["Win32_Media_Speech", "Win32_Media_Audio", "Win32_System_Com", "Win32_System_Ole"], optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
# speech-dispatcher is the Linux system TTS daemon; the crate's bindgen step
# requires libclang and the daemon isn't available on Windows/macOS, so it is
# gated to Linux.
speech-dispatcher = { version = "0.16", optional = true }
[target.'cfg(target_os = "macos")'.build-dependencies]
cc = "1"
[build-dependencies]
cbindgen = "0.28"
[dev-dependencies]
tempfile = "3"
[profile.release]
lto = true
codegen-units = 1
strip = true
[lints.clippy]
all = "warn"
pedantic = "warn"
cargo = "warn"