Skip to content

Commit 6d2c9a7

Browse files
committed
release: publish v5.0
1 parent d9e279d commit 6d2c9a7

File tree

4 files changed

+46
-15
lines changed

4 files changed

+46
-15
lines changed

CHANGELOG.md

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

3+
# v5.0.0
4+
5+
## Enhancements
6+
7+
- Add support for `--color={auto,always,never}` options. And `aspeak` will also respect the `NO_COLOR` environment variable.
8+
- There is an edge case that `aspeak` will use colored output even if `--color=never` is specified.
9+
This is because `aspeak` uses `clap` to parse command line options. `--color=never` works only if the command line parsing is successful.
10+
So if you specify an invalid option, `aspeak` will print the error message and exit. In this case, `aspeak` will use colored output.
11+
- More documentation for the rust crate.
12+
- Minor performance improvements.
13+
- Now you can specify the custom voice list API url in your profile(field `voice_list_api` in section `auth`).
14+
15+
## Breaking changes
16+
17+
- The default trial endpoint has been removed because it was shutdown by Microsoft. Now you must set up authentication to use `aspeak`.
18+
- The default voice list API url has been removed for the same reason.
19+
- The rust API has been changed.
20+
- `Synthesizer` is now `Send`. Its various `synthesize_*` methods now takes `&mut self` instead of `&self`.
21+
- Now you need to use the builder pattern to create various options like `TextOptions`.
22+
- Fields of the `Voice` struct are now private. You can use the methods to access them.
23+
24+
## Other changes
25+
26+
- The PKGBUILDs for Arch Linux is no longer stored in this repository. You can find them in the [AUR](https://aur.archlinux.org/packages/aspeak).
27+
328
# v4.3.1
429

530
- Fix a bug that caused the `endpoint` and `region` settings in profile to be ineffective.

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 = "4.3.1"
3+
version = "5.0.0"
44
edition = "2021"
55
authors = ["kxxt <[email protected]>"]
66
description = "A simple text-to-speech client for Azure TTS API."

README.md

+19-13
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@
1414

1515
A simple text-to-speech client for Azure TTS API. :laughing:
1616

17-
You can try the Azure TTS API online: https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech
18-
1917
## Note
2018

2119
Starting from version 4.0.0, `aspeak` is rewritten in rust. The old python version is available at the `python` branch.
2220

23-
By default, we try to use a trial endpoint that doesn't require authentication.
24-
But its availability is not guaranteed and its capability is restricted by Microsoft.
25-
2621
You can sign up for an Azure account and then
2722
[choose a payment plan as needed (or stick to free tier)](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-services/).
2823
The free tier includes a quota of 0.5 million characters per month, free of charge.
@@ -48,7 +43,7 @@ From v4.1.0, You can install `aspeak-bin` from AUR.
4843
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.
4944

5045
```bash
51-
pip install -U aspeak==4.3.1
46+
pip install -U aspeak==5.0.0
5247
```
5348

5449
Now the prebuilt wheels are only available for x86_64 architecture.
@@ -108,6 +103,10 @@ $ aspeak --region <YOUR_REGION> --key <YOUR_SUBSCRIPTION_KEY> text "Hello World
108103

109104
If you are using a custom endpoint, you can use the `--endpoint` option instead of `--region`.
110105

106+
To avoid repetition, you can store your authentication details
107+
in your aspeak profile.
108+
Read the following section for more details.
109+
111110
From v4.3.0, you can let aspeak use a proxy server to connect to the endpoint.
112111
For now, only http and socks5 proxies are supported (no https support yet). For example:
113112

@@ -118,10 +117,6 @@ $ aspeak --proxy socks5://your_proxy_server:port text "Hello World"
118117

119118
aspeak also respects the `HTTP_PROXY`(or `http_proxy`) environment variable.
120119

121-
To avoid repetition, you can store your authentication details
122-
in your aspeak profile.
123-
Read the following section for more details.
124-
125120
### Configuration
126121

127122
aspeak v4 introduces the concept of profiles.
@@ -171,7 +166,7 @@ verbosity = 0
171166

172167
[auth]
173168
# Endpoint for TTS
174-
# endpoint = "wss://eastus.api.speech.microsoft.com/cognitiveservices/websocket/v1"
169+
# endpoint = "wss://eastus.tts.speech.microsoft.com/cognitiveservices/websocket/v1"
175170

176171
# Alternatively, you can specify the region if you are using official endpoints
177172
# region = "eastus"
@@ -188,6 +183,9 @@ verbosity = 0
188183
# Proxy
189184
# proxy = "socks5://127.0.0.1:7890"
190185

186+
# Voice list API url
187+
# voice_list_api = "Custom voice list API url"
188+
191189
#
192190
# Configuration for text subcommand
193191
#
@@ -231,6 +229,12 @@ If you want to use a profile other than your default profile, you can use the `-
231229
aspeak --profile <PATH_TO_A_PROFILE> text "Hello"
232230
```
233231

232+
If you want to temporarily disable the profile, you can use the `--no-profile` argument:
233+
234+
```sh
235+
aspeak --no-profile --region eastus --key <YOUR_KEY> text "Hello"
236+
```
237+
234238
### Pitch and Rate
235239

236240
- `rate`: The speaking rate of the voice.
@@ -255,6 +259,8 @@ aspeak --profile <PATH_TO_A_PROFILE> text "Hello"
255259

256260
### Examples
257261

262+
The following examples assume that you have already set up authentication in your profile.
263+
258264
#### Speak "Hello, world!" to default speaker.
259265

260266
```sh
@@ -481,7 +487,7 @@ $ aspeak text "你好,世界!" -v zh-CN-XiaoxiaoNeural -p=+1st -r=-7% -S lyr
481487

482488
#### Use a custom audio format for output
483489

484-
**Note**: Some audio formats are not supported when you are outputting to speaker.
490+
**Note**: Some audio formats are not supported when outputting to speaker.
485491

486492
```sh
487493
$ aspeak text "Hello World" -F riff-48khz-16bit-mono-pcm -o high-quality.wav
@@ -509,7 +515,7 @@ When creating a `SpeechService` instance, you can specify the following paramete
509515

510516
- `audio_format`: The audio format of the output audio. Default is `AudioFormat.Riff24KHz16BitMonoPcm`.
511517
- You can get an audio format by providing a container format and a quality level: `AudioFormat("mp3", 2)`.
512-
- `endpoint`: The endpoint of the speech service. We will use a trial endpoint by default.
518+
- `endpoint`: The endpoint of the speech service.
513519
- `region`: Alternatively, you can specify the region of the speech service instead of typing the boring endpoint url.
514520
- `subscription_key`: The subscription key of the speech service.
515521
- `token`: The auth token for the speech service. If you provide a token, the subscription key will be ignored.

0 commit comments

Comments
 (0)