Open freddiefujiwara opened 3 years ago
Hi @freddiefujiwara, thank you for your PR. I prefer to have different way to implement the new Google TTS API into this library.
I do realize there is no simple way to generate the audio URL by the base64 text, and it's awesome to see you're trying to solve it in this PR. However, it seems that your solution will consume too many computer resources to find an available port and launch a temporary server for each request, especially when handling a large number of requests concurrently.
I would prefer to keep the library simple and general. So, I decide to implement the new Google TTS API in version 2.0.0 and let users decide whether audio URL or Base64 text is the best way for their use cases. (Audio URL has not been removed from this library yet because we don't know whether Google TTS will keep or remove the original API. We can just keep it until Google officially remove original API.)
You can find more details about version 2.0.0 at README and CHANGELOG. Thanks.
I am well aware that this is a very experimental and tricky implementation. Just as you also mentioned in https://github.com/zlargon/google-tts/issues/33. google provided a new API. version 0.0.6 is also provisional and will probably not be available any time someday.
Here's my idea
I don't want you to merge this PR soon, but I'd love to hear your ideas!