# version - ArticMonkey:19.03.24:1743 import psutil import sys import streamlit as st # my modules from audio_processing.A2T import A2T from audio_processing.T2A import T2A from llm.llm import LLM_chain # libraries from other authors from streamlit_mic_recorder import mic_recorder from streamlit_TTS import auto_play llmchain = LLM_chain() def main(): mic = mic_recorder(start_prompt="Record",stop_prompt="Stop", just_once=True) if mic is not None: a2t = A2T(mic["bytes"]) text = a2t.predict() response = llmchain(entity=text, id=0) audio, _, _ = T2A(response).get_audio() auto_play(audio) print(sys.getsizeof(response)) print(sys.getsizeof(audio)) del response del audio print('RAM memory % used after:', psutil.virtual_memory()[2]) print("Just checking : ", psutil.virtual_memory()) if __name__ == "__main__": print('RAM memory % used:', psutil.virtual_memory()[2]) # ~ 94 GB full memory main()