CaffeineAU / TTSAutomate

A tool to generate Audio files from text strings in WAV and MP3 format, using various TTS engines as the source
54 stars 6 forks source link

[Suggestion] support windows 10 local TTS engine and .txt file to .mp3 #9

Closed shengdie closed 7 years ago

shengdie commented 7 years ago

Hello, Windows 10 has more local voices than windows 7, but it seems only for UWP apps (I am not sure). And could you make it support txt to mp3, like transform all the .txt file in a folder to .mp3?

CaffeineAU commented 7 years ago

Hi shengdie,

Windows 10 supports the Windows Speech API (SAPI) that I currently use for TTSAutomate, and also the Windows RT Speech API.

I'll look at offering the RT Speech API voices on Windows 10.

For your second suggestion, do you mean convert any txt file in a directory to one mp3 per txt file, or all into one mp3 file?

I'm not sure if I can support that with Ivona voices, as we only get 50000 units of tts per month (a unit is up to 200 characters) and that could potentially burn through that allowance very quickly (we already come close to the limit from regular usage of TTSAutomate)

shengdie commented 7 years ago

I mean convert one txt file to one mp3 file, and this may only work with local TTS engine. Thanks.

2016-11-12 17:14 GMT-05:00 CaffeineAU notifications@github.com:

Hi shengdie,

Windows 10 supports the Windows Speech API (SAPI) that I currently use for TTSAutomate, and also the Windows RT Speech API.

I'll look at offering the RT Speech API voices on Windows 10.

For your second suggestion, do you mean convert any txt file in a directory to one mp3 per txt file, or all into one mp3 file?

I'm not sure if I can support that with Ivona voices, as we only get 50000 units of tts per month (a unit is up to 200 characters) and that could potentially burn through that allowance very quickly (we already cine closer to the limit from regular usage of TTSAutomate)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CaffeineAU/TTSAutomate/issues/9#issuecomment-260152062, or mute the thread https://github.com/notifications/unsubscribe-auth/AGtMFdbhVYAGpEVZIe43ZbIhOc8LvqEvks5q9jotgaJpZM4KwiOS .

CaffeineAU commented 7 years ago

I've investigated the Windows RT Speech API, and unfortunately it can't be used from within TTSAutomate. It uses the Windows.Media.SpeechSynthesis namespace, which is only available from a Win RT app, and there's no interoperability available to use anything from within that namespace in .Net / WPF (TTSAutomate). A number of WinRT features can be used from within .Net / WPF, with some pretty ugly workarounds, but the SpeechSynthesis namespace isn't one of them.

I built a small test Win RT app to generate some example files, but there are further limitations on where Win RT apps can access files in the filesystem, meaning that it can't access a specific directory unless it's one of the special subset of allowed directories.

The functionality to convert any text files in a folder to mp3 is interesting, but not part of the core of TTSAutomate. I'll keep it in mind for future developments.

Thanks for the suggestions.