I am trying to read some data in a JSON file in order to use it from lua. The data are sound files that have been preprocessed in python and stored in JSON for easier access.
The file is roughly 800Mb. When I try to read the read the entire file with file:read("*all")
, I get back a not enough memory
response. The libraries I have looked at are lua-json, lua-cjson and luajson. The first two don't provide a method to access files directly, the third one does, however is just a wrapper that calls f:read()
.
My ultimate goal is to use torch to train some models on some audio data, but I want to keep the processing of the raw signals in python. I chose JSON over other formats for convenience, so if you think there is a format that would work better, I am open for ideas.