Commit Graph

27 Commits

Author SHA1 Message Date
Nolan Darilek 4d01717e75 Fix return type in Tolk backend. 2022-03-31 13:38:39 -05:00
Nolan Darilek e4c6f6f23a Add voice stubs to Tolk backend. 2022-03-30 20:22:37 -05:00
Nolan Darilek c222c087b2 cargo fmt 2022-03-30 10:18:22 -05:00
francois-caddet 88f4598ec6 Merge branch 'master' into feature/voices 2022-03-20 13:02:37 +01:00
Nolan Darilek ca7789f157 Bump version and Tolk dependency. 2021-05-20 13:59:02 -05:00
Nolan Darilek d85d56c3ee Bump version to work around Tolk crash. 2021-05-11 23:53:15 -05:00
Nolan Darilek 296fa89f5d Bump version, and use automatically-provided feature provided by optional tolk dependency. 2021-01-21 10:49:11 -06:00
Nolan Darilek cf0ad2221e Derive Debug. 2020-11-02 21:44:47 -06:00
Nolan Darilek 551bb1292e Make `TTS` clonable.
Also, add other possibly useful derives.
2020-11-02 21:27:13 -06:00
Nolan Darilek fa216a534e Gate Tolk behind use_tolk feature to support compilation on UWP. 2020-10-08 19:07:07 -05:00
Francois Caddet 47cbb80595 Merge branch 'develop' into feature/voices 2020-09-26 18:20:10 +02:00
Nolan Darilek 532d5d9b58 Tighten up access. 2020-09-23 12:23:46 -05:00
Nolan Darilek 6788277a4d Implement framework for utterance callbacks in Windows backends, though they aren't currently called. 2020-09-23 10:31:21 -05:00
Nolan Darilek 4816ec575c Make speak calls return an utterance ID, where possible. 2020-09-22 12:40:03 -05:00
Nolan Darilek d6508edd12 Remove workaround for incorrect Tolk string handling, pin minimum working version, and bump version. 2020-09-21 15:13:22 -05:00
François Caddet 97f1de5724 Merge branch 'develop' into feature/voices 2020-09-05 12:27:19 +02:00
François Caddet 335ac710a6 add unimplemented functions forvoices feature on every backends 2020-09-05 12:07:51 +02:00
Nolan Darilek 665013fdff Split text sent to Tolk backend to account for some sort of length limit.
Tolk seems to fail on strings larger than 325 characters in length. Here we:
* Send any strings with 300 or fewer characters through directly.
* For larger strings, split on whitespace boundaries, then create and send buffers of 300 or fewer characters.

This may not handle internationalized text, and may not handle someone bombarding TTS with a giant word. PRs for either welcome.
2020-09-02 11:40:08 -05:00
Nolan Darilek d3ffd5078f cargo fmt 2020-08-24 16:46:57 -05:00
Nolan Darilek 1507527175 Add `Default` implementation for `Features` so backends need only specify features they actually support. 2020-08-24 16:44:00 -05:00
Nolan Darilek 16a6f6378a Under WinRT, recreate player completely when interruption is requested. 2020-07-06 12:52:18 -05:00
Nolan Darilek 4f011e6895 Get Tolk working again.
Two Tolk instances were being created. One checked for the presence of a screen reader. The other actually performed the speech, and was returned as part of the `TTS` instance.

Unfortunately, Tolk doesn't seem to appreciate being called twice. So here we check if a screen reader is detected and, if one is, return the instance that did the detection. Otherwise, error out and return the WinRT backend.
2020-06-11 13:00:24 -05:00
Nolan Darilek c24c1d3230 Implement support for detecting when TTS is speaking. 2020-06-02 14:53:14 -05:00
Nolan Darilek 7b4fb8dae4 Clean up speech synthesis properties, and implement everything for WinRT.
I'd previously attempted to normalize everything to `u8`, but this had some drawbacks:

 * It failed to account for some synthesis drivers defining normal as mid-range, while most define it very low.
 * It didn't track the normal value for a given synthesizer.
 * There was no clean way to map a curve between the minimum, normal, and maximum rates.

Here we track the minimum, normal, and maximum values of rate, pitch, and volume. Sanity checks are done on set.

Also, as a further proof-of-concept, all properties are now implemented for the WinRT driver.
2020-05-18 18:12:59 -05:00
Nolan Darilek f4b4ba5184 Clippy and fmt. 2019-12-23 07:37:48 -06:00
Nolan Darilek 1c1f38b55d Use new Tolk library and update backend. 2019-09-10 10:41:28 -05:00
Nolan Darilek 3bda7bcff4 Add Tolk backend. 2019-03-25 19:15:08 +00:00