jwebmeister / tacspeak

Tacspeak - Fast, lightweight, modular speech recognition for gaming
GNU Affero General Public License v3.0
44 stars 2 forks source link

High memory usage #25

Closed wjdob closed 9 months ago

wjdob commented 9 months ago

In my testing, fresh install of Tacspeak 0.2.0 will use about 1600MB of RAM. However, if a level is loaded, the memory usage can go down to about 600MB.

In my previous testing with version 0.1.5, the Tacspeak would eventually use only about 300MB of RAM. Is there a reason why it has high initial memory usage?

jwebmeister commented 9 months ago

Short answer: "~2GB+ RAM" is within the system requirements for Tacspeak, so it should be expected.

Longer answer: The amount of RAM needed depends on the model being used and the active grammar modules.
If the grammar modules loaded and being used requires Dictation (e.g. NoiseSink rule in v0.2.0+ uses Dictation), the full dictation graph will need ~1.2GB (e.g. file size of "Dictation.fst") + additional RAM for other commands.
If the grammar modules loaded and being used don't use Dictation (e.g. no default rules used Dictation prior to v0.2.0), the full dictation graph will be loaded initially, but then garbage collected after some time... or at least I think this is what's happening.