v6.0.0: New major version of aspeak
aspeak v6.0 is finally released🎉🎉🎉! This is a major release with some breaking changes. Please read the following carefully.
Generic
- GitHub branches: The main branch has been deleted. The default branch is now
v6
and it will change as the major version change. - Upgrade dependencies (Solves security alert #77)
- Internal refactor
For CLI users
- Now the CLI uses the REST API instead of the WebSocket API by default.
- You can use the
--mode websocket
flag to use the WebSocket API. - You can also set the
mode
field towebsocket
in the auth section in your profile to use the WebSocket API by default.
- You can use the
- When the TTS API returns empty audio, aspeak no longer reports an cryptic "Unrecognized format" error.
- It will now report a warning in this case: "Got empty audio buffer, nothing to play"
- Now the voice listing command no longer fails with this API endpoint: https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list
- Performance improvement: eliminate unnecessary memory copy
For Rust crate users
There are a lots of breaking changes:
- Some fields of the
Voice
struct is now optional. - We now uses an modular approach for error handling instead of using a big enum for all errors. (#66)
- Now there are two synthesizers:
RestSynthesizer
for the REST API andWebSocketSynthesizer
for the WebSocket API. (#71)- The REST synthesizer has two extra methods that returns the underlying
Bytes
object instead ofVec<u8>
.
- The REST synthesizer has two extra methods that returns the underlying
- There is a
UnifiedSynthesizer
trait that provides a unified interface for both synthesizers. - Some methods are renamed. For example,
Synthesizer::connect
is nowSynthesizer::connect_websocket
. - Four new feature flags of this crate:
rest-synthesizer
: Enable theRestSynthesizer
struct.websocket-synthesizer
: Enable theWebSocketSynthesizer
struct.unified-synthesizer
: Enable theUnifiedSynthesizer
trait.synthesizers
: Enable all synthesizers.synthesizers
feature are enabled by default.- Disabling
websocket-synthesizer
feature will save you a bunch of dependencies. (aspeak.rlib
is ~0.8MB smaller in release mode)
- Improved doc comments.
- Support TLS feature flags: By default, this crate uses
native-tls
. To use other TLS implementations, you can use the following feature flags:native-tls-vendored
: Use the vendored version ofnative-tls
.rustls-tls-native-roots
rustls-tls-webpki-roots
- Add 4 examples for quick reference:
For Python binding users
- The
SpeechService
now automatically connect when it is constructed and it is using the websocket API. Theconnect
method is removed. - It now uses the REST API by default.
- New keyword argument for the constructor of
SpeechService
:- mode:
rest
orwebsocket
. Default isrest
.
- mode:
- Improved error messages of the python binding
- Enable abi3 wheels so that we do not need to build for every python version.
- Now type hints are provided. You will get better completion in your IDE. (#78)