kxxt / aspeak

A simple text-to-speech client for Azure TTS API.
MIT License
494 stars 57 forks source link

Add `audio` feature for crate #64

Closed attila-lin closed 1 year ago

attila-lin commented 1 year ago

Hello~

In my use case, I don't need to play the audio.

So add a audio feature to play the audio which contains the deps for this job will be nice for users like me to reduce the deps.

kxxt commented 1 year ago

Actually I wanted to separate the dependencies for the bin and lib from the very start of RIIR. Unfortunately it is not possible(https://github.com/rust-lang/cargo/issues/1982).

So add a audio feature to play the audio which contains the deps for this job will be nice for users like me to reduce the deps.

It is the best workaround we can use for now. I will add a binary feature so that clap, env_logger and rodio are not required for the lib.

I don't need to play the audio.

Actually the rust lib doesn't have any API to play the audio. I have no plan to support it until there is an asynchronous playback API. rodio uses a multi-thread approach and it won't play well with tokio.

kxxt commented 1 year ago

Implemented in v5.1.0.