Skip to content

[IDEA/SUGGESTION] Cache gTTS samples and reuse them #1

@MegaBrutal

Description

@MegaBrutal

I've been thinking about the flooding problem (when players flood TTS with the same word and you get a ban from GoogleTranslate). Reuse already spoken phrases by building a cache of them.

If I read it correctly, here you save the samples to files anyway:

myobj.save(fname)

When players repeat the same phrase, you could use the already saved sample. Of course, this would imply that you save files with a different naming convention, and it would only be useful for relatively short, but common phrases, so I'm not really sure if it would worth the effort. Also it wouldn't stop players from simply flooding the system with different phrases. Rest assured, some rate limiting would probably help.

I'd love to provide a pull request, but I don't (yet?) have a test environment for Sven Co-op server configs. I only have a HLDM server so far – as you might guess, that's easier to maintain. :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions