alphacep / alphacep/vosk-server
Memory usage increasing too much?
- Lingua principale
- Python
- Stelle
- 1.3k
- Fork
- 317
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hello,
pointing at issue [#711](https://github.com/alphacep/vosk-api/issues/711) on vosk-api repo , I'm trying to understand a little bit more how vosk manages the memory.
For this test [I modified a little bit and very roughly asr_server.py](https://github.com/nefastosaturo/vosk-server/blob/05821c059ef4959fdda889f6dce33ccae8bb3ca8/websocket/asr_server.py#L70-L72) so that it creates a new recognizer on a new websocket connection.
I'm using the italian model at 16kHz with Docker on my laptop with 16GB RAM, i7 7700HQ laptop.
Steps to reproduce:
- clone my [fork](https://github.com/nefastosaturo/vosk-server)
- `docker build -t alphacep/kaldi-it -f Dockerfile.kaldi-it-memfree .`
- `docker build -t alphacep/kaldi-it-memprof -f Dockerfile.kaldi-it-plot-mprof .` (yeah it could be merged in one single dockerfile, I know, just for testing purpose)
- `docker run -it -p 2700:2700 --env="DISPLAY" --net=host -v="$HOME/.Xauthority:/root/.Xauthority:rw" alphacep/kaldi-it-memprof` (as suggested [here](https://medium.com/analytics-vidhya/docker-tensorflow-gui-matplotlib-6cdd327d4a0f) )
- use multiple `test_ffmpeg.py` and `test_microphone.py` in the `websocket` folder to simulate different connections, close them, start them again, rinse, repeat
What expected:
memory to be released on each websocket disconnection
What we got:
memory continue to increase
From the graph image attached the first disconnection release some memory, then it just goes up.
Is this behaviour correct?

Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.