Skip to content

Commit 71764e9

Browse files
committed
release: v6.0.0
Close #78 Close #71 Close #66
1 parent 7fe038a commit 71764e9

File tree

4 files changed

+76
-5
lines changed

4 files changed

+76
-5
lines changed

CHANGELOG.md

+58
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# aspeak Changelog
22

3+
# v6.0.0
4+
5+
aspeak v6.0 is finally released🎉🎉🎉! This is a major release with some breaking changes. Please read the following carefully.
6+
7+
## Generic
8+
9+
- GitHub branches: The main branch has been deleted. The default branch is now `v5` and it will change to `v6` when v6 is released.
10+
- Upgrade dependencies (Solves security alert #77)
11+
- Internal refactor
12+
13+
## For CLI users
14+
15+
- Now the CLI uses the REST API instead of the WebSocket API by default.
16+
- You can use the `--mode websocket` flag to use the WebSocket API.
17+
- You can also set the `mode` field to `websocket` in the auth section in your profile to use the WebSocket API by default.
18+
- When the TTS API returns empty audio, aspeak no longer reports an cryptic "Unrecognized format" error.
19+
- It will now report a warning in this case: "Got empty audio buffer, nothing to play"
20+
- Now the voice listing command no longer fails with this API endpoint: https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list
21+
- Performance improvement: eliminate unnecessary memory copy
22+
23+
## For Rust crate users
24+
25+
There are a lots of breaking changes:
26+
27+
- Some fields of the `Voice` struct is now optional.
28+
- We now uses an [modular approach for error handling](https://sabrinajewson.org/blog/errors) instead of using a big enum for all errors. (#66)
29+
- Now there are two synthesizers: `RestSynthesizer` for the REST API and `WebSocketSynthesizer` for the WebSocket API. (#71)
30+
- The REST synthesizer has two extra methods that returns the underlying `Bytes` object instead of `Vec<u8>`.
31+
- There is a `UnifiedSynthesizer` trait that provides a unified interface for both synthesizers.
32+
- Some methods are renamed. For example, `Synthesizer::connect` is now `Synthesizer::connect_websocket`.
33+
- Four new feature flags of this crate:
34+
- `rest-synthesizer`: Enable the `RestSynthesizer` struct.
35+
- `websocket-synthesizer`: Enable the `WebSocketSynthesizer` struct.
36+
- `unified-synthesizer`: Enable the `UnifiedSynthesizer` trait.
37+
- `synthesizers`: Enable all synthesizers.
38+
- `synthesizers` feature are enabled by default.
39+
- Disabling `websocket-synthesizer` feature will save you a bunch of dependencies. (`aspeak.rlib` is ~0.8MB smaller in release mode)
40+
- Improved doc comments.
41+
- Support TLS feature flags: By default, this crate uses `native-tls`. To use other TLS implementations, you can use the following feature flags:
42+
- `native-tls-vendored`: Use the vendored version of `native-tls`.
43+
- `rustls-tls-native-roots`
44+
- `rustls-tls-webpki-roots`
45+
- Add 4 examples for quick reference:
46+
- [Simple usage of RestSynthesizer](https://github.com/kxxt/aspeak/blob/v6/examples/03-rest-synthesizer-simple.rs)
47+
- [Simple usage of WebsocketSynthesizer](https://github.com/kxxt/aspeak/blob/v6/examples/04-websocket-synthesizer-simple.rs)
48+
- [Synthesize all txt files in a given directory](https://github.com/kxxt/aspeak/blob/v6/examples/01-synthesize-txt-files.rs)
49+
- [Read-Synthesize-Speak-Loop: Read text from stdin line by line and speak it](https://github.com/kxxt/aspeak/blob/v6/examples/02-rssl.rs)
50+
51+
## For Python binding users
52+
53+
- The `SpeechService` now automatically connect when it is constructed and it is using the websocket API. The `connect` method is removed.
54+
- It now uses the REST API by default.
55+
- New keyword argument for the constructor of `SpeechService`:
56+
- mode: `rest` or `websocket`. Default is `rest`.
57+
- Improved error messages of the python binding
58+
- Enable abi3 wheels so that we do not need to build for every python version.
59+
- Now type hints are provided. You will get better completion in your IDE. (#78)
60+
361
# v6.0.0-rc.1
462

563
Changes after v6.0.0-beta.3:

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aspeak"
3-
version = "6.0.0-rc.1"
3+
version = "6.0.0"
44
edition = "2021"
55
authors = ["kxxt <[email protected]>"]
66
description = "A simple text-to-speech client for Azure TTS API."

README.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![GitHub stars](https://img.shields.io/github/stars/kxxt/aspeak)](https://github.com/kxxt/aspeak/stargazers)
44
[![GitHub issues](https://img.shields.io/github/issues/kxxt/aspeak)](https://github.com/kxxt/aspeak/issues)
55
[![GitHub forks](https://img.shields.io/github/forks/kxxt/aspeak)](https://github.com/kxxt/aspeak/network)
6-
[![GitHub license](https://img.shields.io/github/license/kxxt/aspeak)](https://github.com/kxxt/aspeak/blob/main/LICENSE)
6+
[![GitHub license](https://img.shields.io/github/license/kxxt/aspeak)](https://github.com/kxxt/aspeak/blob/v6/LICENSE)
77

88
<a href="https://github.com/kxxt/aspeak/graphs/contributors" alt="Contributors">
99
<img src="https://img.shields.io/github/contributors/kxxt/aspeak" />
@@ -16,6 +16,9 @@ A simple text-to-speech client for Azure TTS API. :laughing:
1616

1717
## Note
1818

19+
Starting from version 6.0.0, `aspeak` by default uses the RESTful API of Azure TTS. If you want to use the WebSocket API,
20+
you can specify `--mode websocket` when invoking `aspeak` or set `mode = "websocket"` in the `auth` section of your profile.
21+
1922
Starting from version 4.0.0, `aspeak` is rewritten in rust. The old python version is available at the `python` branch.
2023

2124
You can sign up for an Azure account and then
@@ -43,7 +46,7 @@ From v4.1.0, You can install `aspeak-bin` from AUR.
4346
Installing from PyPI will also install the python binding of `aspeak` for you. Check [Library Usage#Python](#Python) for more information on using the python binding.
4447

4548
```bash
46-
pip install -U aspeak==5.2.0
49+
pip install -U aspeak==6.0.0
4750
```
4851

4952
Now the prebuilt wheels are only available for x86_64 architecture.
@@ -98,7 +101,7 @@ an official endpoint designated by a region,
98101
run the following command:
99102

100103
```sh
101-
$ aspeak --region <YOUR_REGION> --key <YOUR_SUBSCRIPTION_KEY> text "Hello World"
104+
$ aspeak --region <YOUR_REGION> --key <YOUR_SUBSCRIPTION_KEY> text "Hello World"
102105
```
103106

104107
If you are using a custom endpoint, you can use the `--endpoint` option instead of `--region`.
@@ -176,6 +179,9 @@ verbosity = 0
176179
# Alternatively, you can specify the region if you are using official endpoints
177180
# region = "eastus"
178181

182+
# Synthesizer Mode, "rest" or "websocket"
183+
# mode = "rest"
184+
179185
# Azure Subscription Key
180186
# key = "YOUR_KEY"
181187

@@ -565,3 +571,10 @@ $ cargo add aspeak
565571
```
566572

567573
Then follow the [documentation](https://docs.rs/aspeak) of `aspeak` crate.
574+
575+
There are 4 examples for quick reference:
576+
577+
- [Simple usage of RestSynthesizer](https://github.com/kxxt/aspeak/blob/v6/examples/03-rest-synthesizer-simple.rs)
578+
- [Simple usage of WebsocketSynthesizer](https://github.com/kxxt/aspeak/blob/v6/examples/04-websocket-synthesizer-simple.rs)
579+
- [Synthesize all txt files in a given directory](https://github.com/kxxt/aspeak/blob/v6/examples/01-synthesize-txt-files.rs)
580+
- [Read-Synthesize-Speak-Loop: Read text from stdin line by line and speak it](https://github.com/kxxt/aspeak/blob/v6/examples/02-rssl.rs)

0 commit comments

Comments
 (0)