drmfinlay / tts-util-app

TTS Util — Text-to-speech utility Android app for synthesising text into audible speech
Apache License 2.0
109 stars 19 forks source link

Feature Request: Option to output as mp3 or other compressed format instead of wave. #24

Open famewolf opened 2 years ago

famewolf commented 2 years ago

If the option to output to a compressed format such as mp3, aac etc was offered then folks could actually create audiobooks from ebooks in txt format such as from Project Gutenberg and then listen to them in the car. Vocalizer voices (UK Malcolm) has a great voice and works well with this app.

Will the recording include any alert sounds such as email etc that occur while the text is being read to wave?

drmfinlay commented 2 years ago

Hello famewolf,

An option for writing audio files in a compressed format is a good idea. This would indeed be more useful in the case you mention. MP3 is probably the best choice, since it is quite portable. It is also "free."

It looks like the best way to create MP3 files in an Android environment is to take the wave data received from the text-to-speech engine, encode it using a C library, such as LAME, and write the resultant bytes to the output file. I'll look into this and, hopefully, decrease the time it takes to create wave files in the process.

Regarding your question about alert sounds, I can tell you that they won't be included in the recording. This is because the creation of speech wave files does not typically involve the audio system.

On Fri, 22 Apr 2022 11:04:00 -0700 famewolf @.***> wrote:

If the option to output to a compressed format such as mp3, aac etc was offered then folks could actually create audiobooks from ebooks in txt format such as from Project Gutenberg and then listen to them in the car. Vocalizer voices (UK Malcolm) has a great voice and works well with this app.

Will the recording include any alert sounds such as email etc that occur while the text is being read to wave?