├── .github └── workflows │ └── main.yml ├── .gitignore ├── .rustfmt.toml ├── Cargo.lock ├── Cargo.toml ├── README.md ├── cli └── main.rs ├── src ├── constants.rs ├── languages.rs ├── lib.rs ├── tts.rs └── url │ ├── core.rs │ └── mod.rs └── tests ├── Cargo.lock ├── Cargo.toml ├── one.rs └── two.rs /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI Rust 2 | on: 3 | push: 4 | branches: [ master ] 5 | pull_request: 6 | branches: [ master ] 7 | 8 | env: 9 | CARGO_TERM_COLOR: always 10 | 11 | jobs: 12 | build: 13 | 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v2 18 | - name: install libasound2-dev 19 | run: sudo apt-get install libasound2-dev 20 | - name: Run checks 21 | run: cargo check --verbose 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | cli/target/ -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 80 2 | tab_spaces = 2 3 | edition = "2021" -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.17.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "0.7.20" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "alsa" 31 | version = "0.6.0" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "5915f52fe2cf65e83924d037b6c5290b7cee097c6b5c8700746e6168a343fd6b" 34 | dependencies = [ 35 | "alsa-sys", 36 | "bitflags", 37 | "libc", 38 | "nix", 39 | ] 40 | 41 | [[package]] 42 | name = "alsa-sys" 43 | version = "0.3.1" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" 46 | dependencies = [ 47 | "libc", 48 | "pkg-config", 49 | ] 50 | 51 | [[package]] 52 | name = "ansi_term" 53 | version = "0.12.1" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 56 | dependencies = [ 57 | "winapi", 58 | ] 59 | 60 | [[package]] 61 | name = "atty" 62 | version = "0.2.14" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 65 | dependencies = [ 66 | "hermit-abi", 67 | "libc", 68 | "winapi", 69 | ] 70 | 71 | [[package]] 72 | name = "autocfg" 73 | version = "1.1.0" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 76 | 77 | [[package]] 78 | name = "backtrace" 79 | version = "0.3.66" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" 82 | dependencies = [ 83 | "addr2line", 84 | "cc", 85 | "cfg-if", 86 | "libc", 87 | "miniz_oxide", 88 | "object", 89 | "rustc-demangle", 90 | ] 91 | 92 | [[package]] 93 | name = "bindgen" 94 | version = "0.61.0" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "8a022e58a142a46fea340d68012b9201c094e93ec3d033a944a24f8fd4a4f09a" 97 | dependencies = [ 98 | "bitflags", 99 | "cexpr", 100 | "clang-sys", 101 | "lazy_static", 102 | "lazycell", 103 | "peeking_take_while", 104 | "proc-macro2 1.0.47", 105 | "quote 1.0.21", 106 | "regex", 107 | "rustc-hash", 108 | "shlex", 109 | "syn 1.0.105", 110 | ] 111 | 112 | [[package]] 113 | name = "bitflags" 114 | version = "1.3.2" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 117 | 118 | [[package]] 119 | name = "bstr" 120 | version = "0.2.17" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" 123 | dependencies = [ 124 | "memchr", 125 | ] 126 | 127 | [[package]] 128 | name = "bumpalo" 129 | version = "3.11.1" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" 132 | 133 | [[package]] 134 | name = "byteorder" 135 | version = "1.4.3" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 138 | 139 | [[package]] 140 | name = "bytes" 141 | version = "1.3.0" 142 | source = "registry+https://github.com/rust-lang/crates.io-index" 143 | checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" 144 | 145 | [[package]] 146 | name = "cc" 147 | version = "1.0.77" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" 150 | dependencies = [ 151 | "jobserver", 152 | ] 153 | 154 | [[package]] 155 | name = "cesu8" 156 | version = "1.1.0" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 159 | 160 | [[package]] 161 | name = "cexpr" 162 | version = "0.6.0" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 165 | dependencies = [ 166 | "nom", 167 | ] 168 | 169 | [[package]] 170 | name = "cfg-if" 171 | version = "1.0.0" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 174 | 175 | [[package]] 176 | name = "clang-sys" 177 | version = "1.4.0" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" 180 | dependencies = [ 181 | "glob", 182 | "libc", 183 | "libloading", 184 | ] 185 | 186 | [[package]] 187 | name = "clap" 188 | version = "2.34.0" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 191 | dependencies = [ 192 | "ansi_term", 193 | "atty", 194 | "bitflags", 195 | "strsim 0.8.0", 196 | "textwrap", 197 | "unicode-width", 198 | "vec_map", 199 | ] 200 | 201 | [[package]] 202 | name = "clap-verbosity-flag" 203 | version = "0.2.0" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "bda14f5323b2b747f52908c5b7b8af7790784088bc7c2957a11695e39ad476dc" 206 | dependencies = [ 207 | "env_logger", 208 | "failure", 209 | "log", 210 | "structopt 0.2.18", 211 | ] 212 | 213 | [[package]] 214 | name = "claxon" 215 | version = "0.4.3" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688" 218 | 219 | [[package]] 220 | name = "combine" 221 | version = "4.6.6" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 224 | dependencies = [ 225 | "bytes", 226 | "memchr", 227 | ] 228 | 229 | [[package]] 230 | name = "core-foundation-sys" 231 | version = "0.8.3" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 234 | 235 | [[package]] 236 | name = "coreaudio-rs" 237 | version = "0.10.0" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" 240 | dependencies = [ 241 | "bitflags", 242 | "coreaudio-sys", 243 | ] 244 | 245 | [[package]] 246 | name = "coreaudio-sys" 247 | version = "0.2.11" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "1a9444b94b8024feecc29e01a9706c69c1e26bfee480221c90764200cfd778fb" 250 | dependencies = [ 251 | "bindgen", 252 | ] 253 | 254 | [[package]] 255 | name = "cpal" 256 | version = "0.13.5" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "74117836a5124f3629e4b474eed03e479abaf98988b4bb317e29f08cfe0e4116" 259 | dependencies = [ 260 | "alsa", 261 | "core-foundation-sys", 262 | "coreaudio-rs", 263 | "jni", 264 | "js-sys", 265 | "lazy_static", 266 | "libc", 267 | "mach", 268 | "ndk", 269 | "ndk-glue", 270 | "nix", 271 | "oboe", 272 | "parking_lot", 273 | "stdweb", 274 | "thiserror", 275 | "web-sys", 276 | "winapi", 277 | ] 278 | 279 | [[package]] 280 | name = "crossbeam-channel" 281 | version = "0.5.6" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 284 | dependencies = [ 285 | "cfg-if", 286 | "crossbeam-utils", 287 | ] 288 | 289 | [[package]] 290 | name = "crossbeam-deque" 291 | version = "0.8.2" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 294 | dependencies = [ 295 | "cfg-if", 296 | "crossbeam-epoch", 297 | "crossbeam-utils", 298 | ] 299 | 300 | [[package]] 301 | name = "crossbeam-epoch" 302 | version = "0.9.13" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" 305 | dependencies = [ 306 | "autocfg", 307 | "cfg-if", 308 | "crossbeam-utils", 309 | "memoffset 0.7.1", 310 | "scopeguard", 311 | ] 312 | 313 | [[package]] 314 | name = "crossbeam-utils" 315 | version = "0.8.14" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" 318 | dependencies = [ 319 | "cfg-if", 320 | ] 321 | 322 | [[package]] 323 | name = "darling" 324 | version = "0.13.4" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" 327 | dependencies = [ 328 | "darling_core", 329 | "darling_macro", 330 | ] 331 | 332 | [[package]] 333 | name = "darling_core" 334 | version = "0.13.4" 335 | source = "registry+https://github.com/rust-lang/crates.io-index" 336 | checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" 337 | dependencies = [ 338 | "fnv", 339 | "ident_case", 340 | "proc-macro2 1.0.47", 341 | "quote 1.0.21", 342 | "strsim 0.10.0", 343 | "syn 1.0.105", 344 | ] 345 | 346 | [[package]] 347 | name = "darling_macro" 348 | version = "0.13.4" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" 351 | dependencies = [ 352 | "darling_core", 353 | "quote 1.0.21", 354 | "syn 1.0.105", 355 | ] 356 | 357 | [[package]] 358 | name = "either" 359 | version = "1.8.0" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 362 | 363 | [[package]] 364 | name = "env_logger" 365 | version = "0.5.13" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" 368 | dependencies = [ 369 | "atty", 370 | "humantime", 371 | "log", 372 | "regex", 373 | "termcolor", 374 | ] 375 | 376 | [[package]] 377 | name = "exitfailure" 378 | version = "0.5.1" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "2ff5bd832af37f366c6c194d813a11cd90ac484f124f079294f28e357ae40515" 381 | dependencies = [ 382 | "failure", 383 | ] 384 | 385 | [[package]] 386 | name = "failure" 387 | version = "0.1.8" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" 390 | dependencies = [ 391 | "backtrace", 392 | "failure_derive", 393 | ] 394 | 395 | [[package]] 396 | name = "failure_derive" 397 | version = "0.1.8" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" 400 | dependencies = [ 401 | "proc-macro2 1.0.47", 402 | "quote 1.0.21", 403 | "syn 1.0.105", 404 | "synstructure", 405 | ] 406 | 407 | [[package]] 408 | name = "fnv" 409 | version = "1.0.7" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 412 | 413 | [[package]] 414 | name = "gimli" 415 | version = "0.26.2" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" 418 | 419 | [[package]] 420 | name = "glob" 421 | version = "0.3.0" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 424 | 425 | [[package]] 426 | name = "globset" 427 | version = "0.4.9" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" 430 | dependencies = [ 431 | "aho-corasick", 432 | "bstr", 433 | "fnv", 434 | "log", 435 | "regex", 436 | ] 437 | 438 | [[package]] 439 | name = "globwalk" 440 | version = "0.3.1" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "ce5d04da8cf35b507b2cbec92bbf2d5085292d07cd87637994fd437fe1617bbb" 443 | dependencies = [ 444 | "ignore", 445 | "walkdir", 446 | ] 447 | 448 | [[package]] 449 | name = "heck" 450 | version = "0.3.3" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 453 | dependencies = [ 454 | "unicode-segmentation", 455 | ] 456 | 457 | [[package]] 458 | name = "hermit-abi" 459 | version = "0.1.19" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 462 | dependencies = [ 463 | "libc", 464 | ] 465 | 466 | [[package]] 467 | name = "hound" 468 | version = "3.5.0" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | checksum = "4d13cdbd5dbb29f9c88095bbdc2590c9cba0d0a1269b983fef6b2cdd7e9f4db1" 471 | 472 | [[package]] 473 | name = "humantime" 474 | version = "1.3.0" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 477 | dependencies = [ 478 | "quick-error", 479 | ] 480 | 481 | [[package]] 482 | name = "ident_case" 483 | version = "1.0.1" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 486 | 487 | [[package]] 488 | name = "ignore" 489 | version = "0.4.18" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" 492 | dependencies = [ 493 | "crossbeam-utils", 494 | "globset", 495 | "lazy_static", 496 | "log", 497 | "memchr", 498 | "regex", 499 | "same-file", 500 | "thread_local", 501 | "walkdir", 502 | "winapi-util", 503 | ] 504 | 505 | [[package]] 506 | name = "instant" 507 | version = "0.1.12" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 510 | dependencies = [ 511 | "cfg-if", 512 | ] 513 | 514 | [[package]] 515 | name = "jni" 516 | version = "0.19.0" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" 519 | dependencies = [ 520 | "cesu8", 521 | "combine", 522 | "jni-sys", 523 | "log", 524 | "thiserror", 525 | "walkdir", 526 | ] 527 | 528 | [[package]] 529 | name = "jni-sys" 530 | version = "0.3.0" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 533 | 534 | [[package]] 535 | name = "jobserver" 536 | version = "0.1.25" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" 539 | dependencies = [ 540 | "libc", 541 | ] 542 | 543 | [[package]] 544 | name = "js-sys" 545 | version = "0.3.60" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 548 | dependencies = [ 549 | "wasm-bindgen", 550 | ] 551 | 552 | [[package]] 553 | name = "lazy_static" 554 | version = "1.4.0" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 557 | 558 | [[package]] 559 | name = "lazycell" 560 | version = "1.3.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 563 | 564 | [[package]] 565 | name = "lewton" 566 | version = "0.10.2" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" 569 | dependencies = [ 570 | "byteorder", 571 | "ogg", 572 | "tinyvec", 573 | ] 574 | 575 | [[package]] 576 | name = "libc" 577 | version = "0.2.138" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" 580 | 581 | [[package]] 582 | name = "libloading" 583 | version = "0.7.4" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" 586 | dependencies = [ 587 | "cfg-if", 588 | "winapi", 589 | ] 590 | 591 | [[package]] 592 | name = "lock_api" 593 | version = "0.4.9" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 596 | dependencies = [ 597 | "autocfg", 598 | "scopeguard", 599 | ] 600 | 601 | [[package]] 602 | name = "log" 603 | version = "0.4.17" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 606 | dependencies = [ 607 | "cfg-if", 608 | ] 609 | 610 | [[package]] 611 | name = "mach" 612 | version = "0.3.2" 613 | source = "registry+https://github.com/rust-lang/crates.io-index" 614 | checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" 615 | dependencies = [ 616 | "libc", 617 | ] 618 | 619 | [[package]] 620 | name = "memchr" 621 | version = "2.5.0" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 624 | 625 | [[package]] 626 | name = "memoffset" 627 | version = "0.6.5" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 630 | dependencies = [ 631 | "autocfg", 632 | ] 633 | 634 | [[package]] 635 | name = "memoffset" 636 | version = "0.7.1" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 639 | dependencies = [ 640 | "autocfg", 641 | ] 642 | 643 | [[package]] 644 | name = "minimal-lexical" 645 | version = "0.2.1" 646 | source = "registry+https://github.com/rust-lang/crates.io-index" 647 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 648 | 649 | [[package]] 650 | name = "minimp3" 651 | version = "0.5.1" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372" 654 | dependencies = [ 655 | "minimp3-sys", 656 | "slice-deque", 657 | "thiserror", 658 | ] 659 | 660 | [[package]] 661 | name = "minimp3-sys" 662 | version = "0.3.2" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90" 665 | dependencies = [ 666 | "cc", 667 | ] 668 | 669 | [[package]] 670 | name = "miniz_oxide" 671 | version = "0.5.4" 672 | source = "registry+https://github.com/rust-lang/crates.io-index" 673 | checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" 674 | dependencies = [ 675 | "adler", 676 | ] 677 | 678 | [[package]] 679 | name = "minreq" 680 | version = "2.6.0" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "4c785bc6027fd359756e538541c8624012ba3776d3d3fe123885643092ed4132" 683 | dependencies = [ 684 | "lazy_static", 685 | "log", 686 | "rustls", 687 | "webpki", 688 | "webpki-roots", 689 | ] 690 | 691 | [[package]] 692 | name = "ndk" 693 | version = "0.6.0" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" 696 | dependencies = [ 697 | "bitflags", 698 | "jni-sys", 699 | "ndk-sys", 700 | "num_enum", 701 | "thiserror", 702 | ] 703 | 704 | [[package]] 705 | name = "ndk-context" 706 | version = "0.1.1" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 709 | 710 | [[package]] 711 | name = "ndk-glue" 712 | version = "0.6.2" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" 715 | dependencies = [ 716 | "lazy_static", 717 | "libc", 718 | "log", 719 | "ndk", 720 | "ndk-context", 721 | "ndk-macro", 722 | "ndk-sys", 723 | ] 724 | 725 | [[package]] 726 | name = "ndk-macro" 727 | version = "0.3.0" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" 730 | dependencies = [ 731 | "darling", 732 | "proc-macro-crate", 733 | "proc-macro2 1.0.47", 734 | "quote 1.0.21", 735 | "syn 1.0.105", 736 | ] 737 | 738 | [[package]] 739 | name = "ndk-sys" 740 | version = "0.3.0" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" 743 | dependencies = [ 744 | "jni-sys", 745 | ] 746 | 747 | [[package]] 748 | name = "nix" 749 | version = "0.23.2" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" 752 | dependencies = [ 753 | "bitflags", 754 | "cc", 755 | "cfg-if", 756 | "libc", 757 | "memoffset 0.6.5", 758 | ] 759 | 760 | [[package]] 761 | name = "nom" 762 | version = "7.1.1" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 765 | dependencies = [ 766 | "memchr", 767 | "minimal-lexical", 768 | ] 769 | 770 | [[package]] 771 | name = "num-derive" 772 | version = "0.3.3" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 775 | dependencies = [ 776 | "proc-macro2 1.0.47", 777 | "quote 1.0.21", 778 | "syn 1.0.105", 779 | ] 780 | 781 | [[package]] 782 | name = "num-traits" 783 | version = "0.2.15" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 786 | dependencies = [ 787 | "autocfg", 788 | ] 789 | 790 | [[package]] 791 | name = "num_cpus" 792 | version = "1.14.0" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" 795 | dependencies = [ 796 | "hermit-abi", 797 | "libc", 798 | ] 799 | 800 | [[package]] 801 | name = "num_enum" 802 | version = "0.5.7" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" 805 | dependencies = [ 806 | "num_enum_derive", 807 | ] 808 | 809 | [[package]] 810 | name = "num_enum_derive" 811 | version = "0.5.7" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" 814 | dependencies = [ 815 | "proc-macro-crate", 816 | "proc-macro2 1.0.47", 817 | "quote 1.0.21", 818 | "syn 1.0.105", 819 | ] 820 | 821 | [[package]] 822 | name = "object" 823 | version = "0.29.0" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" 826 | dependencies = [ 827 | "memchr", 828 | ] 829 | 830 | [[package]] 831 | name = "oboe" 832 | version = "0.4.6" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" 835 | dependencies = [ 836 | "jni", 837 | "ndk", 838 | "ndk-context", 839 | "num-derive", 840 | "num-traits", 841 | "oboe-sys", 842 | ] 843 | 844 | [[package]] 845 | name = "oboe-sys" 846 | version = "0.4.5" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "3370abb7372ed744232c12954d920d1a40f1c4686de9e79e800021ef492294bd" 849 | dependencies = [ 850 | "cc", 851 | ] 852 | 853 | [[package]] 854 | name = "ogg" 855 | version = "0.8.0" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" 858 | dependencies = [ 859 | "byteorder", 860 | ] 861 | 862 | [[package]] 863 | name = "once_cell" 864 | version = "1.16.0" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 867 | 868 | [[package]] 869 | name = "parking_lot" 870 | version = "0.11.2" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 873 | dependencies = [ 874 | "instant", 875 | "lock_api", 876 | "parking_lot_core", 877 | ] 878 | 879 | [[package]] 880 | name = "parking_lot_core" 881 | version = "0.8.5" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 884 | dependencies = [ 885 | "cfg-if", 886 | "instant", 887 | "libc", 888 | "redox_syscall", 889 | "smallvec", 890 | "winapi", 891 | ] 892 | 893 | [[package]] 894 | name = "peeking_take_while" 895 | version = "0.1.2" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 898 | 899 | [[package]] 900 | name = "percent-encoding" 901 | version = "2.2.0" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 904 | 905 | [[package]] 906 | name = "pkg-config" 907 | version = "0.3.26" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 910 | 911 | [[package]] 912 | name = "proc-macro-crate" 913 | version = "1.2.1" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" 916 | dependencies = [ 917 | "once_cell", 918 | "thiserror", 919 | "toml", 920 | ] 921 | 922 | [[package]] 923 | name = "proc-macro-error" 924 | version = "1.0.4" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 927 | dependencies = [ 928 | "proc-macro-error-attr", 929 | "proc-macro2 1.0.47", 930 | "quote 1.0.21", 931 | "syn 1.0.105", 932 | "version_check", 933 | ] 934 | 935 | [[package]] 936 | name = "proc-macro-error-attr" 937 | version = "1.0.4" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 940 | dependencies = [ 941 | "proc-macro2 1.0.47", 942 | "quote 1.0.21", 943 | "version_check", 944 | ] 945 | 946 | [[package]] 947 | name = "proc-macro2" 948 | version = "0.4.30" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 951 | dependencies = [ 952 | "unicode-xid 0.1.0", 953 | ] 954 | 955 | [[package]] 956 | name = "proc-macro2" 957 | version = "1.0.47" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 960 | dependencies = [ 961 | "unicode-ident", 962 | ] 963 | 964 | [[package]] 965 | name = "quick-error" 966 | version = "1.2.3" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 969 | 970 | [[package]] 971 | name = "quicli" 972 | version = "0.4.0" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "9e8539e98d5a5e3cb0398aedac3e9642ead7d3047a459893526710cb5ad86f6c" 975 | dependencies = [ 976 | "clap-verbosity-flag", 977 | "exitfailure", 978 | "failure", 979 | "failure_derive", 980 | "globwalk", 981 | "log", 982 | "rayon", 983 | "remove_dir_all", 984 | "serde", 985 | "serde_derive", 986 | ] 987 | 988 | [[package]] 989 | name = "quote" 990 | version = "0.6.13" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 993 | dependencies = [ 994 | "proc-macro2 0.4.30", 995 | ] 996 | 997 | [[package]] 998 | name = "quote" 999 | version = "1.0.21" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1002 | dependencies = [ 1003 | "proc-macro2 1.0.47", 1004 | ] 1005 | 1006 | [[package]] 1007 | name = "rayon" 1008 | version = "1.6.0" 1009 | source = "registry+https://github.com/rust-lang/crates.io-index" 1010 | checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" 1011 | dependencies = [ 1012 | "crossbeam-deque", 1013 | "either", 1014 | "rayon-core", 1015 | ] 1016 | 1017 | [[package]] 1018 | name = "rayon-core" 1019 | version = "1.10.1" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" 1022 | dependencies = [ 1023 | "crossbeam-channel", 1024 | "crossbeam-deque", 1025 | "crossbeam-utils", 1026 | "num_cpus", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "redox_syscall" 1031 | version = "0.2.16" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1034 | dependencies = [ 1035 | "bitflags", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "regex" 1040 | version = "1.7.0" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" 1043 | dependencies = [ 1044 | "aho-corasick", 1045 | "memchr", 1046 | "regex-syntax", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "regex-syntax" 1051 | version = "0.6.28" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" 1054 | 1055 | [[package]] 1056 | name = "remove_dir_all" 1057 | version = "0.5.3" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1060 | dependencies = [ 1061 | "winapi", 1062 | ] 1063 | 1064 | [[package]] 1065 | name = "ring" 1066 | version = "0.16.20" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1069 | dependencies = [ 1070 | "cc", 1071 | "libc", 1072 | "once_cell", 1073 | "spin", 1074 | "untrusted", 1075 | "web-sys", 1076 | "winapi", 1077 | ] 1078 | 1079 | [[package]] 1080 | name = "rodio" 1081 | version = "0.14.0" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "4d98f5e557b61525057e2bc142c8cd7f0e70d75dc32852309bec440e6e046bf9" 1084 | dependencies = [ 1085 | "claxon", 1086 | "cpal", 1087 | "hound", 1088 | "lewton", 1089 | "minimp3", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "rustc-demangle" 1094 | version = "0.1.21" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" 1097 | 1098 | [[package]] 1099 | name = "rustc-hash" 1100 | version = "1.1.0" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1103 | 1104 | [[package]] 1105 | name = "rustls" 1106 | version = "0.20.7" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" 1109 | dependencies = [ 1110 | "log", 1111 | "ring", 1112 | "sct", 1113 | "webpki", 1114 | ] 1115 | 1116 | [[package]] 1117 | name = "same-file" 1118 | version = "1.0.6" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1121 | dependencies = [ 1122 | "winapi-util", 1123 | ] 1124 | 1125 | [[package]] 1126 | name = "scopeguard" 1127 | version = "1.1.0" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1130 | 1131 | [[package]] 1132 | name = "sct" 1133 | version = "0.7.0" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1136 | dependencies = [ 1137 | "ring", 1138 | "untrusted", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "serde" 1143 | version = "1.0.149" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" 1146 | 1147 | [[package]] 1148 | name = "serde_derive" 1149 | version = "1.0.149" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" 1152 | dependencies = [ 1153 | "proc-macro2 1.0.47", 1154 | "quote 1.0.21", 1155 | "syn 1.0.105", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "shlex" 1160 | version = "1.1.0" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" 1163 | 1164 | [[package]] 1165 | name = "slice-deque" 1166 | version = "0.3.0" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "31ef6ee280cdefba6d2d0b4b78a84a1c1a3f3a4cec98c2d4231c8bc225de0f25" 1169 | dependencies = [ 1170 | "libc", 1171 | "mach", 1172 | "winapi", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "smallvec" 1177 | version = "1.10.0" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1180 | 1181 | [[package]] 1182 | name = "spin" 1183 | version = "0.5.2" 1184 | source = "registry+https://github.com/rust-lang/crates.io-index" 1185 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1186 | 1187 | [[package]] 1188 | name = "stdweb" 1189 | version = "0.1.3" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" 1192 | 1193 | [[package]] 1194 | name = "strsim" 1195 | version = "0.8.0" 1196 | source = "registry+https://github.com/rust-lang/crates.io-index" 1197 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1198 | 1199 | [[package]] 1200 | name = "strsim" 1201 | version = "0.10.0" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1204 | 1205 | [[package]] 1206 | name = "structopt" 1207 | version = "0.2.18" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7" 1210 | dependencies = [ 1211 | "clap", 1212 | "structopt-derive 0.2.18", 1213 | ] 1214 | 1215 | [[package]] 1216 | name = "structopt" 1217 | version = "0.3.26" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" 1220 | dependencies = [ 1221 | "clap", 1222 | "lazy_static", 1223 | "structopt-derive 0.4.18", 1224 | ] 1225 | 1226 | [[package]] 1227 | name = "structopt-derive" 1228 | version = "0.2.18" 1229 | source = "registry+https://github.com/rust-lang/crates.io-index" 1230 | checksum = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107" 1231 | dependencies = [ 1232 | "heck", 1233 | "proc-macro2 0.4.30", 1234 | "quote 0.6.13", 1235 | "syn 0.15.44", 1236 | ] 1237 | 1238 | [[package]] 1239 | name = "structopt-derive" 1240 | version = "0.4.18" 1241 | source = "registry+https://github.com/rust-lang/crates.io-index" 1242 | checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" 1243 | dependencies = [ 1244 | "heck", 1245 | "proc-macro-error", 1246 | "proc-macro2 1.0.47", 1247 | "quote 1.0.21", 1248 | "syn 1.0.105", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "syn" 1253 | version = "0.15.44" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1256 | dependencies = [ 1257 | "proc-macro2 0.4.30", 1258 | "quote 0.6.13", 1259 | "unicode-xid 0.1.0", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "syn" 1264 | version = "1.0.105" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" 1267 | dependencies = [ 1268 | "proc-macro2 1.0.47", 1269 | "quote 1.0.21", 1270 | "unicode-ident", 1271 | ] 1272 | 1273 | [[package]] 1274 | name = "synstructure" 1275 | version = "0.12.6" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" 1278 | dependencies = [ 1279 | "proc-macro2 1.0.47", 1280 | "quote 1.0.21", 1281 | "syn 1.0.105", 1282 | "unicode-xid 0.2.4", 1283 | ] 1284 | 1285 | [[package]] 1286 | name = "termcolor" 1287 | version = "1.1.3" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 1290 | dependencies = [ 1291 | "winapi-util", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "textwrap" 1296 | version = "0.11.0" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1299 | dependencies = [ 1300 | "unicode-width", 1301 | ] 1302 | 1303 | [[package]] 1304 | name = "thiserror" 1305 | version = "1.0.37" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1308 | dependencies = [ 1309 | "thiserror-impl", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "thiserror-impl" 1314 | version = "1.0.37" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1317 | dependencies = [ 1318 | "proc-macro2 1.0.47", 1319 | "quote 1.0.21", 1320 | "syn 1.0.105", 1321 | ] 1322 | 1323 | [[package]] 1324 | name = "thread_local" 1325 | version = "1.1.4" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" 1328 | dependencies = [ 1329 | "once_cell", 1330 | ] 1331 | 1332 | [[package]] 1333 | name = "tinyvec" 1334 | version = "1.6.0" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1337 | dependencies = [ 1338 | "tinyvec_macros", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "tinyvec_macros" 1343 | version = "0.1.0" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1346 | 1347 | [[package]] 1348 | name = "toml" 1349 | version = "0.5.9" 1350 | source = "registry+https://github.com/rust-lang/crates.io-index" 1351 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 1352 | dependencies = [ 1353 | "serde", 1354 | ] 1355 | 1356 | [[package]] 1357 | name = "tts_rust" 1358 | version = "0.3.5" 1359 | dependencies = [ 1360 | "minreq", 1361 | "percent-encoding", 1362 | "quicli", 1363 | "rodio", 1364 | "structopt 0.3.26", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "unicode-ident" 1369 | version = "1.0.5" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1372 | 1373 | [[package]] 1374 | name = "unicode-segmentation" 1375 | version = "1.10.0" 1376 | source = "registry+https://github.com/rust-lang/crates.io-index" 1377 | checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" 1378 | 1379 | [[package]] 1380 | name = "unicode-width" 1381 | version = "0.1.10" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1384 | 1385 | [[package]] 1386 | name = "unicode-xid" 1387 | version = "0.1.0" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1390 | 1391 | [[package]] 1392 | name = "unicode-xid" 1393 | version = "0.2.4" 1394 | source = "registry+https://github.com/rust-lang/crates.io-index" 1395 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 1396 | 1397 | [[package]] 1398 | name = "untrusted" 1399 | version = "0.7.1" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1402 | 1403 | [[package]] 1404 | name = "vec_map" 1405 | version = "0.8.2" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1408 | 1409 | [[package]] 1410 | name = "version_check" 1411 | version = "0.9.4" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1414 | 1415 | [[package]] 1416 | name = "walkdir" 1417 | version = "2.3.2" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 1420 | dependencies = [ 1421 | "same-file", 1422 | "winapi", 1423 | "winapi-util", 1424 | ] 1425 | 1426 | [[package]] 1427 | name = "wasm-bindgen" 1428 | version = "0.2.83" 1429 | source = "registry+https://github.com/rust-lang/crates.io-index" 1430 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 1431 | dependencies = [ 1432 | "cfg-if", 1433 | "wasm-bindgen-macro", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "wasm-bindgen-backend" 1438 | version = "0.2.83" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 1441 | dependencies = [ 1442 | "bumpalo", 1443 | "log", 1444 | "once_cell", 1445 | "proc-macro2 1.0.47", 1446 | "quote 1.0.21", 1447 | "syn 1.0.105", 1448 | "wasm-bindgen-shared", 1449 | ] 1450 | 1451 | [[package]] 1452 | name = "wasm-bindgen-macro" 1453 | version = "0.2.83" 1454 | source = "registry+https://github.com/rust-lang/crates.io-index" 1455 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 1456 | dependencies = [ 1457 | "quote 1.0.21", 1458 | "wasm-bindgen-macro-support", 1459 | ] 1460 | 1461 | [[package]] 1462 | name = "wasm-bindgen-macro-support" 1463 | version = "0.2.83" 1464 | source = "registry+https://github.com/rust-lang/crates.io-index" 1465 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 1466 | dependencies = [ 1467 | "proc-macro2 1.0.47", 1468 | "quote 1.0.21", 1469 | "syn 1.0.105", 1470 | "wasm-bindgen-backend", 1471 | "wasm-bindgen-shared", 1472 | ] 1473 | 1474 | [[package]] 1475 | name = "wasm-bindgen-shared" 1476 | version = "0.2.83" 1477 | source = "registry+https://github.com/rust-lang/crates.io-index" 1478 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 1479 | 1480 | [[package]] 1481 | name = "web-sys" 1482 | version = "0.3.60" 1483 | source = "registry+https://github.com/rust-lang/crates.io-index" 1484 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 1485 | dependencies = [ 1486 | "js-sys", 1487 | "wasm-bindgen", 1488 | ] 1489 | 1490 | [[package]] 1491 | name = "webpki" 1492 | version = "0.22.0" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 1495 | dependencies = [ 1496 | "ring", 1497 | "untrusted", 1498 | ] 1499 | 1500 | [[package]] 1501 | name = "webpki-roots" 1502 | version = "0.22.5" 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" 1504 | checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" 1505 | dependencies = [ 1506 | "webpki", 1507 | ] 1508 | 1509 | [[package]] 1510 | name = "winapi" 1511 | version = "0.3.9" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1514 | dependencies = [ 1515 | "winapi-i686-pc-windows-gnu", 1516 | "winapi-x86_64-pc-windows-gnu", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "winapi-i686-pc-windows-gnu" 1521 | version = "0.4.0" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1524 | 1525 | [[package]] 1526 | name = "winapi-util" 1527 | version = "0.1.5" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1530 | dependencies = [ 1531 | "winapi", 1532 | ] 1533 | 1534 | [[package]] 1535 | name = "winapi-x86_64-pc-windows-gnu" 1536 | version = "0.4.0" 1537 | source = "registry+https://github.com/rust-lang/crates.io-index" 1538 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1539 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "tts_rust" 3 | version = "0.3.5" 4 | edition = "2021" 5 | description = "Simple & easy text-to-speech module for your needs." 6 | license = "MIT" 7 | readme = "README.md" 8 | repository = "https://github.com/dhairy-online/tts_rust" 9 | keywords = ["tts", "text_to_speech", "gTTS"] 10 | 11 | [dependencies] 12 | minreq = { version="2.0.3", features=["https"] } 13 | percent-encoding = "2.1.0" 14 | rodio = "0.14.0" 15 | structopt = "0.3" 16 | quicli = "0.4.0" 17 | 18 | # bin cli 19 | [[bin]] 20 | name = "tts" 21 | path = "cli/main.rs" 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### `tts_rust` 2 | 3 | Really Simple Text to Speech module for rust 4 | 5 | - [crates.io](https://crates.io/crates/tts_rust) 6 | - [docs.rs](https://docs.rs/tts_rust/) 7 | 8 | Uses `cargo fmt` as formatter 9 | 10 | ### Example... 11 | 12 | ```rust 13 | use tts_rust::{ tts::GTTSClient, languages::Languages }; 14 | 15 | fn main() { 16 | let mut narrator: GTTSClient = GTTSClient { 17 | volume: 1.0, 18 | language: Languages::English, // use the Languages enum 19 | tld: "com", 20 | }; 21 | narrator.speak("Hello, World!").unwrap(); 22 | } 23 | ``` 24 | 25 | ### ...Or a more advanced one 26 | 27 | ```rust 28 | use tts_rust::{ tts::GTTSClient, languages::Languages }; 29 | 30 | fn main() { 31 | let mut narrator: GTTSClient = GTTSClient { 32 | volume: 1.0, 33 | language: Languages::English, 34 | tld: "com", 35 | }; 36 | narrator.speak("Starting test?").unwrap(); 37 | let ms = std::time::Duration::from_millis(1000); 38 | for _x in 1..9 { 39 | narrator.volume += 1.0; 40 | let to_speak: String = String::from("Loop ") + &narrator.volume.to_string(); 41 | narrator.speak(&to_speak).unwrap(); 42 | std::thread::sleep(ms); 43 | } 44 | } 45 | ``` 46 | 47 | ### License 48 | 49 | #### MIT 50 | -------------------------------------------------------------------------------- /cli/main.rs: -------------------------------------------------------------------------------- 1 | use quicli::prelude::*; 2 | use structopt::StructOpt; 3 | use tts_rust::languages::Languages; 4 | use tts_rust::tts::GTTSClient; 5 | 6 | #[derive(Debug, StructOpt)] 7 | struct GTTSCli { 8 | text: String, 9 | 10 | #[structopt(short = "l", long = "lang", default_value = "en")] 11 | language: Languages, 12 | } 13 | 14 | fn main() -> CliResult { 15 | let args = GTTSCli::from_args(); 16 | let client = GTTSClient { 17 | volume: 1.0, 18 | language: args.language, 19 | tld: "com", 20 | }; 21 | if let Err(msg) = client.speak(&args.text) { 22 | println!("An error occurred: {}", msg); 23 | } 24 | Ok(()) 25 | } 26 | // test cli 27 | #[cfg(test)] 28 | mod cli_tests { 29 | use super::*; 30 | 31 | #[test] 32 | fn test_cli_default() { 33 | let args = GTTSCli::from_iter(&["tts_rust", "--lang", "en", "Hello!"]); 34 | } 35 | #[test] 36 | fn test_cli_en() { 37 | let args = GTTSCli::from_iter(&["tts_rust", "--lang", "en", "Hello!"]); 38 | let client = GTTSClient { 39 | volume: 1.0, 40 | language: Languages::English, 41 | tld: "com", 42 | }; 43 | let _result = client.speak(&args.text).unwrap(); 44 | } 45 | #[test] 46 | fn test_cli_ja() { 47 | let args = GTTSCli::from_iter(&["tts_rust", "--lang", "ja", "Hello!"]); 48 | let client = GTTSClient { 49 | volume: 1.0, 50 | language: Languages::Japanese, 51 | tld: "com", 52 | }; 53 | let _result = client.speak(&args.text).unwrap(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/constants.rs: -------------------------------------------------------------------------------- 1 | pub const GOOGLE_TTS_MAX_CHARS: usize = 100; 2 | -------------------------------------------------------------------------------- /src/languages.rs: -------------------------------------------------------------------------------- 1 | use std::str::FromStr; 2 | 3 | /// Enum containing all the languages supported by the GTTS API 4 | #[derive(Debug, Clone)] 5 | pub enum Languages { 6 | /// ISO code: af 7 | Afrikaans, 8 | /// ISO code: ar 9 | Arabic, 10 | /// ISO code: bg 11 | Bulgarian, 12 | /// ISO code: bn 13 | Bengali, 14 | /// ISO code: bs 15 | Bosnian, 16 | /// ISO code: ca 17 | Catalan, 18 | /// ISO code: cs 19 | Czech, 20 | /// ISO code: cy 21 | Welsh, 22 | /// ISO code: da 23 | Danish, 24 | /// ISO code: de 25 | German, 26 | /// ISO code: el 27 | Greek, 28 | /// ISO code: en 29 | English, 30 | /// ISO code: eo 31 | Esperanto, 32 | /// ISO code: es 33 | Spanish, 34 | /// ISO code: et 35 | Estonian, 36 | /// ISO code: fi 37 | Finnish, 38 | /// ISO code: fr 39 | French, 40 | /// ISO code: gu 41 | Gujarati, 42 | /// ISO code: hi 43 | Hindi, 44 | /// ISO code: hr 45 | Croatian, 46 | /// ISO code: hu 47 | Hungarian, 48 | /// ISO code: hy 49 | Armenian, 50 | /// ISO code: id 51 | Indonesian, 52 | /// ISO code: is 53 | Icelandic, 54 | /// ISO code: it 55 | Italian, 56 | /// ISO code: ja 57 | Japanese, 58 | /// ISO code: jw 59 | Javanese, 60 | /// ISO code: km 61 | Khmer, 62 | /// ISO code: kn 63 | Kannada, 64 | /// ISO code: ko 65 | Korean, 66 | /// ISO code: la 67 | Latin, 68 | /// ISO code: lv 69 | Latvian, 70 | /// ISO code: mk 71 | Macedonian, 72 | /// ISO code: ml 73 | Malayalam, 74 | /// ISO code: mr 75 | Marathi, 76 | /// Myanmar (Burmese) 77 | /// 78 | /// ISO code: my 79 | MyanmarAKABurmese, 80 | /// ISO code: ne 81 | Nepali, 82 | /// ISO code: nl 83 | Dutch, 84 | /// ISO code: no 85 | Norwegian, 86 | /// ISO code: pl 87 | Polish, 88 | /// ISO code: pt 89 | Portuguese, 90 | /// ISO code: ro 91 | Romanian, 92 | /// ISO code: ru 93 | Russian, 94 | /// ISO code: si 95 | Sinhala, 96 | /// ISO code: sk 97 | Slovak, 98 | /// ISO code: sq 99 | Albanian, 100 | /// ISO code: sr 101 | Serbian, 102 | /// ISO code: su 103 | Sundanese, 104 | /// ISO code: sv 105 | Swedish, 106 | /// ISO code: sw 107 | Swahili, 108 | /// ISO code: ta 109 | Tamil, 110 | /// ISO code: te 111 | Telugu, 112 | /// ISO code: th 113 | Thai, 114 | /// ISO code: tl 115 | Filipino, 116 | /// ISO code: tr 117 | Turkish, 118 | /// ISO code: uk 119 | Ukrainian, 120 | /// ISO code: ur 121 | Urdu, 122 | /// ISO code: vi 123 | Vietnamese, 124 | /// ISO code: zh-CN 125 | Chinese, 126 | } 127 | impl FromStr for Languages { 128 | type Err = String; 129 | fn from_str(s: &str) -> Result { 130 | match s { 131 | "af" => Ok(Languages::Afrikaans), 132 | "ar" => Ok(Languages::Arabic), 133 | "bg" => Ok(Languages::Bulgarian), 134 | "bn" => Ok(Languages::Bengali), 135 | "bs" => Ok(Languages::Bosnian), 136 | "ca" => Ok(Languages::Catalan), 137 | "cs" => Ok(Languages::Czech), 138 | "cy" => Ok(Languages::Welsh), 139 | "da" => Ok(Languages::Danish), 140 | "de" => Ok(Languages::German), 141 | "el" => Ok(Languages::Greek), 142 | "en" => Ok(Languages::English), 143 | "eo" => Ok(Languages::Esperanto), 144 | "es" => Ok(Languages::Spanish), 145 | "et" => Ok(Languages::Estonian), 146 | "fi" => Ok(Languages::Finnish), 147 | "fr" => Ok(Languages::French), 148 | "gu" => Ok(Languages::Gujarati), 149 | "hi" => Ok(Languages::Hindi), 150 | "hr" => Ok(Languages::Croatian), 151 | "hu" => Ok(Languages::Hungarian), 152 | "hy" => Ok(Languages::Armenian), 153 | "id" => Ok(Languages::Indonesian), 154 | "is" => Ok(Languages::Icelandic), 155 | "it" => Ok(Languages::Italian), 156 | "ja" => Ok(Languages::Japanese), 157 | "jw" => Ok(Languages::Javanese), 158 | "km" => Ok(Languages::Khmer), 159 | "kn" => Ok(Languages::Kannada), 160 | "ko" => Ok(Languages::Korean), 161 | "la" => Ok(Languages::Latin), 162 | "lv" => Ok(Languages::Latvian), 163 | "mk" => Ok(Languages::Macedonian), 164 | "ml" => Ok(Languages::Malayalam), 165 | "mr" => Ok(Languages::Marathi), 166 | "my" => Ok(Languages::MyanmarAKABurmese), 167 | "ne" => Ok(Languages::Nepali), 168 | "nl" => Ok(Languages::Dutch), 169 | "no" => Ok(Languages::Norwegian), 170 | "pl" => Ok(Languages::Polish), 171 | "pt" => Ok(Languages::Portuguese), 172 | "ro" => Ok(Languages::Romanian), 173 | "ru" => Ok(Languages::Russian), 174 | "si" => Ok(Languages::Sinhala), 175 | "sk" => Ok(Languages::Slovak), 176 | "sq" => Ok(Languages::Albanian), 177 | "sr" => Ok(Languages::Serbian), 178 | "su" => Ok(Languages::Sundanese), 179 | "sv" => Ok(Languages::Swedish), 180 | "sw" => Ok(Languages::Swahili), 181 | "ta" => Ok(Languages::Tamil), 182 | "te" => Ok(Languages::Telugu), 183 | "th" => Ok(Languages::Thai), 184 | "tl" => Ok(Languages::Filipino), 185 | "tr" => Ok(Languages::Turkish), 186 | "uk" => Ok(Languages::Ukrainian), 187 | "ur" => Ok(Languages::Urdu), 188 | "vi" => Ok(Languages::Vietnamese), 189 | "zh-CN" => Ok(Languages::Chinese), 190 | _ => Err(format!( 191 | "Unknown language: {}. Make sure to use all the supported languages", 192 | s 193 | )), 194 | } 195 | } 196 | } 197 | 198 | impl Languages { 199 | pub fn as_code(l: Languages) -> &'static str { 200 | match l { 201 | Languages::Afrikaans => "af", 202 | Languages::Albanian => "sq", 203 | Languages::Arabic => "ar", 204 | Languages::Armenian => "hy", 205 | Languages::Bengali => "bn", 206 | Languages::Bosnian => "bs", 207 | Languages::Bulgarian => "bg", 208 | Languages::Catalan => "ca", 209 | Languages::Chinese => "zh-CN", 210 | Languages::Croatian => "hr", 211 | Languages::Czech => "cs", 212 | Languages::Danish => "da", 213 | Languages::Dutch => "nl", 214 | Languages::English => "en", 215 | Languages::Esperanto => "eo", 216 | Languages::Estonian => "et", 217 | Languages::Filipino => "tl", 218 | Languages::Finnish => "fi", 219 | Languages::French => "fr", 220 | Languages::German => "de", 221 | Languages::Greek => "el", 222 | Languages::Gujarati => "gu", 223 | Languages::Hindi => "hi", 224 | Languages::Hungarian => "hu", 225 | Languages::Icelandic => "is", 226 | Languages::Indonesian => "id", 227 | Languages::Italian => "it", 228 | Languages::Japanese => "ja", 229 | Languages::Javanese => "jw", 230 | Languages::Kannada => "kn", 231 | Languages::Khmer => "km", 232 | Languages::Korean => "ko", 233 | Languages::Latin => "la", 234 | Languages::Latvian => "lv", 235 | Languages::Macedonian => "mk", 236 | Languages::Marathi => "mr", 237 | Languages::Nepali => "ne", 238 | Languages::Norwegian => "no", 239 | Languages::Polish => "pl", 240 | Languages::Portuguese => "pt", 241 | Languages::Romanian => "ro", 242 | Languages::Russian => "ru", 243 | Languages::Serbian => "sr", 244 | Languages::Sinhala => "si", 245 | Languages::Slovak => "sk", 246 | Languages::Spanish => "es", 247 | Languages::Swahili => "sw", 248 | Languages::Swedish => "sv", 249 | Languages::Tamil => "ta", 250 | Languages::Telugu => "te", 251 | Languages::Thai => "th", 252 | Languages::Turkish => "tr", 253 | Languages::Ukrainian => "uk", 254 | Languages::Urdu => "ur", 255 | Languages::Vietnamese => "vi", 256 | Languages::Welsh => "cy", 257 | Languages::MyanmarAKABurmese => "my", 258 | Languages::Malayalam => "ml", 259 | Languages::Sundanese => "su", 260 | } 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! # Very Simple Module for gTTS 2 | //! Example: 3 | //! 4 | mod constants; 5 | /// ``` 6 | /// use tts_rust::languages::Languages; 7 | /// use tts_rust::tts::GTTSClient; 8 | /// 9 | /// let narrator = GTTSClient::new(1.0, Languages::English, "com"); 10 | /// narrator.speak("Hello!").unwrap(); 11 | /// ``` 12 | pub mod languages; 13 | pub mod tts; 14 | pub mod url; 15 | -------------------------------------------------------------------------------- /src/tts.rs: -------------------------------------------------------------------------------- 1 | use minreq::get; 2 | use std::fs; 3 | use std::fs::File; 4 | use std::io::prelude::*; 5 | use std::io::BufReader; 6 | use std::path::Path; 7 | 8 | use crate::constants::GOOGLE_TTS_MAX_CHARS; 9 | use crate::languages::Languages; 10 | use crate::url::core::Core; 11 | 12 | #[derive(Debug)] 13 | pub struct GTTSClient { 14 | /// The volume of the audio. Must be between 0.0 and 1.0. Default is 1.0. 15 | /// 16 | /// recommended value is 1.0 17 | pub volume: f32, 18 | /// The language of the gTTS client (ISO code) 19 | /// 20 | /// example: Languages::English, Languages::Japanese 21 | pub language: Languages, 22 | /// top-level domain of the gTTS client 23 | /// 24 | /// example: "com" 25 | pub tld: &'static str, 26 | } 27 | pub enum Speed { 28 | Normal, 29 | Slow, 30 | } 31 | impl GTTSClient { 32 | /// Creates a new gTTS client default values. 33 | pub fn default() -> Self { 34 | GTTSClient { 35 | volume: 1.0, 36 | language: Languages::English, 37 | tld: "com", 38 | } 39 | } 40 | /// Creates a new gTTS client with the given volume and language. 41 | pub fn new(volume: f32, language: Languages, tld: &'static str) -> Self { 42 | GTTSClient { 43 | volume, 44 | language, 45 | tld, 46 | } 47 | } 48 | pub fn save_to_file(&self, text: &str, filename: &str) -> Result<(), String> { 49 | let len = text.len(); 50 | if len > GOOGLE_TTS_MAX_CHARS { 51 | return Err(format!( 52 | "The text is too long. Max length is {}", 53 | GOOGLE_TTS_MAX_CHARS 54 | )); 55 | } 56 | let language = Languages::as_code(self.language.clone()); 57 | let text = Core::fragmenter(text)?; 58 | let rep = get(format!("https://translate.google.{}/translate_tts?ie=UTF-8&q={}&tl={}&total=1&idx=0&textlen={}&tl={}&client=tw-ob", self.tld, text.encoded, language, len, language)) 59 | .send() 60 | .map_err(|e| format!("{}", e))?; 61 | let mut file = File::create(filename).unwrap(); 62 | let bytes = rep.as_bytes(); 63 | if !bytes.is_empty() && file.write_all(bytes).is_ok() { 64 | return Ok(()); 65 | } 66 | 67 | Err("Something went wrong".to_string()) 68 | } 69 | fn play_mp3(&self, mp3: &str) { 70 | let (_stream, handle) = rodio::OutputStream::try_default().unwrap(); 71 | let sink = rodio::Sink::try_new(&handle).unwrap(); 72 | sink.set_volume(self.volume); 73 | let file = std::fs::File::open(mp3).unwrap(); 74 | sink.append(rodio::Decoder::new(BufReader::new(file)).unwrap()); 75 | sink.sleep_until_end(); 76 | } 77 | /// Speak the input according to the volume and language 78 | pub fn speak(&self, input: &str) -> Result<(), String> { 79 | self.save_to_file(input, "audio.mp3")?; 80 | self.play_mp3("audio.mp3"); 81 | if Path::new("./audio.mp3").exists() { 82 | fs::remove_file("./audio.mp3").unwrap(); 83 | } 84 | Ok(()) 85 | } 86 | /// Speak and println! the input according to the volume and language 87 | pub fn display_and_speak(&self, input: &str) { 88 | self.speak(input).unwrap(); 89 | println!("{}", input); 90 | } 91 | /// Fastest way to check if gTTS API works 92 | pub fn test(&self) { 93 | self.display_and_speak("Hello!"); 94 | } 95 | } 96 | #[cfg(test)] 97 | mod tests { 98 | use super::*; 99 | 100 | #[test] 101 | fn test_1() { 102 | let narrator = GTTSClient::default(); 103 | narrator.test(); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/url/core.rs: -------------------------------------------------------------------------------- 1 | use percent_encoding::utf8_percent_encode; 2 | use percent_encoding::AsciiSet; 3 | use percent_encoding::CONTROLS; 4 | 5 | pub struct Core; 6 | 7 | const FRAGMENT: &AsciiSet = 8 | &CONTROLS.add(b' ').add(b'"').add(b'<').add(b'>').add(b'`'); 9 | 10 | pub struct EncodedFragment { 11 | pub encoded: String, 12 | pub decoded: String, 13 | } 14 | 15 | impl Core { 16 | pub fn fragmenter(text: &str) -> Result { 17 | let raw_text = text; 18 | let text = utf8_percent_encode(raw_text, FRAGMENT).to_string(); 19 | if text.is_empty() { 20 | return Err("Empty text".to_string()); 21 | } 22 | Ok(EncodedFragment { 23 | encoded: text, 24 | decoded: raw_text.to_string(), 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/url/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod core; 2 | -------------------------------------------------------------------------------- /tests/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.17.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "0.7.18" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "alsa" 31 | version = "0.5.0" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "75c4da790adcb2ce5e758c064b4f3ec17a30349f9961d3e5e6c9688b052a9e18" 34 | dependencies = [ 35 | "alsa-sys", 36 | "bitflags", 37 | "libc", 38 | "nix", 39 | ] 40 | 41 | [[package]] 42 | name = "alsa-sys" 43 | version = "0.3.1" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" 46 | dependencies = [ 47 | "libc", 48 | "pkg-config", 49 | ] 50 | 51 | [[package]] 52 | name = "ansi_term" 53 | version = "0.12.1" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 56 | dependencies = [ 57 | "winapi", 58 | ] 59 | 60 | [[package]] 61 | name = "atty" 62 | version = "0.2.14" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 65 | dependencies = [ 66 | "hermit-abi", 67 | "libc", 68 | "winapi", 69 | ] 70 | 71 | [[package]] 72 | name = "autocfg" 73 | version = "1.0.1" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 76 | 77 | [[package]] 78 | name = "backtrace" 79 | version = "0.3.63" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" 82 | dependencies = [ 83 | "addr2line", 84 | "cc", 85 | "cfg-if", 86 | "libc", 87 | "miniz_oxide", 88 | "object", 89 | "rustc-demangle", 90 | ] 91 | 92 | [[package]] 93 | name = "base64" 94 | version = "0.13.0" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 97 | 98 | [[package]] 99 | name = "bindgen" 100 | version = "0.56.0" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" 103 | dependencies = [ 104 | "bitflags", 105 | "cexpr", 106 | "clang-sys", 107 | "lazy_static", 108 | "lazycell", 109 | "peeking_take_while", 110 | "proc-macro2 1.0.34", 111 | "quote 1.0.10", 112 | "regex", 113 | "rustc-hash", 114 | "shlex", 115 | ] 116 | 117 | [[package]] 118 | name = "bitflags" 119 | version = "1.2.1" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 122 | 123 | [[package]] 124 | name = "bstr" 125 | version = "0.2.17" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" 128 | dependencies = [ 129 | "memchr", 130 | ] 131 | 132 | [[package]] 133 | name = "bumpalo" 134 | version = "3.8.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" 137 | 138 | [[package]] 139 | name = "byteorder" 140 | version = "1.4.3" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 143 | 144 | [[package]] 145 | name = "bytes" 146 | version = "1.1.0" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 149 | 150 | [[package]] 151 | name = "cc" 152 | version = "1.0.72" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" 155 | dependencies = [ 156 | "jobserver", 157 | ] 158 | 159 | [[package]] 160 | name = "cesu8" 161 | version = "1.1.0" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 164 | 165 | [[package]] 166 | name = "cexpr" 167 | version = "0.4.0" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" 170 | dependencies = [ 171 | "nom", 172 | ] 173 | 174 | [[package]] 175 | name = "cfg-if" 176 | version = "1.0.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 179 | 180 | [[package]] 181 | name = "clang-sys" 182 | version = "1.3.0" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" 185 | dependencies = [ 186 | "glob", 187 | "libc", 188 | "libloading", 189 | ] 190 | 191 | [[package]] 192 | name = "clap" 193 | version = "2.34.0" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 196 | dependencies = [ 197 | "ansi_term", 198 | "atty", 199 | "bitflags", 200 | "strsim 0.8.0", 201 | "textwrap", 202 | "unicode-width", 203 | "vec_map", 204 | ] 205 | 206 | [[package]] 207 | name = "clap-verbosity-flag" 208 | version = "0.2.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "bda14f5323b2b747f52908c5b7b8af7790784088bc7c2957a11695e39ad476dc" 211 | dependencies = [ 212 | "env_logger", 213 | "failure", 214 | "log", 215 | "structopt 0.2.18", 216 | ] 217 | 218 | [[package]] 219 | name = "claxon" 220 | version = "0.4.3" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688" 223 | 224 | [[package]] 225 | name = "combine" 226 | version = "4.6.2" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5" 229 | dependencies = [ 230 | "bytes", 231 | "memchr", 232 | ] 233 | 234 | [[package]] 235 | name = "core-foundation-sys" 236 | version = "0.8.3" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 239 | 240 | [[package]] 241 | name = "coreaudio-rs" 242 | version = "0.10.0" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" 245 | dependencies = [ 246 | "bitflags", 247 | "coreaudio-sys", 248 | ] 249 | 250 | [[package]] 251 | name = "coreaudio-sys" 252 | version = "0.2.8" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | checksum = "2b7e3347be6a09b46aba228d6608386739fb70beff4f61e07422da87b0bb31fa" 255 | dependencies = [ 256 | "bindgen", 257 | ] 258 | 259 | [[package]] 260 | name = "cpal" 261 | version = "0.13.4" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "98f45f0a21f617cd2c788889ef710b63f075c949259593ea09c826f1e47a2418" 264 | dependencies = [ 265 | "alsa", 266 | "core-foundation-sys", 267 | "coreaudio-rs", 268 | "jni", 269 | "js-sys", 270 | "lazy_static", 271 | "libc", 272 | "mach", 273 | "ndk 0.3.0", 274 | "ndk-glue 0.3.0", 275 | "nix", 276 | "oboe", 277 | "parking_lot", 278 | "stdweb", 279 | "thiserror", 280 | "web-sys", 281 | "winapi", 282 | ] 283 | 284 | [[package]] 285 | name = "crossbeam-channel" 286 | version = "0.5.1" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" 289 | dependencies = [ 290 | "cfg-if", 291 | "crossbeam-utils", 292 | ] 293 | 294 | [[package]] 295 | name = "crossbeam-deque" 296 | version = "0.8.1" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" 299 | dependencies = [ 300 | "cfg-if", 301 | "crossbeam-epoch", 302 | "crossbeam-utils", 303 | ] 304 | 305 | [[package]] 306 | name = "crossbeam-epoch" 307 | version = "0.9.5" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" 310 | dependencies = [ 311 | "cfg-if", 312 | "crossbeam-utils", 313 | "lazy_static", 314 | "memoffset", 315 | "scopeguard", 316 | ] 317 | 318 | [[package]] 319 | name = "crossbeam-utils" 320 | version = "0.8.5" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" 323 | dependencies = [ 324 | "cfg-if", 325 | "lazy_static", 326 | ] 327 | 328 | [[package]] 329 | name = "darling" 330 | version = "0.10.2" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" 333 | dependencies = [ 334 | "darling_core", 335 | "darling_macro", 336 | ] 337 | 338 | [[package]] 339 | name = "darling_core" 340 | version = "0.10.2" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" 343 | dependencies = [ 344 | "fnv", 345 | "ident_case", 346 | "proc-macro2 1.0.34", 347 | "quote 1.0.10", 348 | "strsim 0.9.3", 349 | "syn 1.0.82", 350 | ] 351 | 352 | [[package]] 353 | name = "darling_macro" 354 | version = "0.10.2" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" 357 | dependencies = [ 358 | "darling_core", 359 | "quote 1.0.10", 360 | "syn 1.0.82", 361 | ] 362 | 363 | [[package]] 364 | name = "derivative" 365 | version = "2.2.0" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 368 | dependencies = [ 369 | "proc-macro2 1.0.34", 370 | "quote 1.0.10", 371 | "syn 1.0.82", 372 | ] 373 | 374 | [[package]] 375 | name = "either" 376 | version = "1.6.1" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 379 | 380 | [[package]] 381 | name = "env_logger" 382 | version = "0.5.13" 383 | source = "registry+https://github.com/rust-lang/crates.io-index" 384 | checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" 385 | dependencies = [ 386 | "atty", 387 | "humantime", 388 | "log", 389 | "regex", 390 | "termcolor", 391 | ] 392 | 393 | [[package]] 394 | name = "exitfailure" 395 | version = "0.5.1" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "2ff5bd832af37f366c6c194d813a11cd90ac484f124f079294f28e357ae40515" 398 | dependencies = [ 399 | "failure", 400 | ] 401 | 402 | [[package]] 403 | name = "failure" 404 | version = "0.1.8" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" 407 | dependencies = [ 408 | "backtrace", 409 | "failure_derive", 410 | ] 411 | 412 | [[package]] 413 | name = "failure_derive" 414 | version = "0.1.8" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" 417 | dependencies = [ 418 | "proc-macro2 1.0.34", 419 | "quote 1.0.10", 420 | "syn 1.0.82", 421 | "synstructure", 422 | ] 423 | 424 | [[package]] 425 | name = "fnv" 426 | version = "1.0.7" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 429 | 430 | [[package]] 431 | name = "gimli" 432 | version = "0.26.1" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" 435 | 436 | [[package]] 437 | name = "glob" 438 | version = "0.3.0" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 441 | 442 | [[package]] 443 | name = "globset" 444 | version = "0.4.8" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" 447 | dependencies = [ 448 | "aho-corasick", 449 | "bstr", 450 | "fnv", 451 | "log", 452 | "regex", 453 | ] 454 | 455 | [[package]] 456 | name = "globwalk" 457 | version = "0.3.1" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "ce5d04da8cf35b507b2cbec92bbf2d5085292d07cd87637994fd437fe1617bbb" 460 | dependencies = [ 461 | "ignore", 462 | "walkdir", 463 | ] 464 | 465 | [[package]] 466 | name = "heck" 467 | version = "0.3.3" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 470 | dependencies = [ 471 | "unicode-segmentation", 472 | ] 473 | 474 | [[package]] 475 | name = "hermit-abi" 476 | version = "0.1.19" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 479 | dependencies = [ 480 | "libc", 481 | ] 482 | 483 | [[package]] 484 | name = "hound" 485 | version = "3.4.0" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" 488 | 489 | [[package]] 490 | name = "humantime" 491 | version = "1.3.0" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 494 | dependencies = [ 495 | "quick-error", 496 | ] 497 | 498 | [[package]] 499 | name = "ident_case" 500 | version = "1.0.1" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 503 | 504 | [[package]] 505 | name = "ignore" 506 | version = "0.4.18" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" 509 | dependencies = [ 510 | "crossbeam-utils", 511 | "globset", 512 | "lazy_static", 513 | "log", 514 | "memchr", 515 | "regex", 516 | "same-file", 517 | "thread_local", 518 | "walkdir", 519 | "winapi-util", 520 | ] 521 | 522 | [[package]] 523 | name = "instant" 524 | version = "0.1.12" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 527 | dependencies = [ 528 | "cfg-if", 529 | ] 530 | 531 | [[package]] 532 | name = "jni" 533 | version = "0.19.0" 534 | source = "registry+https://github.com/rust-lang/crates.io-index" 535 | checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" 536 | dependencies = [ 537 | "cesu8", 538 | "combine", 539 | "jni-sys", 540 | "log", 541 | "thiserror", 542 | "walkdir", 543 | ] 544 | 545 | [[package]] 546 | name = "jni-sys" 547 | version = "0.3.0" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 550 | 551 | [[package]] 552 | name = "jobserver" 553 | version = "0.1.24" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" 556 | dependencies = [ 557 | "libc", 558 | ] 559 | 560 | [[package]] 561 | name = "js-sys" 562 | version = "0.3.55" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" 565 | dependencies = [ 566 | "wasm-bindgen", 567 | ] 568 | 569 | [[package]] 570 | name = "lazy_static" 571 | version = "1.4.0" 572 | source = "registry+https://github.com/rust-lang/crates.io-index" 573 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 574 | 575 | [[package]] 576 | name = "lazycell" 577 | version = "1.3.0" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 580 | 581 | [[package]] 582 | name = "lewton" 583 | version = "0.10.2" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" 586 | dependencies = [ 587 | "byteorder", 588 | "ogg", 589 | "tinyvec", 590 | ] 591 | 592 | [[package]] 593 | name = "libc" 594 | version = "0.2.112" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" 597 | 598 | [[package]] 599 | name = "libloading" 600 | version = "0.7.2" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" 603 | dependencies = [ 604 | "cfg-if", 605 | "winapi", 606 | ] 607 | 608 | [[package]] 609 | name = "lock_api" 610 | version = "0.4.5" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" 613 | dependencies = [ 614 | "scopeguard", 615 | ] 616 | 617 | [[package]] 618 | name = "log" 619 | version = "0.4.14" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 622 | dependencies = [ 623 | "cfg-if", 624 | ] 625 | 626 | [[package]] 627 | name = "mach" 628 | version = "0.3.2" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" 631 | dependencies = [ 632 | "libc", 633 | ] 634 | 635 | [[package]] 636 | name = "memchr" 637 | version = "2.4.1" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 640 | 641 | [[package]] 642 | name = "memoffset" 643 | version = "0.6.5" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 646 | dependencies = [ 647 | "autocfg", 648 | ] 649 | 650 | [[package]] 651 | name = "minimp3" 652 | version = "0.5.1" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372" 655 | dependencies = [ 656 | "minimp3-sys", 657 | "slice-deque", 658 | "thiserror", 659 | ] 660 | 661 | [[package]] 662 | name = "minimp3-sys" 663 | version = "0.3.2" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90" 666 | dependencies = [ 667 | "cc", 668 | ] 669 | 670 | [[package]] 671 | name = "miniz_oxide" 672 | version = "0.4.4" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" 675 | dependencies = [ 676 | "adler", 677 | "autocfg", 678 | ] 679 | 680 | [[package]] 681 | name = "minreq" 682 | version = "2.4.2" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "d5f7db7a675c4b46b8842105b9371d6151e95fbbecd9b0e54dc2ea814397d2cc" 685 | dependencies = [ 686 | "lazy_static", 687 | "log", 688 | "rustls", 689 | "webpki", 690 | "webpki-roots", 691 | ] 692 | 693 | [[package]] 694 | name = "ndk" 695 | version = "0.3.0" 696 | source = "registry+https://github.com/rust-lang/crates.io-index" 697 | checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" 698 | dependencies = [ 699 | "jni-sys", 700 | "ndk-sys", 701 | "num_enum", 702 | "thiserror", 703 | ] 704 | 705 | [[package]] 706 | name = "ndk" 707 | version = "0.4.0" 708 | source = "registry+https://github.com/rust-lang/crates.io-index" 709 | checksum = "d64d6af06fde0e527b1ba5c7b79a6cc89cfc46325b0b2887dffe8f70197e0c3c" 710 | dependencies = [ 711 | "bitflags", 712 | "jni-sys", 713 | "ndk-sys", 714 | "num_enum", 715 | "thiserror", 716 | ] 717 | 718 | [[package]] 719 | name = "ndk-glue" 720 | version = "0.3.0" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385" 723 | dependencies = [ 724 | "lazy_static", 725 | "libc", 726 | "log", 727 | "ndk 0.3.0", 728 | "ndk-macro", 729 | "ndk-sys", 730 | ] 731 | 732 | [[package]] 733 | name = "ndk-glue" 734 | version = "0.4.0" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "d3e9e94628f24e7a3cb5b96a2dc5683acd9230bf11991c2a1677b87695138420" 737 | dependencies = [ 738 | "lazy_static", 739 | "libc", 740 | "log", 741 | "ndk 0.4.0", 742 | "ndk-macro", 743 | "ndk-sys", 744 | ] 745 | 746 | [[package]] 747 | name = "ndk-macro" 748 | version = "0.2.0" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" 751 | dependencies = [ 752 | "darling", 753 | "proc-macro-crate 0.1.5", 754 | "proc-macro2 1.0.34", 755 | "quote 1.0.10", 756 | "syn 1.0.82", 757 | ] 758 | 759 | [[package]] 760 | name = "ndk-sys" 761 | version = "0.2.2" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | checksum = "e1bcdd74c20ad5d95aacd60ef9ba40fdf77f767051040541df557b7a9b2a2121" 764 | 765 | [[package]] 766 | name = "nix" 767 | version = "0.20.2" 768 | source = "registry+https://github.com/rust-lang/crates.io-index" 769 | checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945" 770 | dependencies = [ 771 | "bitflags", 772 | "cc", 773 | "cfg-if", 774 | "libc", 775 | "memoffset", 776 | ] 777 | 778 | [[package]] 779 | name = "nom" 780 | version = "5.1.2" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" 783 | dependencies = [ 784 | "memchr", 785 | "version_check", 786 | ] 787 | 788 | [[package]] 789 | name = "num-derive" 790 | version = "0.3.3" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 793 | dependencies = [ 794 | "proc-macro2 1.0.34", 795 | "quote 1.0.10", 796 | "syn 1.0.82", 797 | ] 798 | 799 | [[package]] 800 | name = "num-traits" 801 | version = "0.2.14" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 804 | dependencies = [ 805 | "autocfg", 806 | ] 807 | 808 | [[package]] 809 | name = "num_cpus" 810 | version = "1.13.0" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 813 | dependencies = [ 814 | "hermit-abi", 815 | "libc", 816 | ] 817 | 818 | [[package]] 819 | name = "num_enum" 820 | version = "0.5.4" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" 823 | dependencies = [ 824 | "derivative", 825 | "num_enum_derive", 826 | ] 827 | 828 | [[package]] 829 | name = "num_enum_derive" 830 | version = "0.5.4" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" 833 | dependencies = [ 834 | "proc-macro-crate 1.1.0", 835 | "proc-macro2 1.0.34", 836 | "quote 1.0.10", 837 | "syn 1.0.82", 838 | ] 839 | 840 | [[package]] 841 | name = "object" 842 | version = "0.27.1" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" 845 | dependencies = [ 846 | "memchr", 847 | ] 848 | 849 | [[package]] 850 | name = "oboe" 851 | version = "0.4.4" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "e15e22bc67e047fe342a32ecba55f555e3be6166b04dd157cd0f803dfa9f48e1" 854 | dependencies = [ 855 | "jni", 856 | "ndk 0.4.0", 857 | "ndk-glue 0.4.0", 858 | "num-derive", 859 | "num-traits", 860 | "oboe-sys", 861 | ] 862 | 863 | [[package]] 864 | name = "oboe-sys" 865 | version = "0.4.4" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "338142ae5ab0aaedc8275aa8f67f460e43ae0fca76a695a742d56da0a269eadc" 868 | dependencies = [ 869 | "cc", 870 | ] 871 | 872 | [[package]] 873 | name = "ogg" 874 | version = "0.8.0" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" 877 | dependencies = [ 878 | "byteorder", 879 | ] 880 | 881 | [[package]] 882 | name = "once_cell" 883 | version = "1.9.0" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" 886 | 887 | [[package]] 888 | name = "parking_lot" 889 | version = "0.11.2" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 892 | dependencies = [ 893 | "instant", 894 | "lock_api", 895 | "parking_lot_core", 896 | ] 897 | 898 | [[package]] 899 | name = "parking_lot_core" 900 | version = "0.8.5" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 903 | dependencies = [ 904 | "cfg-if", 905 | "instant", 906 | "libc", 907 | "redox_syscall", 908 | "smallvec", 909 | "winapi", 910 | ] 911 | 912 | [[package]] 913 | name = "peeking_take_while" 914 | version = "0.1.2" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 917 | 918 | [[package]] 919 | name = "percent-encoding" 920 | version = "2.1.0" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 923 | 924 | [[package]] 925 | name = "pkg-config" 926 | version = "0.3.24" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" 929 | 930 | [[package]] 931 | name = "proc-macro-crate" 932 | version = "0.1.5" 933 | source = "registry+https://github.com/rust-lang/crates.io-index" 934 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 935 | dependencies = [ 936 | "toml", 937 | ] 938 | 939 | [[package]] 940 | name = "proc-macro-crate" 941 | version = "1.1.0" 942 | source = "registry+https://github.com/rust-lang/crates.io-index" 943 | checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" 944 | dependencies = [ 945 | "thiserror", 946 | "toml", 947 | ] 948 | 949 | [[package]] 950 | name = "proc-macro-error" 951 | version = "1.0.4" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 954 | dependencies = [ 955 | "proc-macro-error-attr", 956 | "proc-macro2 1.0.34", 957 | "quote 1.0.10", 958 | "syn 1.0.82", 959 | "version_check", 960 | ] 961 | 962 | [[package]] 963 | name = "proc-macro-error-attr" 964 | version = "1.0.4" 965 | source = "registry+https://github.com/rust-lang/crates.io-index" 966 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 967 | dependencies = [ 968 | "proc-macro2 1.0.34", 969 | "quote 1.0.10", 970 | "version_check", 971 | ] 972 | 973 | [[package]] 974 | name = "proc-macro2" 975 | version = "0.4.30" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 978 | dependencies = [ 979 | "unicode-xid 0.1.0", 980 | ] 981 | 982 | [[package]] 983 | name = "proc-macro2" 984 | version = "1.0.34" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "2f84e92c0f7c9d58328b85a78557813e4bd845130db68d7184635344399423b1" 987 | dependencies = [ 988 | "unicode-xid 0.2.2", 989 | ] 990 | 991 | [[package]] 992 | name = "quick-error" 993 | version = "1.2.3" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 996 | 997 | [[package]] 998 | name = "quicli" 999 | version = "0.4.0" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "9e8539e98d5a5e3cb0398aedac3e9642ead7d3047a459893526710cb5ad86f6c" 1002 | dependencies = [ 1003 | "clap-verbosity-flag", 1004 | "exitfailure", 1005 | "failure", 1006 | "failure_derive", 1007 | "globwalk", 1008 | "log", 1009 | "rayon", 1010 | "remove_dir_all", 1011 | "serde", 1012 | "serde_derive", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "quote" 1017 | version = "0.6.13" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1020 | dependencies = [ 1021 | "proc-macro2 0.4.30", 1022 | ] 1023 | 1024 | [[package]] 1025 | name = "quote" 1026 | version = "1.0.10" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" 1029 | dependencies = [ 1030 | "proc-macro2 1.0.34", 1031 | ] 1032 | 1033 | [[package]] 1034 | name = "rayon" 1035 | version = "1.5.1" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" 1038 | dependencies = [ 1039 | "autocfg", 1040 | "crossbeam-deque", 1041 | "either", 1042 | "rayon-core", 1043 | ] 1044 | 1045 | [[package]] 1046 | name = "rayon-core" 1047 | version = "1.9.1" 1048 | source = "registry+https://github.com/rust-lang/crates.io-index" 1049 | checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" 1050 | dependencies = [ 1051 | "crossbeam-channel", 1052 | "crossbeam-deque", 1053 | "crossbeam-utils", 1054 | "lazy_static", 1055 | "num_cpus", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "redox_syscall" 1060 | version = "0.2.10" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" 1063 | dependencies = [ 1064 | "bitflags", 1065 | ] 1066 | 1067 | [[package]] 1068 | name = "regex" 1069 | version = "1.5.4" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 1072 | dependencies = [ 1073 | "aho-corasick", 1074 | "memchr", 1075 | "regex-syntax", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "regex-syntax" 1080 | version = "0.6.25" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 1083 | 1084 | [[package]] 1085 | name = "remove_dir_all" 1086 | version = "0.5.3" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1089 | dependencies = [ 1090 | "winapi", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "ring" 1095 | version = "0.16.20" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1098 | dependencies = [ 1099 | "cc", 1100 | "libc", 1101 | "once_cell", 1102 | "spin", 1103 | "untrusted", 1104 | "web-sys", 1105 | "winapi", 1106 | ] 1107 | 1108 | [[package]] 1109 | name = "rodio" 1110 | version = "0.14.0" 1111 | source = "registry+https://github.com/rust-lang/crates.io-index" 1112 | checksum = "4d98f5e557b61525057e2bc142c8cd7f0e70d75dc32852309bec440e6e046bf9" 1113 | dependencies = [ 1114 | "claxon", 1115 | "cpal", 1116 | "hound", 1117 | "lewton", 1118 | "minimp3", 1119 | ] 1120 | 1121 | [[package]] 1122 | name = "rustc-demangle" 1123 | version = "0.1.21" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" 1126 | 1127 | [[package]] 1128 | name = "rustc-hash" 1129 | version = "1.1.0" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1132 | 1133 | [[package]] 1134 | name = "rustls" 1135 | version = "0.19.1" 1136 | source = "registry+https://github.com/rust-lang/crates.io-index" 1137 | checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" 1138 | dependencies = [ 1139 | "base64", 1140 | "log", 1141 | "ring", 1142 | "sct", 1143 | "webpki", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "same-file" 1148 | version = "1.0.6" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1151 | dependencies = [ 1152 | "winapi-util", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "scopeguard" 1157 | version = "1.1.0" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1160 | 1161 | [[package]] 1162 | name = "sct" 1163 | version = "0.6.1" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" 1166 | dependencies = [ 1167 | "ring", 1168 | "untrusted", 1169 | ] 1170 | 1171 | [[package]] 1172 | name = "serde" 1173 | version = "1.0.132" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "8b9875c23cf305cd1fd7eb77234cbb705f21ea6a72c637a5c6db5fe4b8e7f008" 1176 | 1177 | [[package]] 1178 | name = "serde_derive" 1179 | version = "1.0.132" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "ecc0db5cb2556c0e558887d9bbdcf6ac4471e83ff66cf696e5419024d1606276" 1182 | dependencies = [ 1183 | "proc-macro2 1.0.34", 1184 | "quote 1.0.10", 1185 | "syn 1.0.82", 1186 | ] 1187 | 1188 | [[package]] 1189 | name = "shlex" 1190 | version = "0.1.1" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" 1193 | 1194 | [[package]] 1195 | name = "slice-deque" 1196 | version = "0.3.0" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "31ef6ee280cdefba6d2d0b4b78a84a1c1a3f3a4cec98c2d4231c8bc225de0f25" 1199 | dependencies = [ 1200 | "libc", 1201 | "mach", 1202 | "winapi", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "smallvec" 1207 | version = "1.7.0" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" 1210 | 1211 | [[package]] 1212 | name = "spin" 1213 | version = "0.5.2" 1214 | source = "registry+https://github.com/rust-lang/crates.io-index" 1215 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1216 | 1217 | [[package]] 1218 | name = "stdweb" 1219 | version = "0.1.3" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" 1222 | 1223 | [[package]] 1224 | name = "strsim" 1225 | version = "0.8.0" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1228 | 1229 | [[package]] 1230 | name = "strsim" 1231 | version = "0.9.3" 1232 | source = "registry+https://github.com/rust-lang/crates.io-index" 1233 | checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" 1234 | 1235 | [[package]] 1236 | name = "structopt" 1237 | version = "0.2.18" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7" 1240 | dependencies = [ 1241 | "clap", 1242 | "structopt-derive 0.2.18", 1243 | ] 1244 | 1245 | [[package]] 1246 | name = "structopt" 1247 | version = "0.3.25" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" 1250 | dependencies = [ 1251 | "clap", 1252 | "lazy_static", 1253 | "structopt-derive 0.4.18", 1254 | ] 1255 | 1256 | [[package]] 1257 | name = "structopt-derive" 1258 | version = "0.2.18" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107" 1261 | dependencies = [ 1262 | "heck", 1263 | "proc-macro2 0.4.30", 1264 | "quote 0.6.13", 1265 | "syn 0.15.44", 1266 | ] 1267 | 1268 | [[package]] 1269 | name = "structopt-derive" 1270 | version = "0.4.18" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" 1273 | dependencies = [ 1274 | "heck", 1275 | "proc-macro-error", 1276 | "proc-macro2 1.0.34", 1277 | "quote 1.0.10", 1278 | "syn 1.0.82", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "syn" 1283 | version = "0.15.44" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1286 | dependencies = [ 1287 | "proc-macro2 0.4.30", 1288 | "quote 0.6.13", 1289 | "unicode-xid 0.1.0", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "syn" 1294 | version = "1.0.82" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" 1297 | dependencies = [ 1298 | "proc-macro2 1.0.34", 1299 | "quote 1.0.10", 1300 | "unicode-xid 0.2.2", 1301 | ] 1302 | 1303 | [[package]] 1304 | name = "synstructure" 1305 | version = "0.12.6" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" 1308 | dependencies = [ 1309 | "proc-macro2 1.0.34", 1310 | "quote 1.0.10", 1311 | "syn 1.0.82", 1312 | "unicode-xid 0.2.2", 1313 | ] 1314 | 1315 | [[package]] 1316 | name = "termcolor" 1317 | version = "1.1.2" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 1320 | dependencies = [ 1321 | "winapi-util", 1322 | ] 1323 | 1324 | [[package]] 1325 | name = "tests" 1326 | version = "0.1.0" 1327 | dependencies = [ 1328 | "tts_rust", 1329 | ] 1330 | 1331 | [[package]] 1332 | name = "textwrap" 1333 | version = "0.11.0" 1334 | source = "registry+https://github.com/rust-lang/crates.io-index" 1335 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1336 | dependencies = [ 1337 | "unicode-width", 1338 | ] 1339 | 1340 | [[package]] 1341 | name = "thiserror" 1342 | version = "1.0.30" 1343 | source = "registry+https://github.com/rust-lang/crates.io-index" 1344 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 1345 | dependencies = [ 1346 | "thiserror-impl", 1347 | ] 1348 | 1349 | [[package]] 1350 | name = "thiserror-impl" 1351 | version = "1.0.30" 1352 | source = "registry+https://github.com/rust-lang/crates.io-index" 1353 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 1354 | dependencies = [ 1355 | "proc-macro2 1.0.34", 1356 | "quote 1.0.10", 1357 | "syn 1.0.82", 1358 | ] 1359 | 1360 | [[package]] 1361 | name = "thread_local" 1362 | version = "1.1.3" 1363 | source = "registry+https://github.com/rust-lang/crates.io-index" 1364 | checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" 1365 | dependencies = [ 1366 | "once_cell", 1367 | ] 1368 | 1369 | [[package]] 1370 | name = "tinyvec" 1371 | version = "1.5.1" 1372 | source = "registry+https://github.com/rust-lang/crates.io-index" 1373 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" 1374 | dependencies = [ 1375 | "tinyvec_macros", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "tinyvec_macros" 1380 | version = "0.1.0" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1383 | 1384 | [[package]] 1385 | name = "toml" 1386 | version = "0.5.8" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 1389 | dependencies = [ 1390 | "serde", 1391 | ] 1392 | 1393 | [[package]] 1394 | name = "tts_rust" 1395 | version = "0.3.3" 1396 | dependencies = [ 1397 | "minreq", 1398 | "percent-encoding", 1399 | "quicli", 1400 | "rodio", 1401 | "structopt 0.3.25", 1402 | ] 1403 | 1404 | [[package]] 1405 | name = "unicode-segmentation" 1406 | version = "1.8.0" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" 1409 | 1410 | [[package]] 1411 | name = "unicode-width" 1412 | version = "0.1.9" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" 1415 | 1416 | [[package]] 1417 | name = "unicode-xid" 1418 | version = "0.1.0" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1421 | 1422 | [[package]] 1423 | name = "unicode-xid" 1424 | version = "0.2.2" 1425 | source = "registry+https://github.com/rust-lang/crates.io-index" 1426 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 1427 | 1428 | [[package]] 1429 | name = "untrusted" 1430 | version = "0.7.1" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1433 | 1434 | [[package]] 1435 | name = "vec_map" 1436 | version = "0.8.2" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1439 | 1440 | [[package]] 1441 | name = "version_check" 1442 | version = "0.9.3" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 1445 | 1446 | [[package]] 1447 | name = "walkdir" 1448 | version = "2.3.2" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 1451 | dependencies = [ 1452 | "same-file", 1453 | "winapi", 1454 | "winapi-util", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "wasm-bindgen" 1459 | version = "0.2.78" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" 1462 | dependencies = [ 1463 | "cfg-if", 1464 | "wasm-bindgen-macro", 1465 | ] 1466 | 1467 | [[package]] 1468 | name = "wasm-bindgen-backend" 1469 | version = "0.2.78" 1470 | source = "registry+https://github.com/rust-lang/crates.io-index" 1471 | checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" 1472 | dependencies = [ 1473 | "bumpalo", 1474 | "lazy_static", 1475 | "log", 1476 | "proc-macro2 1.0.34", 1477 | "quote 1.0.10", 1478 | "syn 1.0.82", 1479 | "wasm-bindgen-shared", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "wasm-bindgen-macro" 1484 | version = "0.2.78" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" 1487 | dependencies = [ 1488 | "quote 1.0.10", 1489 | "wasm-bindgen-macro-support", 1490 | ] 1491 | 1492 | [[package]] 1493 | name = "wasm-bindgen-macro-support" 1494 | version = "0.2.78" 1495 | source = "registry+https://github.com/rust-lang/crates.io-index" 1496 | checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" 1497 | dependencies = [ 1498 | "proc-macro2 1.0.34", 1499 | "quote 1.0.10", 1500 | "syn 1.0.82", 1501 | "wasm-bindgen-backend", 1502 | "wasm-bindgen-shared", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "wasm-bindgen-shared" 1507 | version = "0.2.78" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" 1510 | 1511 | [[package]] 1512 | name = "web-sys" 1513 | version = "0.3.55" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" 1516 | dependencies = [ 1517 | "js-sys", 1518 | "wasm-bindgen", 1519 | ] 1520 | 1521 | [[package]] 1522 | name = "webpki" 1523 | version = "0.21.4" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" 1526 | dependencies = [ 1527 | "ring", 1528 | "untrusted", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "webpki-roots" 1533 | version = "0.18.0" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" 1536 | dependencies = [ 1537 | "webpki", 1538 | ] 1539 | 1540 | [[package]] 1541 | name = "winapi" 1542 | version = "0.3.9" 1543 | source = "registry+https://github.com/rust-lang/crates.io-index" 1544 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1545 | dependencies = [ 1546 | "winapi-i686-pc-windows-gnu", 1547 | "winapi-x86_64-pc-windows-gnu", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "winapi-i686-pc-windows-gnu" 1552 | version = "0.4.0" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1555 | 1556 | [[package]] 1557 | name = "winapi-util" 1558 | version = "0.1.5" 1559 | source = "registry+https://github.com/rust-lang/crates.io-index" 1560 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1561 | dependencies = [ 1562 | "winapi", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "winapi-x86_64-pc-windows-gnu" 1567 | version = "0.4.0" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1570 | -------------------------------------------------------------------------------- /tests/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "tests" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [[bin]] 9 | name = "test_one" 10 | path = "one.rs" 11 | 12 | [[bin]] 13 | name = "test_two" 14 | path = "two.rs" 15 | 16 | [dependencies] 17 | tts_rust = { path = "../" } -------------------------------------------------------------------------------- /tests/one.rs: -------------------------------------------------------------------------------- 1 | use tts_rust::tts::GTTSClient; 2 | 3 | fn main() -> Result<(), Box> { 4 | let narrator = GTTSClient { 5 | volume: 1.0, 6 | language: tts_rust::languages::Languages::English, 7 | tld: "com", 8 | }; 9 | let result = narrator.speak("Hello!").unwrap(); 10 | 11 | println!("{:?}", result); 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /tests/two.rs: -------------------------------------------------------------------------------- 1 | use tts_rust::tts::GTTSClient; 2 | 3 | fn main() -> Result<(), Box> { 4 | let narrator = GTTSClient { 5 | volume: 1.0, 6 | language: tts_rust::languages::Languages::English, 7 | tld: "eee", 8 | }; 9 | let result = narrator.speak("Hello!").unwrap(); 10 | 11 | println!("{:?}", result); 12 | Ok(()) 13 | } 14 | --------------------------------------------------------------------------------